Upload
leslie-edwards
View
221
Download
0
Embed Size (px)
DESCRIPTION
Database Table Field Record Primary key
Citation preview
DatabasesPart 1
To answer the question “what is a database?”
To understand the basic components of a database and start to plan/create our own.
Aims
Database
Table
Field
Record
Primary key
Keywords
What is a database?
A database is a collectionof related information.
Used to store and manage data.
Yellow pages
Mobile phones
Microsoft Access
Examples?
Patient information in a hospital
Car registration numbers and owners
Names and phone numbers of friends
Student information in a school
Criminal Records
What kind of information could we store in a
database?
Parts of a database
Each table within a database will have a collection of fields and records.
e.g. Customer details is a table
Tables
Parts of a database
Each piece of information in a record is called a field.
e.g. Name: Joe Bloggs is a field.
Fields
Parts of a database
Each set of information about a person / object is called a record.
e.g. Name: Joe BloggsAddress: 33 Wood Lane, PorthPhone number: 01443 123456
is a record which has 3 fields.
Records
Parts of a database
Primary key
Every table in a database needs a primary key; aprimary key uniquely identifies each record inthe table.
e.g. Applies an ID to a record e.g. St1234
Table
Record
Field
Primary key
Which is better and why?
Data storage capacity Faster data retrieval, especially when
searching Easier to manage security Amending data is much easier
A manual system or a computerised system?
Data types
When information is typed into a database it isstored as a certain format.
Text: Any text
Number: Only numbers
Yes/no: anything with only two possible answers.E.g. yes/no, male/female.
Lookup wizard: a drop down menu with multiplechoice answers.
Your new band has a set up an online fan club.
100 requests for information on the fan club that have been emailed to you.
10 people have sent £10 for information and autographs after talking to the secretary.
Task
Fan club Information needed— E.g Name, address etc.
Type of Information (text, date, number)
Size of field needed (number of letters or numbers)
First Name Text 10 Last name Address Email Favourite member Paid £10 Yes/No Tick Box Preferred place of concert
D.O.B
Number of concerts been to `
Table viewsDesign viewEnables you to do the work youneed to create a table. i.e. fieldnames and data types.
DatasheetThe Datasheet View shows therecords in a table.
Having designed a table you canthen go into datasheet anddisplay/add records.