Database design process

 Topic Outline

Logical Database Design Process
Physical Database Design Process

Logical Database Design Process

Logical database design is as follows:


1: Represent Entities

An entity is a thing, person, place, object, or any item about which the data should be stored in the database. In the relational model, each entity in an Entity-Relationship diagram is represented as a relation. The name of an entity becomes the name of the relation. The identifier of the entity becomes the primary key of the relation. The remaining attributes of the entity become non-key attributes of the relation. 

The below example explains the process of converting an entity into a relation.

A student is an entity. The attribute of a student is student Name, Address, Department, Student-ID. 

Shape 

Figure: STUDENT Entity

Student-ID 

Name 

Address 

Department 


Figure: STUDENT Relation

In the above example, the STUDENT entity is converted into a relation. The attribute of the STUDENT entity are fields of the relation. The data model describes STUDENT-ID as a primary key and is underlined.

2: Represent Relationships

Each relationship in an Entity Relation diagram must also be represented in the relational model. A relationship is made between two tables when one table uses a foreign key that references the primary key of another table. 
Sometimes, a separate relation is created to represent a relationship. A primary key identifiers each record in the table and a foreign key is another candidate key that is used to link a record to data in another table.

3: Merge the Relation

Sometimes there may be redundant relations. Redundant means duplication of data in both relations. The redundant table must be merged to remove the redundancy.

There are two relations as follow:

STU1 (STU-ID, NAME, ADDRESS, DEPARTMENT)

STU2 (STU-ID, STU-NAME, STU-ADDRESS, STU-DEPARTMENT, STU-PHONE NO)

STUDENT 1 RELATION

STU-ID 

Name 

Address 

Department 


STUDENT 2 RELATION

STU-ID 

STU-Name 

STU-Address 

STU-Department 

STU-Phone no 

The above tables STU1 and STU2 describe the same entity STUDENT. So, they can be merged into one relation. The result after merging relation is as follows:

STU (STU-ID, NAME, ADDRESS, DEPARTMENT, PHONE NO)

STU-ID 

Name 

Address 

Department 

Phone no 

New relation contains both relations attributes without repeating attributes.

4: Normalize the Relation

The relations created STU1 and STU2 step may have some unnecessary redundancy. Some anomalies or errors may arise while updating these relations. So, the normalization process refines these relations to avoid these problems.

Physical Database Design Process
Components of Physical Database Design

Components of physical database design are as follows:

1: Data Volume and Usage Analysis

Data volume is used to estimate the size or volume of the database. The database size is used to choose the physical storage devices. The estimated size is also used to determine the cost of storage. The estimate of database usage patterns is used to choose file organization and access methods. 

2: Data Distribution Strategy

Distributed computer networks are used by many organizations. Organizations face a significant problem in the physical database design. The problem is that they have to decide and choose sites in the network at which data will be located physically.

  • Centralized Strategy

In a centralized strategy, all data is located at a single site. In this strategy, data is easy to manage. 

  • Partitioned Strategy

In the partition strategy, the database is divided into fragments. Each fragment is assigned to a specific site. The major advantage of the partition strategy is that data is moved closer to the local user. 

  • Replicated Strategy

In replicated strategy, a full copy of the database is assigned to more than one site in the network.

  • Hybrid Strategy

In a hybrid strategy, the database is divided into critical and non-critical fragments. Critical fragments are stored at different sites and non-critical fragments are stored at one site.

3: File Organization

File organization is a technique used for arranging the records of a file on secondary storage devices. Several constraints are recognized for selecting a file organization.

File Organization Method

4: Indexes

It is a table that is used to determine the location of rows in a table. It is used to speed up the sorting and searching process. When we use an index, the performance of the database is improved. 

5: Integrity Constraints

Integrity means the correctness and consistency of data. Integrity constraints are another form of data protection. With the help of integrity constraints, the integrity is maintained. Constraints are the rules that are designed to keep data correct and consistent. These constraints act as a checker on the incoming data. The database management system provides several mechanisms to enforce the integrity of data.








Comments

Popular Posts

Computer Abbreviation

Transport Layer

Introduction to Database

Types of database

Threads in operating system

Display devices

Shortcut keys of computer

History of Computer