Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • Aptitude
  • Engineering Mathematics
  • Discrete Mathematics
  • Operating System
  • DBMS
  • Computer Networks
  • Digital Logic and Design
  • C Programming
  • Data Structures
  • Algorithms
  • Theory of Computation
  • Compiler Design
  • Computer Org and Architecture
Open In App
Next Article:
Design of Parallel Databases | DBMS
Next article icon

Database Design in DBMS

Last Updated : 24 Sep, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

Before designing a database, it's crucial to understand important terms and concepts. A properly structured database guarantees efficiency, data accuracy, and usability. From understanding data storage to the principles that define data relationships, these concepts are essential for anyone involved in designing, managing, or optimizing databases.

Whether you are new to database design or an experienced professional, these fundamental ideas serve as the building blocks for creating strong and scalable database systems.

What is database design?

Database Design can be defined as a set of procedures or collection of tasks involving various steps taken to implement a database.A good database design is important. It helps you get the right information when you need it. Following are some critical points to keep in mind to achieve a good database design:

  1. Data consistency and integrity must be maintained.
  2. Low Redundancy
  3. Faster searching through indices
  4. Security measures should be taken by enforcing various integrity constraints.
  5. Data should be stored in fragmented bits of information in the most atomic format possible.

However, depending on specific requirements above criteria might change. But these are the most common things that ensure a good database design.

What are the Following Steps that can be taken by a Database Designer to Ensure Good Database Design?

Step 1: Determine the goal of your database, and ensure clear communication with the stakeholders (if any). Understanding the purpose of a database will help in thinking of various use cases & where the problem may arise & how we can prevent it.

Step 2: List down all the entities that will be present in the database & what relationships exist among them.

Step 3: Organize the information into different tables such that no or very little redundancy is there.

Step 4: Ensure uniqueness in every table. The uniqueness of records present in any relation is a very crucial part of database design that helps us avoid redundancy. Identify the key attributes to uniquely identify every row from columns. You can use various key constraints to ensure the uniqueness of your table, also keep in mind the uniquely identifying records must consume as little space as possible & shall not contain any NULL values.

Step 5: After all the tables are structured, and information is organized apply Normalization Forms to identify anomalies that may arise & redundancy that can cause inconsistency in the database.

Primary Terminologies Used in Database Design

Following are the terminologies that a person should be familiar with before designing a database:

  • Redundancy: Redundancy refers to the duplicity of the data. There can be specific use cases when we need or don't need redundancy in our Database. For ex: If we have a banking system application then we may need to strictly prevent redundancy in our Database.
  • Schema: Schema is a logical container that defines the structure & manages the organization of the data stored in it. It consists of rows and columns having data types for each column.
  • Records/Tuples: A Record or a tuple is the same thing, basically its where our data is stored inside a table
  • Indexing: Indexing is a data structure technique to promote efficient retrieval of the data stored in our database.
  • Data Integrity & Consistency: Data integrity refers to the quality of the information stored in our database and consistency refers to the correctness of the data stored.
  • Data Models: Data models provide us with visual modeling techniques to visualize the data & the relationship that exists among those data. Ex: model, Network Model, Object Oriented Model, Hierarchical model, etc.
  • Normalization: The process of organizing data to reduce redundancy and dependency by dividing larger tables into smaller ones and defining relationships. It ensures data storage and consistency.
  • Functional Dependency: Functional Dependency is a relationship between two attributes of the table that represents that the value of one attribute can be determined by another. Ex: {A -> B}, A & B are two attributes and attribute A can uniquely determine the value of B.
  • Transaction: Transaction is a single logical unit of work. It signifies that some changes are made in the database. A transaction must satisfy the ACID or BASE properties (depending on the type of Database).
  • Schedule: Schedule defines the sequence of transactions in which they're executed by one or multiple users.
  • Concurrency: Concurrency refers to allowing multiple transactions to operate simultaneously without interfering with one another.
  • Constraints: Constraints are the rules applied to fields in a table to enforce data integrity. e.g., NOT NULL, UNIQUE, CHECK, etc. It ensures data quality and accuracy.

Database Design Lifecycle

The database design lifecycle goes something like this:

db-design
Lifecycle of Database Design

1. Requirement Analysis

It's very crucial to understand the requirements of our application so that you can think in productive terms. And imply appropriate integrity constraints to maintain the data integrity & consistency.

2. Logical & Physical Design

This is the actual design phase that involves various steps that are to be taken while designing a database. This phase is further divided into two stages:

  • Logical Data Model Design: This phase consists of coming up with a high-level design of our database based on initially gathered requirements to structure & organize our data accordingly. A high-level overview on paper is made of the database without considering the physical level design, this phase proceeds by identifying the kind of data to be stored and what relationship will exist among those data.
    Entity, Key attributes identification & what constraints are to be implemented is the core functionality of this phase. It involves techniques such as Data Modeling to visualize data, normalization to prevent redundancy, etc.
  • Physical Design of Data Model: This phase involves the implementation of the logical design made in the previous stage. All the relationships among data and integrity constraints are implemented to maintain consistency & generate the actual database.

3. Data Insertion and testing for various integrity Constraints

Finally, after implementing the physical design of the database, we're ready to input the data & test our integrity. This phase involves testing our database for its integrity to see if something got left out or, if anything new to add & then integrating it with the desired application.

Logical Data Model Design

The logical data model design defines the structure of data and what relationship exists among those data. The following are the major components of the logical design:

