1.3.2 Databases Flashcards
Define a database
An organised collection of data
Define a table
Stores data about a type of entity
Define an attribute
A column in a table, called a field
Define a primary key
An entirely unique identifier for an entity
Define a composite key
A pair of two attributes to make a primary key
Define a foreign key
A non-primary key attribute in one table which links to the primary key field in another table
Define data integrity
This refers to the accuracy and reliability of data
Define referential integrity
This refers to the data integrity in relational databases. It tidies up any effected records.
What are the types of entity relationships?
1 to 1
1 to many
Many to many
Define a flat-file
A single table which contains all the data, which can have repeating data or data which extends over multiple lines
Define the stages of 1st Normal Form
- Each record has a primary key
- Data is atomic
- No repeating groups of attributes
Define the stages of 2nd Normal Form
- Data is in 1NF
- There are no partial dependancies
Define the stages of 3rd Normal Form
- Data is in 2NF
- There are no non-key dependencies
What is SQL?
The standard tool for working with databases. It is a declarative language
Explain the DELETE SQL command
DELETE FROM tblName
WHERE [criteria];
This deletes from the table any record which matches the criteria