4.10 Fundamentals of Databases Flashcards
Primary Keys (definition)
The unique identifier for each row
Simple Primary Keys (definition)
Primary keys that only contain one field to make a unique value
Composite Primary Keys (definition)
Primary key that contains more than one field to make a unique value
Foreign Keys (definition)
A field in one table that is linked to the primary key in another table
A primary key that has come from another table
Entity
Table
Record
Row
Attribute
Field
Entity Definition
TableName (Primary Key, field1, field2)
- underline primary key
Relationships: One to One
x -|——|- y
Relationships: One to Many
x -|——-<- y
Relationships: Many to Many
x -|——<- xy ->——| y
middle box contains foreign keys of other boxes to make primary key
Relationship Diagrams are called …
Entity-Relationship Diagrams (ERDs)
Normalisation Rules help …
(3)
- organise data efficiently
- eliminate redundant data
- ensure only related data stored in table
First Normal Form (4)
- no columns with repeated or similar data
- each data item cannot be broken down any further (atomic)
- each row is unique (it has a primary key)
- each field has a unique name
Second Normal Form (2)
- must already be in 1NF
- non-key attributes must depend on every part of the primary key