4.2 Database Concepts Flashcards
Simplest form of database
Flat file consisting of information about a single entity
Entities
Type of object in a database, which contain certain attributes
Primary key
- A unique identifier, and one should be introduced
- Automatically indexed
Composite primary key
A key is composite if 2 or more keys are needed uniquely define a record
Secondary key
Fields where searches could used (for example title)
Different types of relationships
- One to one
- One to many
- Many to many
One to one
Where an entity has a single relationship to another relationship
One to many
An entity has many relations to other entities
Many to many relationships
When a several entities have several relations with other entities
Foreign keys
An attribute that creates a join between two tables which are usually primary keys in other tables
Referential integrity
No foreign key in one table can reference a non-existent record in a related table
Link tables
Contain foreign keys of which they come from other tables for primary keys