Skip to content

Primary-Design-Approaches

When building a database for an organization, there are two primary Design Approaches (āĻĄāĻŋāϜāĻžāχāύ āĻĒāĻĻā§āϧāϤāĻŋāϏāĻŽā§‚āĻš) to make sure the data is structured cleanly without errors:

Primary-Design-Approaches

1. Normalization Theory (āύāϰāĻŽāĻžāϞāĻžāχāĻœā§‡āĻļāύ āϤāĻ¤ā§āĻ¤ā§āĻŦ)

  • Core Concept: Formalizes (āύāĻŋāĻ°ā§āĻĻāĻŋāĻˇā§āϟ āύ⧀āϤāĻŋāĻŽāĻžāϞāĻžāϝāĻŧ āϰ⧂āĻĒ āĻĻ⧇āϝāĻŧ) what makes a database design "bad" and provides formal mathematical tests to detect and fix those flaws.

  • Goal: To eliminate data redundancy (āĻĄā§āĻĒā§āϞāĻŋāϕ⧇āϟ āĻĄā§‡āϟāĻž) and prevent update anomalies (āϤāĻĨā§āϝ āĻĒāϰāĻŋāĻŦāĻ°ā§āϤāύ⧇āϰ āϏāĻŽāϝāĻŧ āϭ⧁āϞ āĻšāĻ“āϝāĻŧāĻž).

  • Real-life Example:
  • If you put Student Info, Course Info, and Teacher Info all inside one giant table, every time 50 students take the same course, the teacher's name and phone number get written 50 times.
  • Normalization tests this messy table, identifies that it is a bad design, and splits it into three clean, linked tables: Students, Courses, and Teachers.

2. Entity-Relationship (ER) Model (āϏāĻ¤ā§āϤāĻž-āϏāĻŽā§āĻĒāĻ°ā§āĻ• āĻŽāĻĄā§‡āϞ)

  • Core Concept: Represents an entire enterprise (āĻĒā§āϰāϤāĻŋāĻˇā§āĻ āĻžāύ āĻŦāĻž āϏāĻ‚āĻ¸ā§āĻĨāĻž) as a collection of real-world objects (Entities) and the connections (Relationships) between them.

  • Key Components:

  • Entity (āϏāĻ¤ā§āϤāĻž): A "thing" or "object" in the organization that is distinguishable (āφāϞāĻžāĻĻāĻžāĻ­āĻžāĻŦ⧇ āĻšā§‡āύāĻž āϝāĻžāϝāĻŧ āĻāĻŽāύ) from other objects.

  • Example: A specific Student, a Teacher, an Account, or a Product.

  • Attributes (āĻŦ⧈āĻļāĻŋāĻˇā§āĻŸā§āϝāϏāĻŽā§‚āĻš): Properties that describe the entity.

  • Example: A Student entity is described by attributes like Roll_Number, Name, Department, and Date_of_Birth.

  • Relationship (āĻĒāĻžāϰāĻ¸ā§āĻĒāϰāĻŋāĻ• āϏāĻŽā§āĻĒāĻ°ā§āĻ•): An association (āϝ⧋āĻ—āϏ⧂āĻ¤ā§āϰ/āϏāĻ‚āϝ⧋āĻ—) among several entities.

  • Example: A Student entity and a Course entity are connected by the relationship "Enrolls In". A Doctor and a Patient are connected by "Treats".

  • Entity-Relationship Diagram (ER Diagram): The entire model is represented diagrammatically (āϚāĻŋāĻ¤ā§āϰ⧇āϰ āĻŽāĻžāĻ§ā§āϝāĻŽā§‡) using standard shapes:

  • Rectangles: Entities (e.g., Student, Course)

  • Ovals / Ellipses: Attributes (e.g., Name, ID)
  • Diamonds: Relationships (e.g., Enrolls)

How Both Approaches Work Together

  1. Step 1 (ER Model - Top-Down): You first draw an ER Diagram to visualize the whole system and create your initial tables.

  2. Step 2 (Normalization - Bottom-Up): You test those tables using Normalization rules to find flaws, remove duplicate fields, and confirm the design is clean.