0% found this document useful (0 votes)
6 views

Lab 01

Uploaded by

moqbelabd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Lab 01

Uploaded by

moqbelabd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Lab Number : DB_Lab_1

Lab Title : Mapping from Scenario into ER Model (Project Part 1 - Level 1)
Chapter : Chapter 3, Chapter 4
Date Assigned :
Due Date : In Lab
_____________________________________________________________________________________

Overview
Conceptual modeling is a very important phase in designing a successful database application. Therefore,
Once the requirements have been collected and analyzed, the next step is to create a conceptual schema
(high-level) for the database. This step is called conceptual design, the conceptual schema is a concise
description of the data requirements of the users and includes detailed descriptions of the entity types,
relationships, and constraints; these are expressed using the concepts provided by the high-level data
model. The Entity-Relationship (ER) model is a popular high-level conceptual data model. This model and
its variations are frequently used for the conceptual design of database applications, and many database
design tools employ its concepts. The ER model is associated with diagrammatic notation, known as ER
diagrams.
Objectives
To covert software requirements (Business rules, requirements, or scenario, data requirements, miniworld)
after the requirements collection and analysis phase, into a conceptual schema (high-level) based on
systematic approach by using diagrammatic notation such as Entity-Relationship diagrams.
Terminologies
• Requirements(R) phase: Requirement analysis is carried out for the final users, or customers, of
the database system by a team of system analysts or requirement experts.
• conceptual schema design phase: examines the data requirements resulting from the
Requirements(R) Phase and produces a conceptual database schema such as ER diagram.
Approaches to Conceptual Schema Design
For conceptual schema design, we must identify the basic components (or constructs) of the schema: the
entity types, relationship types, and attributes. We should also specify key attributes, cardinality, and
participation constraints on relationships, weak entity types, and specialization/ generalization
hierarchies/lattices. Therefore, there are five steps to convert the scenario into a conceptual model as below:
Step 1 - Identify Entities
Step 2 - Identify relationships.
Step 3 - Fill in cardinality and participation.
Step 4 - Identify attributes.
Step 5 - Draw a full ER Diagram

Step 1 - Identify Entities


Entity: it is a thing in the real world with an independent existence. An entity may be an object with a
physical existence (for example, a particular person, car, house, or employee) or it may be an object with a
conceptual existence (for instance, a company, a job, or a university course). Each entity has attributes—the
particular properties that describe it.
No scenario Entity
A person with a number 954237844 may own house and may belong to Person, house,
e.g
a political party. political party
Practice_1: Identify all possible Entities for the following requirements (scenario).
No scenario Entity
1 Each faculty is divided into several schools -
2 Each school offers numerous programs
3 Each program contains many courses
4 Each school employs many lecturers
5 Lecturers can teach many courses
6 Lecturers can teach the same course many times
7 Courses can be taught by more than one lecturer
8 A student is enrolled in only one program
9 Students can be enrolled in many courses at the same time
10 Courses have many enrolled

Step 2 - Identify relationships


A relationship defines as a set of associations among entities from these entity types.

No scenario relationship
A person with the number 954237844 may own a house and may belong
e.g
to a political party.

No scenario relationship
1 Each school offers numerous programs
2 Each program contains many courses
3 Each school employs many lecturers
4 Lecturers can teach many courses
5 Lecturers can teach the same course many times
6 Courses can be taught by more than one lecturer
7 A student is enrolled in only one program
8 Students can be enrolled in many courses at the same time
9 Courses have many students enrolled

Step 3 - Fill in cardinality and participation

Step 4 - Identify attributes


Attributes are properties used to describe an entity; for example, an EMPLOYEE entity may have a Name,
SSN, Address, Sex, Birthdate.
Types of Attributes:
1. Simple: Each entity has a single atomic value for the attribute.
2. Composite: The attribute may be composed of several components.
3. Multi-valued: An entity may have multiple values for that attribute.
4. A key attribute: it is the unique, distinguishing characteristic of the entity.
No scenario Attribute type
Simple: Type
Retail centers are characterized by their type, unique ID, and
e.g Key: unique ID
address.
Simple: address
Practice: Identify all possible attributes and their type for the following requirements (scenario).
No scenario Attribute type
A department controls a number of projects, each of which has a
1
unique name, a unique number, and a single location.
2 A department may have several locations
We want to keep track of the dependents of each employee for
3 insurance purposes. We keep each dependent’s first name, sex,
birth date, and relationship to the employee.
We store each employee’s name, Social Security number,2
address, salary, sex (gender), and birth date. An employee is
assigned to one department, but may work on several projects,
4 which are not necessarily controlled by the same department.
We keep track of the current number of hours per week that an
employee works on each project. We also keep track of the
direct supervisor of each employee (who is another employee).
Step 5 - Draw fully ER Diagram

You might also like