0% found this document useful (0 votes)
10 views5 pages

Chapter 5 DB Student Module

The document discusses physical database design. It describes the process of physical database design which includes 5 steps: 1) identifying entities and attributes, 2) identifying relationships between entities, 3) assigning data types to attributes, 4) implementing many-to-many relationships with junction tables, and 5) adding constraints, triggers and other database objects. It also discusses the three levels of database design - conceptual, logical, and physical.

Uploaded by

Firomsa Dine
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)
10 views5 pages

Chapter 5 DB Student Module

The document discusses physical database design. It describes the process of physical database design which includes 5 steps: 1) identifying entities and attributes, 2) identifying relationships between entities, 3) assigning data types to attributes, 4) implementing many-to-many relationships with junction tables, and 5) adding constraints, triggers and other database objects. It also discusses the three levels of database design - conceptual, logical, and physical.

Uploaded by

Firomsa Dine
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/ 5

Chapter – 5

Physical Database Design

Database Design and Implementation of Relational Database:

Database Design:

It is a collection of tasks that enhance the designing, development,


implementation and maintenance of the enterprise data management
system.

Designing a proper database that reduces the maintenance cost


thereby improving data consistency.

Main objective behind database designing is to produce physical and


logical database design of the proposed system.

Why database design?

It provides the blueprint of how the data is going to be stored in a


system.

A proper design will improve the overall performance of any


application.

Database Designing Process:

Step 1: Identifying entities:

This step is a part of conceptual data modeling. Here we


decide data group according to the business rules.

Eg: For grocery database the entities are product,


customer, order.

Step 2: Identifying connection between entities:

It is also part of conceptual data modeling. Here we decide


the relationships between entities.

In our example, each customer would have one or more


orders, each order have more product.

1 n
Customer Orders
n

n
Products
Step 3: Identifying the entities attribute

This step is part of logical database design. Each entity is


assigned its attribute it become the base for physical database design.

Eg: For Customer the attributes are custid, custname,


contactno, email etc.

Step 4: Deciding attributes specific data type:

This step is part of physical database design. Here we


assign data type for attribute.

Eg: For custid data type is integer, custname is varchar.

Step 5: Identifying many to many relationship and implementing


junction table.

This step is also part of physical database design. Here we


create an additional table that stores many to many relationship data.

Eg: Each order has more products at same time and each
product can be ordered zero/more times.

In addition to customer, product, order new table/entity


is created order_product.

Step 6: Creating database constraints, trigger and other specific


database object.

Order_Product
Product
Orderid int FK
Prodid int PK
Prodid int FK
Prodname varchar(45)

Instock int

Orders

Orderid int PK

Custid int FK
PK – Primary Key

FK – Foreign Key

Customer

Custid int PK

Custname Varchar(45)
Levels of Database Design:

It is of three levels/stages:

a. Conceptual database design:

It is most abstract data model, that describes the data


elements without much detail.

b. Logical database design:

A conceptual data model with more technical details.

c. Physical database design:

A logical database design with all details like data type,


constraints, index, schema etc.

Conceptual database design:

It focuses on identifying the entities and the connection between


the entities.

It is strictly abstract representation of data. It is created by data


architects to present high level data overview.

Eg: For zoo database the entities are zoo_employee, zoo_animal,


animal_species, food_type, food_production.

Relationship:

Each employee will be caretaker for one / more animal.

Each animal will have one caretaker.

Zoo animal has multiple species and vice versa.

Each zoo animal will have specific food type.

Food type has different food production.

1 n n 1 Animal_Species
Zoo_Employee Zoo_Animal
n

Food_Type
1 n

n
Food_Production
Logical database design:

It assign attribute to each entity and specifies the database


implementation details. It is a base for physical database design.

Zoo_Employee Zoo_Animals Animal_Species

Empid int M Animalid int M Speciesid int M


1 n n 1
Empname varchar(45) Speciesid int Speciename varchar(50)

Salary int

Contactno big int

Food_Type
1
F_Typeid int M
M- Mandatory
F_Typename varchar(50)

Food_Production

FPid int M

F_Typeid int

FPname varchar(40)

Physical database design:

It include data type, triggers, constraints and more.

It include Primary key and foreign key.


Zoo_Employee Zoo_Animals Animal_Species

Empid int PK Animalid int PK Speciesid int PK


1 n n 1
Empname varchar(45) Speciesid int FK Speciename varchar(50)

Salary int

Contactno big int

Food_Type
1
F_Typeid int PK
PK- Primary key
F_Typename varchar(50)
FK – Foreign key Animalid int FK

n
Food_Production

FPid int PK

F_Typeid int FK

FPname varchar(40)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy