Lec 09
Lec 09
9
System Analysis and Design
Course Code IT223
Faculty of Computing and Information Technology
Designing Databases
Introduction
2
FIGURE 9-1: Systems development life cycle with design phase highlighted
1
2025-01-24
Database Design
File and database design occurs in two steps:
1. Develop a logical database model, which describes data using
notation that corresponds to a data organization used by a database
management system.
Relational database model
4
FIGURE 9-2: Example of conceptual, Logical and Physical data model for hotel reservations system
2
2025-01-24
2. Combine normalized data requirements from all user interfaces into one consolidated
logical database model (view integration).
3. Translate the conceptual E-R data model for the application into normalized data
requirements.
4. Compare the consolidated logical database design with the translated E-R model and
produce one final logical database model for the application.
5
Grouping attributes from the logical database model into physical records.
Selecting media and structures for storing data to make access more
efficient. 6
3
2025-01-24
4
2025-01-24
10
5
2025-01-24
11
12
6
2025-01-24
13
FIGURE 9-3: Normalization and Rules of Normalization
14
7
2025-01-24
15
16
FIGURE 9-4: Primary key, Foreign key and Referential Integrity
8
2025-01-24
17
Representing Entities
Each regular entity is transformed into a relation.
The identifier of the entity type becomes the primary key of the
corresponding relation.
The primary key must satisfy the following two conditions:
The value of the key must uniquely identify every row in the relation.
The key should be non redundant.
The entity type label is translated into a relation name.
18
9
2025-01-24
19
20
10
2025-01-24
21
Unary Relationships
Candidate key: an attribute (or combination of attributes) that uniquely
identifies each instance of an entity type
Unary 1:N Relationship
Is modeled as a relation
Primary key of that relation is the same as for the entity type
Foreign key is added to the relation that references the primary key values
Recursive foreign key: a foreign key in a relation that references the primary
key values of that same relation
22
11
2025-01-24
Unary Relationships(Cont.)
Unary M:N Relationship
Model as one relation, then
Create a separate relation to represent the
M:N relationship.
The primary key of the new relation is a
composite key of two attributes that both
take their values from the same primary key.
Any attribute associated with the
relationship is included as a non key attribute
in this new relation
23
Merging Relations
24
12
2025-01-24
25
26
13
2025-01-24
27
Designing Fields
28
14
2025-01-24
29
15
2025-01-24
31
Assignment
Define the following: عرف التالي
E-R Diagram Referential Integrity
Relation Field
16
2025-01-24
17