//////
Nowadays databases are used in every field. It is a way of storing information in
an organized way so that required data can be accessed quickly. Database
Design is a process of designing, creating, implementing and maintaining a
database.A designed database is easy to maintain,modify and ensure data
consistency.
Why we need database design
A good designed database is important because it gives us correct and
up-to-date information that helps to use data in an efficient way when needed /
and attain goals in working with the database . Also a good database design
helps to meet/ full fill requirements and can easily be changed . The main goal of
database design is to produce a design model for a certain database system.
Process of database design
For a good database design we must be careful about two major concerns
which is Redundancy and Incompleteness.
Redundancy
Redundancy means repetition of information or duplicate information in the
database. Redundancy is considered bad because it wastes space, increases
the possibility of inconsistency and error. Inconsistency can be introduced in a
way that if a copy of duplicate information got updated without updating all the
copies of information it will result in inconsistency among the copies of
information.To have a good database design redundancy must be avoided .
Incompleteness
Correctness and completeness of information is a must. Information is taken
from the database and used to make certain decisions. So incompleteness
can lead to bad design.
Database design follows two key models logical and Physical model
The actual database designing takes into account two key models:
● Logical model: In logical model we first plan about the database on
paper and create a database model using the basic requirements . No
physical implementation is done.
● Physical model: In this stage logical model is implemented,
Process of database design
Determine the purpose of your database
Basically we create databases for maintaining information of certain
institutions like universities ,banks , and business companies. So at first
we need to understand what purpose the database will surve and who will
use it . we have to know/identify the requirements of the user and
according to it we have to structure the database.
Find and organize the information required
Then we have to collect information that will be stored in the database.
Divide the information into tables
After collecting necessary information we have to divide them under entities.
Each database has certain entities like for a database for university, entities will
be department,course,instructors,students,sections classroom etc. Entities which
have the same attributes are listed together and called entity set or table.
Turn information items into columns
Each entity has some fixed features or properties which are called
attributes. Attributes are the fields and shown as header of columns in a
table.For university database department table will have attributes like
department name, course id,title,credits.
Specify primary keys
A attribute or a set of attributes which can uniquely identify an entity is
called a primary key. Every table has a primary key. For instance student id
or student id and name together can be used as the primary key for the
student table in university database.
Set up the table relationships
Relationship will be established among tables when common attributes are
found or primary key of one table is included in another table
Refine your design
In this step we have to insert sample data in database and examine it by
creating queries.
Apply the normalization rules
By applying normalization data redundancy and unwanted characteristics
is removed from the database.
The two most common techniques used to design a database include:
● Normalization: Tables are organized in such a way that it decreases
data redundancy and dependency. Larger tables are divided into
smaller tables and are linked together using relationships.
● Entity-Relationship (ER) Modeling: It’s a graphical database design
approach that models entities, their attributes, and defines
relationships among these entities to signify real-life objects. An
entity is any real-world item that’s different or unique from the
surroundings.