You are on page 1of 6

Lab Report No 03

DATABASE SYSTEMS (EC-334)

Submitted By:

Neyan Saif (17-CE-031)

Shahpall Khan (17-CE-013)

Submitted to:

Sir Basit Ikram

Department of Computer Science and Engineering,


HITEC University
Creating Multiple Tables and Relationship Schema in MS Access
Database System 5th Semester-CE HITEC UNI
Objective:
 To Create Multiple Tables
 To Create Relationships among the tables.  Enforce Referential Integrity.
Software Tools:
 Microsoft Access Theory:

 A primary key, also called a primary keyword, is a key in a relational database that is
unique for each record. It is a unique identifier, such as a driver license number,
telephone number (including area code), or vehicle identification number (VIN). A
relational database must always have one and only one primary key.
 A foreign key is a column (or columns) that references a column (most often the primary
key) of another table. The purpose of the foreign key is to ensure referential integrity of
the data. In other words, only values that are supposed to appear in the database are
permitted. Foreign key establish the relationship between two tables.
 Relationships are links that associate a field in one table with a field in another. An
example is a school database with two tables:
➢ Students
➢ Classes
The Students table holds students' names and addresses:

By linking the Student Name fields, you make sure that John in the Students table is the
same John listed in the Math Class table:
Students Math Class

Database System 5th Semester-CE HITEC UNI


 Cardinality: Cardinality defines the relationship in terms of numbers.

Lab Tasks
1. Lab report Tasks:
A. Create and simulate the relationship schema of previous lab task.

B. The relationship schema given below contain one relationship degree incorrect. Identify
the problem and propose a solution.

Database System 5th Semester-CE HITEC UNI


Database System 5th Semester-CE HITEC UNI
C. Create the correct relationship schema in MS Access.

Make tables:

Create Relationship:

Add all Tables:

Edit Relationships as (one to many,many to many):

Database System 5th Semester-CE HITEC UNI


Click Relationship Report:

D. Add 5 entries in each table.

Conclusion:
In this lab, we perform the given tasks in Microsoft Access. We learn to make Entity, Attributes,
Primary key, one to one relationships, one to many relationships, many to many relationships in
MS Access. It is very easy to learn and make ERD diagram in Microsoft Access.

Database System 5th Semester-CE HITEC UNI

You might also like