You are on page 1of 26

DATABASE DESIGN PROCESS

DESIGN STRATEGIES

Dr. Emelia Opoku Aboagye


Steps in Database Design
• Requirement Analysis-user needs: what must database do?
• Conceptual Design-high level description (ER model )
• Logical Design-translate ER into DBMS data model.
Schema Refinement- Consistency, Normalization
• Physical Design-indexes, disk layout
• Security Design- who accesses what and how
Entity Relationship Diagrams:
Symbols & Meaning
3 conceptual models for ER diagram symbols
Conceptual model

• Here, you'll describe entities from a broad perspective. The model will
include high-level entities and their relationships, and attributes.Keys
are left out.
Logical model

• Building on the conceptual model, this level has more detail. It is not
concerned with how the data will be physically utilized in a database.
It includes entities and their relationships, attributes and primary keys
for entities and foreign keys.
Physical model

• The next level is the physical model, and expands on the logical
model. In this level, you will add information that represents the
processes involved. Table structure, column information, primary and
foreign keys and relationships among tables are depicted at this level.
ER diagram symbols:

• Entity relationship diagrams have specific symbols that represent


each element. They include:
• Entities
• Relationships
• Attributes
• Physical symbols
• Notations
Entities
Entities
• Entities are generally nouns, such as client, manager, employee and
salary. Strong entities exist by themselves apart from other entities.
Weak entities, on the other hand, rely on another entity type.
Associative entities are a hybrid, with associations between one or
more types of entities.
Relationships
Relationships
Relationship symbols detail the associations between entities, and are
typically verbs that show how the entities interact. A weak relationship
depicts the connection between an entity type that is weak and its
corresponding owner.
Attributes
Attributes
• Attributes describe characteristics of a relationship or an entity. In the
case of relationships, they can be one-to-one or many-to-many.
Attributes can detail characteristics that are common to every entity
or most instances of a specific entity. Examples of attributes include
name, employee number and pay rate. In this case, these items are
attributes of an employee entity. An attribute that identifies a single
instance of an entity is named the primary key, and is also known as
the identifier. In the example above, the employee number may be
the identifier for the employee entity.
Physical symbols
Physical Symbols
• These symbols represent items in the physical model above such as
fields, tables, types and keys. These are the building blocks of the
database itself.
Notations
ER Diagrams

Entity-relationship diagrams help you conceptualize your


database in advance, saving time and frustration. They
can be modified on-the-fly as the project develops, helping
you stay focused.
Steps in Drawing ERDs
• Step 1: Start by determining the entities that will make up your
diagram. In the case of this cell phone purchase flow, the entities are:
the customer, the type of phone, the bill, and the login.
• Step 2: Next, determine the attributes (or variations) your entities will
have. For the customer, we’ll need to know name, customer id, their
phone number, where they live and the amount they need to pay. Go
through each of your entities and determine what attributes they
need to have.
• Step 3: Determine what kind of relationships govern the interaction
between different entities. Plot them out.
Steps in Drawing ERD
• Step 4: Decide whether the interactions will be one to one, one to
many, many to one etc. and choose the appropriate connectors. You
can either select the appropriate connector types from the shape
library or choose the appropriate tip type once your shapes are
joined.

You might also like