0% found this document useful (0 votes)
70 views5 pages

LAB 3: High-Level Database Model 1. Convert ER Diagram To Relational DB and Implement To MS SQLSRV. A. ERD 1 I

The document describes 5 ER diagrams that are converted to relational database models and implemented in Microsoft SQL Server. For each ER diagram, it shows the relational schema with foreign key constraints and the corresponding tables created in MS SQL. The relational schemas define tables for entities like employees, flights, products, and relationships between them.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
70 views5 pages

LAB 3: High-Level Database Model 1. Convert ER Diagram To Relational DB and Implement To MS SQLSRV. A. ERD 1 I

The document describes 5 ER diagrams that are converted to relational database models and implemented in Microsoft SQL Server. For each ER diagram, it shows the relational schema with foreign key constraints and the corresponding tables created in MS SQL. The relational schemas define tables for entities like employees, flights, products, and relationships between them.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

LẠI TRUNG MINH ĐỨC – SE62220

Class: IA1161
Subject: Introduction to Database

LAB 3: High-Level Database Model


1. Convert ER Diagram to Relational DB and implement to MS SQLSRV.
a. ERD 1
i. Relational Database
- Employees (EmployeeID, EmployeeRef, Name)
 FK: EmployeeRef
ii. MS SQLSRV:
Employees
EmployeeID
EmployeeRef
Name
b. ERD 2
i. RD:
- Flights (Flight#, FromCode, ToCode, Date)
 FK: FromCode, ToCode
- Locations (Code, Name)
ii. MS SQLSRV:

Flights
Flight#
Locations
FromCode Code
ToCode Name
Date
c. ERD 3
i. RD:
- Employees (ID, Name)
- Products (Code, Name, Price, Date, EmployeeID)
 FK: EmployeeID
ii. MS SQL:

Products Employees
Code ID
Name Name
Price
Date
EmployeeID
d. ERD 4
i. RD:
- Employee (EmpID, Name)
- Product (Code, Name)
- Customer (CustomerID, Name)
- Sale (EmpID, Code, Quantity, CustomerID)
 FK: EmpID, Code, CustomerID
ii. MS SQL:

Employee
EmpID
Name

Sale
Product EmpID
Code Code
Name Quantity
CustomerID

Customer
CustomerID
Name
e. ERD 5
i. RD:
- Person (Code, Name)
- Teacher (PersonCode, Speciality)
 FK: PersonCode
- Student (PersonCode, Class)
 FK: PersonCode
ii. SQL:
Person
Code
Name

Student Teacher
PersonCode PersonCode
Speciality
Class

You might also like