Database Flashcards
Define: Database
Organised body of related data that you can access in a clearly defined way, normally relational.
Define: Entities
Object, person, event or thing of interest to an organisation about which data is recorded.
Define: Relationship
Association between two entities.
What are the three types of relationships in a database?
1) One-to-one e.g. Husband and Wife.
2) One-to-many e.g.School and Pupil.
3) Many-to-many e.g. Actor and Film.
Define: Primary Key
A unique identifier for a particular record.
Define: Composite primary key
Combining attributes to make a unique identifier.
Define: Foreign Key
An attribute in one table that is a primary key in another table.
Define: Normalisation
Is a process used to come up with the best possible design for a database. (Tables should be organised so that data is not duplicated in the same table or in different tables. The structure should allow complex queries to be made)
Define: 1st Normal Form
Contains no repeating groups of attributes. All attributes must be atomic.
Define: 2nd Normal Form
Is in first normal form and contains no partial dependencies.
Define: 3rd Normal Form
Is in second normal form and contains no non-key dependencies. All attributes are dependent on the key, the whole key and nothing but the key.
Define: Atomic
A single attribute cannot consist of two data items. eg. first name and surname
Advantages of Normalisation
1) It is easier to maintain and change a normalised database
2) There is no unnecessary duplication of data
3) Data integrity is maintained – if a person changes address, for example, the update needs to be made only once to a single table
4) Having smaller tables with fewer fields means faster searches and savings in storage