Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

HNDA 2105

Database Management
Systems and Data
Analysis

Microsoft Access - Relationships

1
Relationship with tables
• Relationship in between tables

• Types of Relationship
1. One to One
2. One to Many
3. Many to Many
One to one relationship
• For any given row in Table A, there is only one
row in Table B.
• For any given row in Table B, there is only one
row in Table A.
One to many relationship
• For any given row in Table A, there are many rows
in Table B.
• For any given row in Table B, there is only one
row in Table A.
Example
• The relationship between Department and
Course is one-to-many, because one department
may offer more than one course, but a Course is
related to only one Department.
Many to many relationship
• For any given row in Table A, there are many rows
in Table B.
• For any given row in Table B, there are many rows
in Table A.
Example
• Lecturer table and the Course table.
• A Lecturer can be assigned to different Courses
and a Course can be conducted by many different
Lectures.
Working with relationship – ms access
Create relationships - steps
Create relationships - steps
Referential Integrity
(data accuracy)

9
What does this have to
do with Referential
Integrity?

If the department code is not listed in the primary table (the tblDepartments)
then it can not be listed in the Related Table (tblEmployees).
10
Cascade Update Related Fields

11
Cascade Delete Related Fields
???

12
Relationships – Join types

13
How to increase database security?
1. Have secure passwords.
2. Encrypt your database.
3. Keeping it hidden from search engine results.
4. Segment your database. (various roles can be
created within the database)
5. Monitor and audit your database. (Monitoring
access and behaviors of database users)
6. Backup and Disaster Recovery
7. Any patches and/or updates should be applied
as soon as they become available.
Questions?

15

You might also like