Home > Net >  1st normalized form
1st normalized form

Time:09-08

I need a better understanding of first normalized form. I see lots of problems with this in 2nf and 3nf, but I'm confused on how to get this to just 1st normalized form. (I'm not creating an actual table just shorthand notation)

DEPARTMENT (DEPT_ID, DEPT_NAME)

ADVISOR (ADVISOR_ID, ADVISOR_LAST_NAME, ADVISOR_FIRST_NAME, DEPT_ID)

COURSE( COURSE_ID, COURSE_DESCP)

STUDENT (STUDENT_ID, STUDENT_FIRST_NAME, STUDENT_LAST_NAME, COURSE_ID, 
COURSE_DESCP, GRADE, ADVISOR_ID, ADVISOR_FIRST_NAME, ADVISOR_LAST NAME)

CodePudding user response:

Relational databases are generally already in 1NF barring extremely weird choices or use of NoSQL add ons like Postgres JSON columns.

A database is in first normal form if no table has table-valued columns. An example violation would be if you stored a 'table' of data as a CSV in a string column for each row. Another example would be storing a list of records as JSON in a JSON column.

By default traditional SQL databases are always 1NF, and the only way to violate it is by abusing data serialized as strings or blobs. So your example is already 1NF, though as I am sure you are aware not 2NF or 3NF.

  • Related