A-level Computing 2009/AQA/Problem Solving, Programming, Operating Systems, Databases and Networking/Databases
From the Specification : Database
Produce a data model from the given data requirements for a simple scenario involving two or three entities.
Be able to normalise relations to Third Normal Form. |
From the Specification : Relational Databases Explain the concept of a relational database. Define the terms:
|
From the Specification : Querying a Database Learn about Structured Query Language (SQL) Use SQL to retrieve, update, insert and delete data from several tables of a relational database (see Teacher Resource Bank) Data Definition Language (DDL) Explain the term DDL. Use DDL to define a database (see Teacher Resource Bank for commands/statements). |
Conceptual Data Model
editEntity Relationship Diagrams
editAn entity relationship diagram is used at the Analysis stage to help the analyst to model and represent the entities involved in the problem domain. These models can then be developed into designs for tables and relationships in a proposed database system.
Relationships
editOne to One Relationship
editEach instance of an entity can have one, and only one, related instance of another entity.
Many to One Relationship
editEach instance of an entity can have any number of related instances of another entity, however those instances are only have one related instance of the first entity.
Many to Many Relationship
editEach instance of an entity can have any number of related instances of another entity, and each of those instances can have many related instances of the first entity. This is to be avoided within proper database design.
Referential Integrity
editReferential integrity means that for each new record added to an entity there must be a related field added to, or already existing in all related entities.
Foreign Key
editTuple sometimes called a record, a set of attribute values, (a row of a table)
Attribute a named column in a table
Primary Key a attribute that uniquely identifies a tuple
Relation a table
Relational Database a collection of tables
Composite Key where a collection of attributes uniquely identify a tuple rather than just one
Foreign Key An attribute in one table that is a Primary key in another table, often there to reference to said table later
Database Design and Normalisation
edit0NF - Flat file
editAll of the data is held within a single table. This is to be avoided within proper database design.
1NF - 1st Normal Form
editA database is considered to be in first normal form if it passes the atomic data test, which means that all of the tables in the database are indexed with primary keys, and that the tables do not contain any repeating groups of attributes.
2NF - 2nd Normal Form
editTo reach second normal form, a database must already be in first normal form. In addition to that, the tables must pass the partial key dependency test, which means that all of the attributes within a table are related to the table's primary key.
3NF - 3rd Normal Form
editTo reach third normal form, a database must already be in second normal form. In addition to that, the tables must pass the non key dependency test, which means that only the attributes within a table that have a direct relationship with the primary key.
Further Normal Forms
editWhile there are further levels of normalisation, these are used only in very complex and specialised systems. Knowledge of them is not required for the course.