4.10 Fundamentals of Databases Flashcards
Define an attribute/field
An individual fact, detail or characteristic of an entity
What is meant by a data model
An abstract model of which things to store and what information is to be recorded
Define Database
An organised collection of related data/information
Define Entity
A thing, object or attribute about data that can be collected
What is a Flat-file Database
A database containing a single table
Define Primary Key
An attribute in a table which uniquely identifies each record in the table
Define Record
A collection of fields that refer to the same entity (usually a row in a table)
Define Foreign Key
A field in the table which contains the value of a primary key in another table (in essence linking 2 tables together).
Define (Data) Redundancy
The repetition of data within a database
What is a Relational Database
A database with multiple linked tables
Define a table
A collection of related data
Describe the problem with redundancy in FFD
- If a data redundant field has to be changed, all of the fields which contain the same value must be modified, this makes the table more prone to error and so has less data integrity
Explain the 3 Entity Relationships
1 - one-to-one (1:1) where one instance of an entity is associated to one instance of an entity
1 - one-to-many (1:N) where one instance of an entity is associated to more than one instance of an entity
1 - many-to-many (M:N) where more than one instance of an entity is associated to more than one instance of an entity
What is meant by data integrity
The accuracy and consistency of the data stored in a database
How are relationships made between different entities
- By the use of primary and foreign keys in each table
What is an Entity description
A description of the attributes an entity will have, the underlined attribute is the primary key
How do you fix many to many relationships
- Make a junction table that contains the composite primary key of the linked tables & make a M:1 and N:1 to the linked tables from the junction table
Why cant you have many to many relationships
- They decrease referential integrity