0% found this document useful (0 votes)
12 views11 pages

Logical Design Lab

The document outlines the objectives and tasks for a database design lab focused on a university database system. It includes the analysis of entities, relationships, and constraints, as well as the implementation of an ER-Model and logical schema. Key entities such as Colleges, Instructors, Departments, Programs, Courses, Semesters, Sections, and Students are defined with their attributes and relationships.

Uploaded by

mohammaddraz22
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)
12 views11 pages

Logical Design Lab

The document outlines the objectives and tasks for a database design lab focused on a university database system. It includes the analysis of entities, relationships, and constraints, as well as the implementation of an ER-Model and logical schema. Key entities such as Colleges, Instructors, Departments, Programs, Courses, Semesters, Sections, and Students are defined with their attributes and relationships.

Uploaded by

mohammaddraz22
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/ 11

30201120 Database Design & Development

Lab1: Logical Design


Wed. 27-03-2024

Lab Objectives
1. Analysis the Written scenario for the database system to extract the entities,
relationships and constrains to build the conceptual design.
2. Implement the ER-Model for the conceptual design that has been analysed using one
of the design tools.
3. Apply the mapping rules.
4. Implement the ER-Model for logical design for the system.

Scenario: University database.

A University contains several Schools (Colleges) Each school has a Name, Code,
several Locations and a Phone number, each school has a dean to manage its which
is also an instructor.

Each School contains one or more departments each department has a Name,
Code, and a head from one of the instructors and a single Location, each
Department offers one or more programs. A program has a Code Name and a
Level. Each course is offered by one department and have a Number, Name, Credit
Hours, Prerequisite and Description. each program contains many courses.

Semester is defined by an ID and has a Staring Date and End Date. In each
semester Department may offer one or more sections for each course in which a
Section has a number, Capacity, Location, and an assigned Instructor to teach it, a
section has one Instructor to teach, and Instructor can teach many different
Sections.

One course has many sections, but each section is related to only one course.

The instructor can be in only one school, and school has many instructors, and the
university keep track of Instructor ID, Name, different Addresses, Starting Date
and his or her head which will be one of the instructors, salary, and annual salary.

A student has an ID, Name, Sex, Age, date of birth, and different emails. The
student is enrolled in only one program, but a program can contain many students.

Students can be enrolled in many sections of deferent courses. and section can have
many students enrolled.
30201120 Database Design & Development
Lab1: Logical Design
Wed. 27-03-2024

1. Draw the Conceptual Design


2. Find all the attributes for the entities.
3. Apply the mapping rules.
a. Define the strong and weak entities.
b. Resolve the derived attributes.
c. Resolve the composite attributes.
d. Resolve the multivalve attributes.
e. Resolve the complex attributes.
f. Resolve the 1:1 relationship.
g. Resolve the 1:M relationship.
h. Resolve the N:M relationship.
4. Write the Logical Schema
5. Draw the ER-Model for the Logical Design
6. Draw the logical design with a sample instance from each table.
7. Draw the Physical Design
30201120 Database Design & Development
Lab1: Logical Design
Wed. 27-03-2024

1.
30201120 Database Design & Development
Lab1: Logical Design
Wed. 27-03-2024

2.

Colleges: (name, code, location, phone)

Instructor: (id, name, address, start_date, salary, annual_salary, headOfInstructor)

Department: (name, code, college_code, location)

Program: (code, name, level)

Course: (number, name, credit hours, prerequisite, description)

Semester: (id, startingDate, endDate)

Section: (number, Capacity, Location, assigned Instructor, course)

Student: (id, name, sex, age, DOB, emails)

3. mapping steps

step one: strong and weak entities

all strong but department and section

step two: derived attributes

Instructor: (id, name, address, start_date, salary, headOfInstructor)

Student: (id, name, sex, DOB, emails)


30201120 Database Design & Development
Lab1: Logical Design
Wed. 27-03-2024

Step three: multi-valued attributes step

Colleges: (name, code, location, phone)

Instructor: (id, name, address, start_date, salary, headOfInstructor)

Department: (name, code, college_code, location)

Program: (code, name, level)

Course: (number, name, credit hours, prerequisite, description)

Semester: (id, startingDate, endDate)

Section: (number, Capacity, Location, assigned Instructor, course)

Student: (id, name, sex, age, DOB, emails)

Colleges: (name, code, location, phone)

Instructor: (id, name, start_date, salary, headOfInstructor)

Instructor_location: (id, address)

Department: (name, code, college_code, location)

Program: (code, name, level)

