Systems Analysis and Design · Unit 6
Data Modeling and Database Design
Exam-focused notes for Data Modeling and Database Design (Systems Analysis and Design, BIT253): what the TU syllabus asks and how it has actually been tested, with 6 solved past questions from this unit.
Data Modeling and Database Design in short
Every system stores data. This chapter shows how to model data with entity-relationship diagrams. It then turns the model into tables, cleans them by normalization, and tunes them for speed.
What this unit covers
- Data modeling definition
- Entity-relationship diagram purpose and examples
- Conceptual data model
- Logical database design
- Physical database design
- Normalization definition
- First normal form
- Second normal form
- Index creation factors
- Goals of designing physical tables
- Object-oriented database benefits
- Object identity
Normalization definition
2082 · 5 marks
Define normalization. Explain first and second form of normalization. [1+4]
Show solved answerHide answer
Normalization
Definition
Normalization is the process of organizing the attributes and relations of a relational database to minimize data redundancy, eliminate undesirable insertion, deletion, and update anomalies, and ensure data integrity by decomposing larger tables into smaller, well-structured tables based on functional dependencies.
First Normal Form (1NF)
A relation is said to be in First Normal Form (1NF) if:
- All attributes contain only atomic (indivisible) values (no multi-valued or composite attributes).
- Each column contains values of a single type.
- Each row is unique (there is a primary key).
- There are no repeating groups or arrays in any column.
Example
Not in 1NF (multi-valued attribute):
| StudentID | Name | Courses |
|---|---|---|
| 1 | Ram | Math, Science |
| 2 | Sita | English |
Converted to 1NF:
| StudentID | Name | Course |
|---|---|---|
| 1 | Ram | Math |
| 1 | Ram | Science |
| 2 | Sita | English |
Now each cell holds only one atomic value.
Second Normal Form (2NF)
A relation is said to be in Second Normal Form (2NF) if:
- It is already in 1NF, AND
- Every non-key attribute is fully functionally dependent on the entire primary key (i.e., there is no partial dependency).
Partial Dependency: A non-key attribute depends on only a part of a composite primary key, not the whole key.
2NF is relevant only when the primary key is composite (made up of two or more attributes).
Example
In 1NF but NOT in 2NF:
| StudentID | CourseID | StudentName | CourseName | Grade |
|---|---|---|---|---|
| 1 | C01 | Ram | Math | A |
| 1 | C02 | Ram | Science | B |
| 2 | C01 | Sita | Math | A |
- Primary Key: (StudentID, CourseID)
StudentNamedepends only onStudentID(partial dependency)CourseNamedepends only onCourseID(partial dependency)Gradedepends on bothStudentIDandCourseID(full dependency)
Converted to 2NF (remove partial dependencies):
Student Table:
| StudentID | StudentName |
|---|---|
| 1 | Ram |
| 2 | Sita |
Course Table:
| CourseID | CourseName |
|---|---|
| C01 | Math |
| C02 | Science |
Enrollment Table:
| StudentID | CourseID | Grade |
|---|---|---|
| 1 | C01 | A |
| 1 | C02 | B |
| 2 | C01 | A |
Now every non-key attribute is fully dependent on the entire primary key.
Summary
| Normal Form | Condition |
|---|---|
| 1NF | No multi-valued or composite attributes; all values atomic |
| 2NF | In 1NF + No partial dependency on composite primary key |
Index creation factors
2081 · 5 marks
What factors influence the decision to create an index on a field? What are the goals of designing physical tables? [3+2]
Logical database design
2080 · 5 marks
Define conceptual data model. Explain logical database design in brief. [5]
Show solved answerHide answer
Conceptual Data Model and Logical Database Design
Conceptual Data Model (2 marks)
A conceptual data model is a high-level, abstract representation of the data requirements of an organization, independent of any specific database management system (DBMS) or physical implementation details.
It describes what data is stored, the relationships among data, and the constraints on data, without concerning itself with how the data will be physically stored or accessed.
Key characteristics:
- Technology and DBMS independent
- Focuses on entities, attributes, and relationships
- Expressed using tools like Entity-Relationship (ER) diagrams
- Understandable by both technical and non-technical stakeholders
Example: An ER diagram showing Student, Course, and Enrollment entities with their relationships is a conceptual data model.
Logical Database Design (3 marks)
Logical database design is the process of translating the conceptual data model into a logical structure that can be implemented in a specific type of DBMS (such as a relational DBMS), but still independent of the physical storage details.
Steps in Logical Database Design:
-
Mapping Entities to Tables (Relations)
- Each entity in the ER diagram is converted into a relation (table).
- Attributes of the entity become columns of the table.
-
Defining Primary Keys
- A unique identifier (primary key) is assigned to each table to uniquely identify each record.
-
Handling Relationships
- One-to-Many: The primary key of the "one" side is placed as a foreign key in the "many" side table.
- Many-to-Many: A new junction/associative table is created with foreign keys from both related tables.
- One-to-One: Foreign key is placed in either of the two tables.
-
Normalization
- The logical schema is refined by applying normalization (1NF, 2NF, 3NF, etc.) to eliminate data redundancy and update anomalies.
-
Defining Integrity Constraints
- Entity integrity, referential integrity, and domain constraints are defined.
Output of Logical Design:
A set of relation schemas with defined attributes, primary keys, and foreign keys, ready to be implemented in a relational DBMS.
Example:
Student (StudentID, Name, Address)
Course (CourseID, CourseName, Credits)
Enrollment (StudentID, CourseID, Grade)
Note: Logical design bridges the gap between the abstract conceptual model and the physical implementation, ensuring data is organized efficiently and consistently.
Data modeling definition
2079 · 5 marks
What is data modeling? Draw an ER diagram to keep records of students, courses, and grades at your college. [5]
Object-oriented database benefits
0 · 5 marks
What are the benefits of object-oriented database? What is object identity? [5]
Entity-relationship diagram purpose and examples
0 · 5 marks
Why do we need ER diagram during information system development? Explain with example. [5]
Make Unit 6 stick
Practice BIT253 with flashcards & quizzes