cover-img

Data Models and Database Design

16 April, 2023

0

0

0

Data models play a critical role in describing and organizing data. They provide a clear and concise way of representing complex data. With the help of the Data model, we can capture the important features and relationships within data.

Which makes it easier to understand and work with. It provides a setup for how data is stored, processed, and used in an organization.

Which improves collaboration and communication among team members.

Data models are the logical representations of data entities and their relationships. And, a database is a set of data that can arrange, save, and made accessible using a certain data model.

What are Data Models?

A data model is a logical design step where we analyze data and business requirements. Here we see what is the data type of data, should be the constraints, and others.

Features of Data Models

Some of the key features are

  1. Structure: Data models provide a structured approach for organizing and storing data.
  2. Abstraction: They allow for the simplification of complex data. By ignoring irrelevant details and making it easier to understand and work with data.
  3. Standardization: Data models provide a standardized way to ensure consistency and compatibility.
  4. Scalability: Designs can handle a large amount of data and are scalable as data changes.
  5. Flexibility: Creation and modification of data models. Business needs and data requirements are important factors in flexibility.
  6. Integrity: Ensuring data integrity by enforcing rules and constraints on the data.

Types of Data Models

There are almost a dozen of data models out there. But we will look into 5 types. Because these are fundamental types, others took inspiration from these models

  1. Hierarchical Model
    • In this model, data is organized in form of a tree-like structure. And data are stored as "records" connected through links
      • Record means a collection of related data together in a form of a unit or an entity.
      • A field is a specific single piece of data in a record.
      • For example - There is a shoe on an e-commerce site. Now its size, model name, size, color, images, reviews, and ratings come as a "record". And specifically size, color, and other properties are "field".
    • Each child has only one parent whereas each parent can have one or more values or children.
    • We can apply this data model in many real-world scenarios.
    • There is one major con, which is if there is a value that we have to access but it's at the very end of the tree. Then we have to go through the whole tree to get that value. In other words, we have to traverse the whole tree
      to get that value.
    • IBM's Information Management System (IMS) and the Windows Registry use Hierarchical Model.

      Diagram of Hierarchical Model using Shoe analogy example.
  2. Network model
    • This model, allows each record to have more than one parent and child record. Which forms a generalized graph structure of a hierarchical model.
    • It works very well with small databases but as databases grow they will become more and more complex.
    • Despite this challenge, the Network model is still commonly used in certain scenarios. Like modeling complex social networks or supply chain management.
    • Examples of databases that use the network data model are CA-IDMS and Integrated Data Store (IDS).

      Example of using network data model in social networks
  3. ER (Entity Relationship) Data Model
    • ER model is a kind of conceptual model where we can design the data. What would be important entities, and which type of data is dependent on other data? Is there any relation between entities?
    • This model revolves around mainly two things: Entities and Attributes
      • Entity - It is like any real-world object which has some characters or attributes. For Example - Products have some attributes like color, size, ratings, etc.
      • Attribute - As you assumed, attributes are properties of entities.
    • While creating ER models, we have to use different shapes like ovals, rectangles, diamonds, and many more. Each one has its own importance. Which we will look into later.
    • There are different types of relationships like one-to-many, many-to-many, etc., and constraints.

  4. Relational model
    • This model is based on tables with rows and columns. The structure of this model will look like a collection of relationships with different tables. These tables are called relations.
      • Tuples: Rows in a relation (table) are also called a tuple. There is also the term "cardinality" which number of rows.
      • Attribute: Columns in a relation are attributes. Other names you may hear often are "Degree" and "Arty".
    • Tables are linked using keys to create relationships between different types of data.
      • Primary key: Primary keys are unique properties for records in a table like User_ID, Email, and Contact Number.
      • Foreign Key: These take reference from primary keys and use it to link records.
      • There are other types of keys too, we will discuss that later.
    • Examples of databases that use relational models are MySQL, Oracle, SQL Server, and PostgreSQL.

  5. Object-oriented database model
    • This model organizes data into objects with attributes and methods
    • Objects are defined by classes and can inherit properties from parent classes
    • Example: a customer object with attributes for name, address, and phone number and methods for updating customer information.
    • This model is not adopted widely, It's ok if you don't know about the OOPs concept.
    • But if You want to know more in detail you must read it here.
    • Databases that use an Object-oriented model are ObjectStore and Versant Object Database.

Database Design

A database is like a giant box that can hold lots and lots of information, like names, ages, and addresses. And it holds real-world related objects like customer orders, records, or product information.
The goal of database design is to create a system that makes it easy to find and use the information you need. And being efficient and scalable enough to handle large amounts of data.

You can also say, Database design is like figuring out the best way to organize all of that information so that it's easy to find and use later. You create a plan, that can show all the connected information and its stored destination.

How Data is organized?

This can vary from data to data. For example, If there is an e-commerce site whose main goal is to sell products. So, the data will contain images, text, and video.
And there is another type of platform like Pinterest where the main data is images.

So, these will use different types of data models to return their outputs efficiently.

Stages of Effective Database Design

  1. Conceptual Designing
    • In this step, we create a high-level view of the database. In this stage, we mainly focus on what are the important entities and possible relationships with other data.
    • We try to understand business problems and data requirements. With the help of ER Diagrams, we lay out this conceptual stage.
  2. Logical Designing
    • In this stage, we move from conceptual to logical. Here we actually implement these requirements. Creation of records, setting up constraints, and specifying keys.
    • The logical model adds more detail and focuses on creating a data model that reflects the business rules and requirements of the system.
  3. Physical Designing
    • Now in this stage, as you guessed. We implement logical designing into physical configurations. Physical designing involves optimizing the database for performance, by choosing appropriate hardware and software configurations.
    • The physical design determines how the data will be stored on disk, including partitioning, indexing, and other implementation-specific details.

Conclusion

  • Data models play an important role in organizing and presenting complex data in simple and different ways.
  • There are 5 types of Data Models - Hierarchical, Network, ER, Relational, and Object-oriented Models. The relational model is widely used.
  • Every model has its own advantages and disadvantages. And every model focuses on and solves different problems. The choices of these Data Models depend on the requirements of the organizations.
  • Database Design is a way to organize data. So that we can retrieve it as quickly as possible as per our needs.
  • There are 3 stages in Database Designing - Conceptual, Logical, and Physical Designing.


database

elitewriter

dbms

databasedesign

0

0

0

database

elitewriter

dbms

databasedesign

Sunny Shah
Front End developer | Elite Writer @ShowwcaseHQ

More Articles

Showwcase is a professional tech network with over 0 users from over 150 countries. We assist tech professionals in showcasing their unique skills through dedicated profiles and connect them with top global companies for career opportunities.

© Copyright 2025. Showcase Creators Inc. All rights reserved.