1. Data Models: Data modeling is a visual modeling technique used to get a high-level overview of our database. Data models help us understand the needs and requirements of our database by defining the design of our database through diagrammatic representation. Ex: model, Network model, Relational Model, object-oriented data model.

Data-Models
Data Models

2. Entity: Entities are objects in the real world, which can have certain properties & these properties are referred to as attributes of that particular entity. There are 2 types of entities: Strong and weak entity, weak entity do not have a key attribute to identify them, their existence solely depends on one 1-specific strong entity & also have full participation in a relationship whereas strong entity does have a key attribute to uniquely identify them.

Weak entity example: Loan -> Loan will be given to a customer (which is optional) & the load will be identified by the customer_id to whom the lone is granted.

3. Relationships: How data is logically related to each other defines the relationship of that data with other entities. In simple words, the association of one entity with another is defined here.

A relationship can be further categorized into - unary, binary, and ternary relationships.

  • Unary: In this, the associating entity & the associated entity both are the same. Ex: Employee Manages themselves, and students are also given the post of monitor hence here the student themselves is a monitor.
  • Binary: This is a very common relationship that you will come across while designing a database.
    Ex: Student is enrolled in courses, Employee is managed by different managers, One student can be taught by many professors.
  • Ternary: In this, we have 3 entities involved in a single relationship. Ex: an employee works on a project for a client. Note that, here we have 3 entities: Employee, Project & Client.

4. Attributes: Attributes are nothing but properties of a specific entity that define its behavior. For example, an employee can have unique_id, name, age, date of birth (DOB), salary, department, Manager, project id, etc.

5. Normalization: After all the entities are put in place and the relationship among data is defined, we need to look for loopholes or possible ambiguities that may arise as a result of CRUD operations. To prevent various Anomalies such as INSERTION, UPDATION, and DELETION Anomalies.

Data Normalization is a basic procedure defined for databases to eliminate such anomalies & prevent redundancy.

An Example of Logical Design

logical-design
Logical Design Example

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.

Following are the steps taken in physical design

Step 1: Entities are converted into tables or relations that consist of their properties (attributes)

Step 2: Apply integrity constraints: establish foreign key, unique key, and composite key relationships among the data. And apply various constraints.

Step 3: Entity names are converted into table names, property names are translated into attribute names, and so on.

Step 4: Apply normalization & modify as per the requirements.

Step 5: Final Schemes are defined based on the entities & attributes derived in logical design.

physical-design
Physical Design

Conclusion

In conclusion, a good database design is an essential part of a strong database management system (DBMS). It provides the basis for data governance, data storage, and data retrieval. The quality of a database has a direct impact on a system’s overall performance and dependability. It is important to consider data organization, standardization, performance, integrity, and more when designing a database to meet the needs of your organization and your users.


Next Article
Design of Parallel Databases | DBMS
author
dotslash_adwitiya
Improve
Article Tags :
  • DBMS
  • Geeks Premier League
  • Geeks Premier League 2023

Similar Reads

  • NoSQL Database Design
    In the world of modern data management, NoSQL databases have emerged as powerful alternatives to traditional relational databases. NoSQL, which stands for "Not Only SQL" have a diverse set of database technologies designed to handle large volumes of unstructured, semi-structured, and structured data
    4 min read
  • Design of Parallel Databases | DBMS
    A parallel DBMS is a DBMS that runs across multiple processors or CPUs and is mainly designed to execute query operations in parallel, wherever possible. The parallel DBMS link a number of smaller machines to achieve the same throughput as expected from a single large machine. In Parallel Databases,
    3 min read
  • Database Languages in DBMS
    Databases are essential for efficiently storing, managing, and retrieving large volumes of data. They utilize both software and hardware components. The software provides an interface that enables users or applications to interact with the database, while the hardware consists of servers and storage
    10 min read
  • Significance of Database Design
    A database refers to the collection of data (files and records) which is stored and can be manipulated using a software named Database Management Systems. In the previous days where no technical developments took place, data was stored in form of files. Due to its drawbacks of storage and manipulati
    2 min read
  • Database Design Fundamentals
    Database design is important for managing and organizing data effectively. It ensures data is stored efficiently, retrieved quickly, and maintained consistently. A well-designed database significantly enhances the performance and usability of applications. In this article we will explore the basics
    5 min read
  • Data Isolation in DBMS
    In today's era effectively managing volumes of data is crucial, for businesses and organizations. Database Management Systems (DBMS) play a role in this aspect by providing tools to store, retrieve, and manipulate data. However when multiple users are. Their transactions interact with the data simul
    5 min read
  • Denormalization in Databases
    Denormalization focuses on combining multiple tables to make queries execute quickly. It adds redundancies in the database though. In this article, we’ll explore Denormalization and how it impacts database design. This method can help us to avoid costly joins in a relational database made during nor
    6 min read
  • ISAM in Database
    Indexed Sequential Access Method (ISAM) is one of the critical indexing approaches in database management, which enhances fast data retrieval and assures an easy way of managing the database. This article is going to take a look at the underlying theme, makeup, performance, benefits, faults, and dif
    7 min read
  • Instance in Database
    An instance shows the data or information that is stored in the database at a specific point in time. In this article we will come to know about, what is Instances in databases. We will see two examples related to it as well. But first of all, let us know about some terminologies related to it. Prim
    3 min read
  • Data Models in DBMS
    A Data Model in Database Management System (DBMS) is the concept of tools that are developed to summarize the description of the database. Data Models provide us with a transparent picture of data which helps us in creating an actual database. It shows us from the design of the data to its proper im
    8 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences