Databases(Not done) Flashcards
Define entity
An entity is a category of object, person, event or thing of interest about which data needs to be recorded
What is a flat file?
consists of information about a single entity
1 table
What is a primary key
a unique idetifier for each record
primary keys are underlined
Entity relationships
One-to-one e.g. Husband and Wife
One-to-many e.g. Mother and Child, School and Pupil
Many-to-many e.g. Actor and Film, Recipe and Ingredient
What is a foreign key?
A foreign key is an attribute that creates a join between two tables (relations).It is the attribute that is common in both tables.
It is the primary key in the first relation
What is a composite primary key?
Two or more attributes that are needed to uniquely identify
Why have databases?
They allow data to be :
retrieved quickly
updated
filtered
What is data integrity?
The maintenance of a state of consistency in a data store
What is data corruption?
The opposite of data intergity
What is data security?
Keeping data safe
What is referential integrity?
This means that no foreign key in one table can reference a nonexistent record in a related table
What is 1NF?
Remove duplicate data
What is 2NF?
Remove data sets that occur in multiple rows.
Create foreign keys
ACID rules
ATOMOCITY: a change is performed
CONSISTENCY:any change must retain the overall
ISOLATION:
DURABILTY: