Unit 5 - Databases Flashcards
Put Records, Table, Field and Characters in the correct order of what each is made up of?
A Table is made up from Records
Records are made up of Fields
Fields are made up of Characters
Name the 6 key aspects to a database?
Field names Fields Table Records Data items Primary key
What is a table?
A structure of rows and columns that contain data
What’s is a record?
A single row of the table holding data of a single item or event
What is a field?
An individual data item within a record
What is a primary key?
It’s a field in a table that allows each record to be uniquely identified
What are the two types of primary key?
Simple
Compound/Composite
What the difference between a simple and a compound primary key?
A simple primary key is one which is made up of a single field
A compound primary key is one that combines the content of mor than one field to produce a unique value
What is a secondary key?
Field that is identified as being suitable for indexing data
What is a foreign key?
It a key that allows tables to link together. The foreign key links to a primary key of another table
What is an entity?
A thing that can be distinctly identified
What are the three types of relationships?
One to one
One to many
Many to many
Which relationship should not be in a normalised database?
Many to many
Why is data normalised?
To reduce redundancy and inconsistency and easier to maintain
2 characteristics of 1NF?
Every data value in a field is atomic
No repeating values
Name the 4 checks for 1NF?
Is there a primary key?
Are the field names unique?
Are the repeating fields?
Is the data in the fields atomic?
What are the rules of 2NF?
Must have been in 1NF
All non-key fields be found out by using the entire primary key?
What happens in 3NF?
Table is split into multiple tables with only the fields that contain data on a topic
What are the 5 advantages of normalisation?
Removes redundancy Increases consistency Increases integrity Easier to maintain Flexibility for future changes
What are the 3 disadvantages of normalisation?
Queries take longer and more usage
Structure makes it harder for reports
Historical data cannot be stored
10 things from the data dictionary?
Table name Field name Field data type Field length Field value Field validation Table security Keys Indexes Relationships
What are the two types of queries?
Simple
Complex
When should you use a simple query?
When 1 parameter needs to be searched for
Name the three way to join parameter used in complex queries?
And
Or
Not