Unit-1
Topic:
Database Design
Learning Objectives
At the end of this session, you will be able to:
• What is database design?
• Good design vs Bad Design
• E-R Diagram
• The types of design
Definition:
What is database design ?
✓ It can be defined as a set of procedures or collection of
tasks involving various steps taken to implement a database.
✓It can be used to describe many different parts of the
design of an overall database system.
✓ Principally, and most correctly, it can be thought of as the
logical design of the base data structures used to store the data.
Problems with Bad Design
• Early computers were slow and had limited storage capacity.
• Redundant or repeating data slowed operations and took up too
much precious storage space
• Poor design increased chance of data errors, lost or orphaned
information
Benefits of Good Design
Computers today are faster and possess much larger storage devices.
Rigid structure of modern relational databases helped codify
problems and solutions.
Design problems are still possible, because the DBMS software won't
protect you from poor practices.
Good design still increases efficiency of data processes, reduces waste
of storage, and helps eliminate data entry errors.
ER Diagram (Entity Relationship Diagram)
✓ Database designs also include ER (entity- relationship model)
diagrams
✓ An ER diagram is a diagram that helps to design databases in an
efficient way
✓ Attributes in ER diagrams are usually modeled as an oval with the
name of the attribute, linked to the entity or relationship that
contains the attribute
ER Diagram – An Example
Database Design Process
1.Requirement collection and analysis:
DB requirements and functional requirements
2. Conceptual DB design using a high-level model:
Easier to understand and communicate with others
3. Logical DB design:
Conceptual schema is transformed from a high-level data model into
implementation data model
4.Physical DB design:
Internal data structures and file organizations for DB are specified
Conceptual design: (ER Model )
- What are the entities and relationships in the enterprise?
- What information about these entities and relationships should we
store in the database?
- What are the integrity constraints or business rules that hold?
- A database schema' in the ER Model can be represented pictorially
(ER diagrams).
- An ER diagram can be mapped into a relational schema.
(ER Model )
An ER diagram represents several assertions about the real world.
• What are they?
• When attributes are added, more assertions are made.
• How can we ensure they are correct?
• A DB is judged correct if it captures ER diagram
(ER Diagram for Student-professor )
(An example of Logical Design )
Logical Design:
The logical data model design
defines the structure of data and
what relationship exists among
those data.
(An example of Physical Design )
Physical Design:
The main purpose of the physical
design is to actually implement the
logical design that is, show the
structure of the database along with all
the columns & their data types, rows,
relations, relationships among data &
clearly define how relations are related
to each other.
ER Diagram (Entity Relationship Diagram)
✓ Database designs also include ER (entity- relationship model)
diagrams
✓ An ER diagram is a diagram that helps to design databases in an
efficient way
✓ Attributes in ER diagrams are usually modeled as an oval with the
name of the attribute, linked to the entity or relationship that
contains the attribute
Summary
In this session, you have learned about:
What is database design?
Types of database design
E-R diagram
MCQ 1
1. A preliminary investigation of the required database is
2. called?
A. feasibility studies
B. data flow diagram
C. all of these
D. feasibility study
Ans: D
MCQ 2
Which one represents an entity?
A. Teacher
B. table
C. Chair
D. all of these
Ans: D
MCQ 3
Students name their roll number, address, father name
are an example of?
A. Entities
B. attribute
C. occurrences
D. None of these
Ans: B