2.2. First Normal Form (1NF)

Consider a requirement to maintain data about class schedules. We are required to keep the course, section, department name, time, room, room size, professor, student, major, and grade. Suppose that we initially set up a Pascal file with records that look like this:

Classes = RECORD
          course: ARRAY [1:7] OF CHAR;
         section: CHAR;
            time: INTEGER;
            room: INTEGER;
        roomsize: INTEGER;
       professor: ARRAY [1:25] OF CHAR;
      dept_name: ARRAY [1:10] OF CHAR;
        students: ARRAY [1:classsize]
                  OF RECORD
                     student ARRAY [1:25] OF CHAR;
                     major ARRAY [1:10] OF CHAR;
                     grade CHAR;
                     END;
          END;

This table is not in the most basic normal form of relational databases. First Normal Form (1NF) means that the table has no repeating groups. That is, every column ...

Get Joe Celko's SQL for Smarties, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.