0% found this document useful (0 votes)
38 views6 pages

Database Design

Uploaded by

patilvilohith20
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views6 pages

Database Design

Uploaded by

patilvilohith20
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Database Design Notes

1. Entity-Relationship Model (ER Model)


• Entities:
o Objects or things in the real world that
have an independent existence and are
distinguishable.
o Example: In a university database,
entities could be Student, Course,
Professor.
• Attributes:
o Properties or characteristics of an entity.
o Example: Student entity might have
attributes like StudentID, Name, DOB,
Major.
• Relationships:
o Associations between entities.
o Example: A Student enrolls in a Course, a
Professor teaches a Course.
• ER Diagrams:
o A visual representation of entities,
attributes, and relationships.
o Key elements:
▪ Rectangles: Represent entities.
▪ Ovals: Represent attributes.
▪ Diamonds: Represent relationships.
▪ Lines: Connect entities to
relationships and attributes to
entities.
2. Normalization
• Functional Dependencies:
o A relationship between two attributes,
typically between a key and non-key
attributes.
o Example: StudentID → Name, DOB,
Major means the Name, DOB, and Major
depend on StudentID.
• First Normal Form (1NF):
o Ensures that the table has no repeating
groups or arrays.
o Each column contains atomic (indivisible)
values, and each record is unique.
• Second Normal Form (2NF):
o Achieved when the table is in 1NF, and all
non-key attributes are fully functionally
dependent on the primary key.
o Removes partial dependencies
(dependencies on a part of a composite
key).
• Third Normal Form (3NF):
o Achieved when the table is in 2NF, and all
the attributes are functionally dependent
on the primary key and non-transitively
dependent.
o Removes transitive dependencies
(dependencies between non-key
attributes).
• Boyce-Codd Normal Form (BCNF):
o A stricter version of 3NF where every
determinant is a candidate key.
o Ensures that no anomalies are present by
enforcing that every non-trivial functional
dependency has a superkey as its
determinant.
• Higher Normal Forms:
o 4NF: Eliminates multi-valued
dependencies.
o 5NF: Deals with join dependencies,
ensuring that any lossless decomposition
is possible without introducing
redundancy.
3. Design Process
• Steps in Database Design:
a.Requirement Analysis:
▪ Understand and document the data
needs of the stakeholders.
b.Conceptual Design:
▪ Create an ER diagram based on the
requirements.
c.Logical Design:
▪ Convert the ER diagram into a
relational schema.
d.Normalization:
▪ Apply normalization to the schema to
reduce redundancy and improve data
integrity.
e.Physical Design:
▪ Define the physical storage structure,
indexes, and access paths.
f.Implementation:
▪ Create the database using a DBMS
and implement the schema.
• Schema Refinement:
o The process of iteratively improving the
database schema to remove anomalies
and improve performance.
o Involves normalizing the schema,
optimizing queries, and making trade-offs
between normalization and performance.
• Normalization Process:
o An ongoing process throughout the
design to ensure data integrity, reduce
redundancy, and prevent update
anomalies.
o Involves decomposing tables based on
functional dependencies and ensuring
that the design meets the desired normal
form.
These notes provide an overview of key
concepts and steps in database design,
focusing on the Entity-Relationship
model, normalization, and the design
process.

You might also like