Lec-21: First Normal form in DBMS in HINDI | 1st Normal form क्या होती है ?
First Normal Form Explained
Introduction to First Normal Form
- The discussion begins with an introduction to the First Normal Form (1NF), a fundamental concept in database management systems (DBMS).
- EF Codd, recognized as the father of DBMS, established the rules for 1NF, emphasizing that tables should not contain multivalued attributes.
Understanding Multivalued Attributes
- An example is provided using a student table where a single attribute contains multiple values (e.g., courses enrolled by a student).
- The speaker highlights that having more than one value for an attribute violates 1NF, making the table representation incorrect.
Identifying Non-compliance with 1NF
- The current representation of students and their courses is analyzed; it is concluded that the table does not comply with 1NF due to multiple course entries for individual students.
- If presented with such a table in exams like GATE, one can confidently state it does not meet 1NF criteria.
Solutions to Achieve First Normal Form
Solution One: Row Duplication
- The first solution involves creating separate rows for each course enrollment. For instance, roll number '1' would have two entries: one for C and another for C++.
- A composite primary key is suggested combining roll number and course since neither alone can serve as a unique identifier due to repetition.
Solution Two: Separate Columns for Courses
- The second approach creates additional columns (Course One and Course Two), accommodating up to two courses per student.
- Null values are introduced when a student enrolls in fewer than two courses; this method may lead to excessive null representations across the table.
Solution Three: Base Table and Referencing Table
- The third solution proposes splitting data into two tables: a base table containing roll numbers and names, and a referencing table linking roll numbers with their respective courses.
- In this structure, the primary key remains as roll number in the base table while serving as a foreign key in the referencing table.
Conclusion on Primary Keys
Understanding First Normal Form in Database Design
Key Concepts of First Normal Form
- The discussion begins with the concept of representing student enrollment in multiple courses while maintaining a single entry per student in the base table, illustrating the principle of First Normal Form (1NF).
- In 1NF, each table should have unique entries for each record; thus, even if a student is enrolled in several courses, there will only be one corresponding entry in the database.
- This representation ensures that data is organized efficiently and reduces redundancy, which is a fundamental goal of normalization in database design.
- The speaker emphasizes that having multiple course enrollments does not necessitate multiple entries for a single student within the base table structure.