2. Learning Outcomes
• By the end of this lesson;
– You will all be able to describe a relational
database
– You will all be able to define a number of key
database terms
– You will begin creating a basic Access
database
3. Relational Database
A relational database has more than one table and the
tables are linked using key fields. For example, a library
database could have three tables:
– customer - when a customer joins the library a record is
created. It stores their details such as their first name and
surname and includes a unique Customer ID.
– book - each book in the library has a record. It stores
details about the book, such as the author and title and
includes a unique book ID.
– lending - when a customer borrows a book, the lending
table stores the customer's unique ID and the book's
unique ID in a record. The record could also include
additional information such as when the book was
borrowed and when it's due back.
4. Relational Database
Advantages
– The book's details and the customer's details need only be
entered into the database once.
– Because of this, mistakes are less likely to happen and if
there were a mistake in a customer's record, for
example, correcting it will correct the mistake database-
wide.
– Duplication is avoided - this keeps the database's file size
down.
– Details about books and customers are easily accessible
using their unique IDs.
– Queries can be performed and reports generated, eg a list
of books a customer has borrowed since joining the library.
5. Key Terms
• Attribute
– The field names and data types that are in a database
• Primary Key
– A unique identifier for a row within a table
• Composite key
– If there is no unique identifier then a combination of two or
more attribute is used to identify the row.
• Foreign key
– An attribute in a table that is the primary key of another
table
• Referential integrity
– Since there is related data in several tables in a
relationship data, updates to one table may require
updates to related tables. The need to cascade updates
across more than table is called Referential Integrity
6. Task 1
• On Jogle you need to;
– Describe what is meant by a relational
database, using an example.
– Define each of the 5 key terms
7. Task 2
• You will need to create an Access
database for your online gaming website
you planned in yesterdays lesson. You
should be able to explain where you have
used each of the 5 key terms.