Database Design 36 - 1NF (First Normal Form of Database Normalization) — Transcript
Full transcript
- 0:00hey what's up everybody this video will
- 0:02be over the first normal form which is
- 0:04the first step in database
- 0:06normalization this normal form deals
- 0:08with data being Atomic or atomicity all
- 0:13right so let's begin let's first look at
- 0:15three examples where there are problems
- 0:18and then I'm going to explain a solution
- 0:20if we take a look at this first example
- 0:22we have a user ID first name last name
- 0:25email and address I have some values in
- 0:28here but those aren't really important
- 0:30and in this example the main thing you
- 0:32need to pay attention to is the address
- 0:34because an address if you think about it
- 0:36actually consists of a street address
- 0:38State country and so forth so this
- 0:42column is not Atomic we're asking for
- 0:45multiple things within one column so
- 0:48that is the problem in this
- 0:51example the solution for this one would
- 0:53be to break it up into multiple columns
- 0:55you know a state and so forth that way
- 0:58we don't have a bunch of things within
- 0:59one column as an individual
- 1:03value this example you can see we have
- 1:06one row with a user ID first name last
- 1:09name and email but if you look closely
- 1:11we have two emails these emails were
- 1:15entered together as one individual value
- 1:18so you can think of maybe on a website
- 1:20It'll ask you for your email imagine
- 1:22putting one email in and then putting
- 1:25your second email in in the same box and
- 1:27clicking submit well it's entered into
- 1:29the data database as a single value
- 1:31maybe with the comma or something but
- 1:33it's still entered in as the email for
- 1:38this
- 1:39user so two values within one which is
- 1:42not Atomic in this example the actual
- 1:46values given for the email are Atomic
- 1:49because they're only one email but we
- 1:52put two entries within our database so
- 1:54now we have this in here twice this in
- 1:57here twice and this in here twice and
- 1:59the prim primary key should never be in
- 2:01there twice the only time you can see
- 2:03the primary key in there twice is if
- 2:05it's a reference as a foreign key
- 2:08because the foreign key can be put in
- 2:09there multiple times but the primary key
- 2:11of five should only be in there one time
- 2:14so we have all that duplicate data now
- 2:16what if this Caleb Curry goes and gets a
- 2:18name change because that's such a dumb
- 2:21name right no I'm just kidding because
- 2:23that's that's my name and I actually
- 2:25like that name but anyways if he gets a
- 2:29name change he updates his information
- 2:31what if uh only this one's updated so
- 2:34now we have conflicting data and see
- 2:35that's the problem with data Integrity
- 2:37we need to make sure that doesn't happen
- 2:40so in this example the
- 2:43column is the problem in this example
- 2:47the values for the row is the problem
- 2:50and in this example the values for the
- 2:53row is the problem so these basically
- 2:56have the same problem how do we figure
- 2:59out the solution
- 3:00let's take over let's take a look over
- 3:02here and as you can see there is no
- 3:03solution so yeah guys thanks for
- 3:05watching I'm just kidding let's let's do
- 3:08this the best solution for this problem
- 3:10is to have a user
- 3:12table and I'm going to write the columns
- 3:14that are within this user table so we
- 3:16would have a user
- 3:21ID then we are going to have a first
- 3:23name and we're going to have a last name
- 3:26if you wanted the address in there you
- 3:27could have street address state country
- 3:30up all that other good stuff then we're
- 3:33also going to have an email table so the
- 3:37solution is to break off the problem
- 3:40column you can see in this example the
- 3:43email is the thing causing the
- 3:47problem the address that we had earlier
- 3:50that's fixable if it's a problem in the
- 3:52column we could just break that up into
- 3:54multiple columns so we would have to
- 3:55make a new table for that but since this
- 3:57one even the the columns cor it's the
- 4:00values within it that's causing the
- 4:01problem we would need to create a new
- 4:03table for that so that's why we have
- 4:06this email table and now within here
- 4:08we're going to have an email
- 4:13ID and then we're going to have a
- 4:19email which is going to be the actual
- 4:21email
- 4:22address which in this case would be
- 4:25these and then we're going to have a
- 4:28user ID
- 4:31now this is going to be a foreign
- 4:34key that
- 4:36references this user
- 4:40ID the primary key of the user
- 4:44table now if we wanted to put two
- 4:47individual emails we could have rows
- 4:50within this email table let's let's
- 4:52spread out the email table and see what
- 4:53it might look like here's what the email
- 4:56table might look like we would have an
- 4:58email ID which is just a random
- 4:59generated number for each email 6008 is
- 5:03fine and then the email that's going to
- 5:05be the actual address of the email so we
- 5:08could have
- 5:10this I'll try to make it just as bad as
- 5:14handwriting perfect then the user ID of
- 5:17who owns that which in this case would
- 5:20have been five because five was the ID
- 5:23that was used for this
- 5:27user this will be our first row then we
- 5:30could have another row and it'd be a new
- 5:32email so we'd have a new email ID it'd
- 5:35be a different email we would use this
- 5:36one this
- 5:39time and I'm going to make that
- 5:41beautiful handwriting that you guys love
- 5:44there we go and then the user ID for
- 5:46that would also be five now this
- 5:50repeating value is okay this this repeat
- 5:53right here this is okay because this is
- 5:56a forign
- 5:58key and multiple emails are allowed in
- 6:01this
- 6:02situation this email ID this is not not
- 6:06okay to repeat because each individual
- 6:09number should be a separate email
- 6:11because this is the primary key of the
- 6:13email table now when we look back at the
- 6:16user table we don't have any repeating
- 6:19data because we're only going to have a
- 6:21user ID such as five first name Caleb
- 6:25and the last name Curry and there's no
- 6:27need to make a repeating row because we
- 6:29have have all the information we need
- 6:31without having any problems if we change
- 6:33the name we would just update this keep
- 6:35the same ID change this to whatever we
- 6:37name our name ourselves or whatever the
- 6:40person names themselves so there you go
- 6:42everybody that's first normal form and
- 6:44I'll see you in the next video where we
- 6:45will be discussing second normal form
- 6:47peace out
About this transcript
This page contains the full transcript of Database Design 36 - 1NF (First Normal Form of Database Normalization) by Caleb Curry, generated from the public captions YouTube serves with the video. The transcript has 1,131 words across 160 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.