Course: (number, name, credit hours, prerequisite, description)

Semester: (id, startingDate, endDate)

Section: (number, Capacity, Location, assigned Instructor, course)

Student: (id, name, sex, DOB)


30201120 Database Design & Development
Lab1: Logical Design
Wed. 27-03-2024

Student_email: (id, emails)

Step four: composite attributes

Colleges: (name, code, location, phone)

Instructor: (id, name, address, start_date, salary, headOfInstructor_id)

Department: (name, code, college_code, location)

Program: (code, name, level)

Course: (number, name, credit hours, prerequisite, description)

Semester: (id, startingDate, endDate)

Section: (number, Capacity, Location, assigned Instructor, course)

Student: (id, name, sex, DOB)

Student_email: (id, emails)

Colleges: (name, code, country, city, street, building number, floor, phone)

Instructor: (id, fname, mname, lname, country, city, street, building num, apt num , start_date,
salary, headOfInstructor)

Department: (name, code, college_code, city, street, building number, floor)

Program: (code, name, level)

Course: (number, name, credit hours, prerequisite, description)

Semester: (id, startingDate, endDate)


30201120 Database Design & Development
Lab1: Logical Design
Wed. 27-03-2024

Section: (number, Capacity, building number, floor, room num, assigned Instructor,

course)

Student: (id, fname, mname, lname, sex, DOB)

Student_email: (id, emails)

Step five: relations (1:1)and (1:m)

Colleges : instructor → 1:1 (manages)

Colleges : instructor → 1:m (works for)

Colleges : department → 1:m (has)

Instructor : Instructor → 1:m (manages)

Instructor : section → 1:m (teaches)

Department : program → 1:m (offers)

Department : course → 1:m (offers)

Department : sections → 1:m (offers)

program : students → 1:m (enrols)

courses : courses → 1:m (prerequisite)

courses : section → 1:m (has)

section : student → 1:m (enrols)


30201120 Database Design & Development
Lab1: Logical Design
Wed. 27-03-2024

m:n relations

semester : courses → m:n (offers)

semester : sections → m:n (offers)

Colleges: (name, code, country, city, street, building number, floor, phone)

Instructor: (id, fname, mname, lname, country, city, street, building num, apt num , start_date,
salary, headOfInstructor_id, college_code)

Department: (name, code, college_code, city, street, building number, floor)

Program: (code, name, level, department_code)

Course: (number, name, credit hours, prerequisite, description, department_code,


semester_id, program_code)

Semester: (id, startingDate, endDate)

Section: (number, Capacity, building number, floor, room num, assigned Instructor,

courseId, semester_id)

Student: (id, fname, mname, lname, sex, DOB, sectionNum, semester_id, program_code)

Student_email: (id, emails)

Student_courses_semester: (student_id, semester_id, course_code_section_num)


30201120 Database Design & Development
Lab1: Logical Design
Wed. 27-03-2024

Final schema

Colleges: (name, code, country, city, street, building number, floor, phone)

Instructor: (id, fname, mname, lname, country, city, street, building num, apt num , start_date,
salary, headOfInstructor_id, college_code)

Department: (name, code, college_code, city, street, building number, floor)

Program: (code, name, level, department_code)

Course: (number, name, credit hours, prerequisite, description, department_code,


semester_id, program_code)

Semester: (id, startingDate, endDate)

Section: (number, Capacity, building number, floor, room num, assigned Instructor,

courseId, semester_id)

Student: (id, fname, mname, lname, sex, DOB, sectionNum, semester_id, program_code)

Student_email: (id, emails)

Student_courses_semester: (student_id, semester_id, course_code_section_num)


30201120 Database Design & Development
Lab1: Logical Design
Wed. 27-03-2024

Strong and weak entities

Colleges: (name, code, country, city, street, building number, floor, phone)

Instructor: (id, fname, mname, lname, country, city, street, building num, apt num , start_date,
salary, headOfInstructor_id, college_code)

Department: (name, code, college_code, city, street, building number, floor)

Program: (code, name, level, department_code)

Course: (number, name, credit hours, prerequisite, description, department_code,


semester_id, program_code)

Semester: (id, startingDate, endDate)

Section: (number, Capacity, building number, floor, room num, assigned Instructor,

courseId, semester_id)

Student: (id, fname, mname, lname, sex, DOB, program_code)

Student_email: (id, emails)

Student_courses_semester: (student_id, semester_id, course_code_section_num)


30201120 Database Design & Development
Lab1: Logical Design
Wed. 27-03-2024

You might also like