dbTalk Databases Forums  

Need some help on Normalization

comp.databases.sybase comp.databases.sybase


Discuss Need some help on Normalization in the comp.databases.sybase forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Lollie
 
Posts: n/a

Default Need some help on Normalization - 10-10-2008 , 08:03 AM






You identify the following attributes, in part, for the Employee
entity:
Employee number (Primary key)
Full name
Phone number
Supervisor number

What change should you make to ensure that the entity is normalized to
the 1st normal form (1NF)?

A) Separate the full name into first, middle (optional), and last
names.
B) Use a different primary key value.
C) Move the supervisor to a different table.
D) Separate the phone number into separate fields.

I see the table as looking like this:
*Emp # (PK) Full name Phone# Supervisor#*
123 Joe Smith 123-4567 1
888 John Doe 555-1212 2
316 Jack Pi 888-8080 1
451 Suzy Q 457-7410 3

Anybody have any comments? Thanks is advance - is there an answer

Reply With Quote
  #2  
Old   
David Kerber
 
Posts: n/a

Default Re: Need some help on Normalization - 10-10-2008 , 08:43 AM






In article <62ed393e-9794-4c4f-a34a-b0eca18ecf10
@i76g2000hsf.googlegroups.com>, techtechxxxx (AT) gmail (DOT) com says...
Quote:
You identify the following attributes, in part, for the Employee
entity:
Employee number (Primary key)
Full name
Phone number
Supervisor number

What change should you make to ensure that the entity is normalized to
the 1st normal form (1NF)?

A) Separate the full name into first, middle (optional), and last
names.
Not really part of normalization, but good practice in databases.


Quote:
B) Use a different primary key value.
Yes, make it an autonumber, guid or some other automatically-generated
value, so it's independent of any of the employee's stored data.


Quote:
C) Move the supervisor to a different table.
No, just change its value to the supervisor's pkey value. Supervisors
are still employees, and should be stored in the same table.


Quote:
D) Separate the phone number into separate fields.
That has nothing to do with normalization, unless you are going to store
numbers in a separate table, with the area code being a key field (which
is going way overboard, IMO). Also not if you want to be able to handle
different countries (because every country has their own style for
writing a phone number), though you might want to store the country code
as a separate field. If a user may have several different phone numbers
(home, office, mobile, pager, etc), you will sometimes see them stored
in a separate table, with foreign keys pointing to the employee's
record, and to indicate the "type" of number.


Quote:
I see the table as looking like this:
*Emp # (PK) Full name Phone# Supervisor#*
123 Joe Smith 123-4567 1
888 John Doe 555-1212 2
316 Jack Pi 888-8080 1
451 Suzy Q 457-7410 3

Anybody have any comments? Thanks is advance - is there an answer
No hard and fast answers, but experience has provided methods that have
proven to work well in real-life applications, which I'm assuming you
are working toward. "Full" normalization in a database theory situation
is a completely different world which has little to do with real-world
usage.

--
/~\ The ASCII
\ / Ribbon Campaign
X Against HTML
/ \ Email!

Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).



Reply With Quote
  #3  
Old   
David Kerber
 
Posts: n/a

Default Re: Need some help on Normalization - 10-10-2008 , 08:43 AM



In article <62ed393e-9794-4c4f-a34a-b0eca18ecf10
@i76g2000hsf.googlegroups.com>, techtechxxxx (AT) gmail (DOT) com says...
Quote:
You identify the following attributes, in part, for the Employee
entity:
Employee number (Primary key)
Full name
Phone number
Supervisor number

What change should you make to ensure that the entity is normalized to
the 1st normal form (1NF)?

A) Separate the full name into first, middle (optional), and last
names.
Not really part of normalization, but good practice in databases.


Quote:
B) Use a different primary key value.
Yes, make it an autonumber, guid or some other automatically-generated
value, so it's independent of any of the employee's stored data.


Quote:
C) Move the supervisor to a different table.
No, just change its value to the supervisor's pkey value. Supervisors
are still employees, and should be stored in the same table.


Quote:
D) Separate the phone number into separate fields.
That has nothing to do with normalization, unless you are going to store
numbers in a separate table, with the area code being a key field (which
is going way overboard, IMO). Also not if you want to be able to handle
different countries (because every country has their own style for
writing a phone number), though you might want to store the country code
as a separate field. If a user may have several different phone numbers
(home, office, mobile, pager, etc), you will sometimes see them stored
in a separate table, with foreign keys pointing to the employee's
record, and to indicate the "type" of number.


Quote:
I see the table as looking like this:
*Emp # (PK) Full name Phone# Supervisor#*
123 Joe Smith 123-4567 1
888 John Doe 555-1212 2
316 Jack Pi 888-8080 1
451 Suzy Q 457-7410 3

Anybody have any comments? Thanks is advance - is there an answer
No hard and fast answers, but experience has provided methods that have
proven to work well in real-life applications, which I'm assuming you
are working toward. "Full" normalization in a database theory situation
is a completely different world which has little to do with real-world
usage.

--
/~\ The ASCII
\ / Ribbon Campaign
X Against HTML
/ \ Email!

Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).



Reply With Quote
  #4  
Old   
David Kerber
 
Posts: n/a

Default Re: Need some help on Normalization - 10-10-2008 , 08:43 AM



In article <62ed393e-9794-4c4f-a34a-b0eca18ecf10
@i76g2000hsf.googlegroups.com>, techtechxxxx (AT) gmail (DOT) com says...
Quote:
You identify the following attributes, in part, for the Employee
entity:
Employee number (Primary key)
Full name
Phone number
Supervisor number

What change should you make to ensure that the entity is normalized to
the 1st normal form (1NF)?

A) Separate the full name into first, middle (optional), and last
names.
Not really part of normalization, but good practice in databases.


Quote:
B) Use a different primary key value.
Yes, make it an autonumber, guid or some other automatically-generated
value, so it's independent of any of the employee's stored data.


Quote:
C) Move the supervisor to a different table.
No, just change its value to the supervisor's pkey value. Supervisors
are still employees, and should be stored in the same table.


Quote:
D) Separate the phone number into separate fields.
That has nothing to do with normalization, unless you are going to store
numbers in a separate table, with the area code being a key field (which
is going way overboard, IMO). Also not if you want to be able to handle
different countries (because every country has their own style for
writing a phone number), though you might want to store the country code
as a separate field. If a user may have several different phone numbers
(home, office, mobile, pager, etc), you will sometimes see them stored
in a separate table, with foreign keys pointing to the employee's
record, and to indicate the "type" of number.


Quote:
I see the table as looking like this:
*Emp # (PK) Full name Phone# Supervisor#*
123 Joe Smith 123-4567 1
888 John Doe 555-1212 2
316 Jack Pi 888-8080 1
451 Suzy Q 457-7410 3

Anybody have any comments? Thanks is advance - is there an answer
No hard and fast answers, but experience has provided methods that have
proven to work well in real-life applications, which I'm assuming you
are working toward. "Full" normalization in a database theory situation
is a completely different world which has little to do with real-world
usage.

--
/~\ The ASCII
\ / Ribbon Campaign
X Against HTML
/ \ Email!

Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).



Reply With Quote
  #5  
Old   
David Kerber
 
Posts: n/a

Default Re: Need some help on Normalization - 10-10-2008 , 08:43 AM



In article <62ed393e-9794-4c4f-a34a-b0eca18ecf10
@i76g2000hsf.googlegroups.com>, techtechxxxx (AT) gmail (DOT) com says...
Quote:
You identify the following attributes, in part, for the Employee
entity:
Employee number (Primary key)
Full name
Phone number
Supervisor number

What change should you make to ensure that the entity is normalized to
the 1st normal form (1NF)?

A) Separate the full name into first, middle (optional), and last
names.
Not really part of normalization, but good practice in databases.


Quote:
B) Use a different primary key value.
Yes, make it an autonumber, guid or some other automatically-generated
value, so it's independent of any of the employee's stored data.


Quote:
C) Move the supervisor to a different table.
No, just change its value to the supervisor's pkey value. Supervisors
are still employees, and should be stored in the same table.


Quote:
D) Separate the phone number into separate fields.
That has nothing to do with normalization, unless you are going to store
numbers in a separate table, with the area code being a key field (which
is going way overboard, IMO). Also not if you want to be able to handle
different countries (because every country has their own style for
writing a phone number), though you might want to store the country code
as a separate field. If a user may have several different phone numbers
(home, office, mobile, pager, etc), you will sometimes see them stored
in a separate table, with foreign keys pointing to the employee's
record, and to indicate the "type" of number.


Quote:
I see the table as looking like this:
*Emp # (PK) Full name Phone# Supervisor#*
123 Joe Smith 123-4567 1
888 John Doe 555-1212 2
316 Jack Pi 888-8080 1
451 Suzy Q 457-7410 3

Anybody have any comments? Thanks is advance - is there an answer
No hard and fast answers, but experience has provided methods that have
proven to work well in real-life applications, which I'm assuming you
are working toward. "Full" normalization in a database theory situation
is a completely different world which has little to do with real-world
usage.

--
/~\ The ASCII
\ / Ribbon Campaign
X Against HTML
/ \ Email!

Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).



Reply With Quote
  #6  
Old   
David Kerber
 
Posts: n/a

Default Re: Need some help on Normalization - 10-10-2008 , 08:43 AM



In article <62ed393e-9794-4c4f-a34a-b0eca18ecf10
@i76g2000hsf.googlegroups.com>, techtechxxxx (AT) gmail (DOT) com says...
Quote:
You identify the following attributes, in part, for the Employee
entity:
Employee number (Primary key)
Full name
Phone number
Supervisor number

What change should you make to ensure that the entity is normalized to
the 1st normal form (1NF)?

A) Separate the full name into first, middle (optional), and last
names.
Not really part of normalization, but good practice in databases.


Quote:
B) Use a different primary key value.
Yes, make it an autonumber, guid or some other automatically-generated
value, so it's independent of any of the employee's stored data.


Quote:
C) Move the supervisor to a different table.
No, just change its value to the supervisor's pkey value. Supervisors
are still employees, and should be stored in the same table.


Quote:
D) Separate the phone number into separate fields.
That has nothing to do with normalization, unless you are going to store
numbers in a separate table, with the area code being a key field (which
is going way overboard, IMO). Also not if you want to be able to handle
different countries (because every country has their own style for
writing a phone number), though you might want to store the country code
as a separate field. If a user may have several different phone numbers
(home, office, mobile, pager, etc), you will sometimes see them stored
in a separate table, with foreign keys pointing to the employee's
record, and to indicate the "type" of number.


Quote:
I see the table as looking like this:
*Emp # (PK) Full name Phone# Supervisor#*
123 Joe Smith 123-4567 1
888 John Doe 555-1212 2
316 Jack Pi 888-8080 1
451 Suzy Q 457-7410 3

Anybody have any comments? Thanks is advance - is there an answer
No hard and fast answers, but experience has provided methods that have
proven to work well in real-life applications, which I'm assuming you
are working toward. "Full" normalization in a database theory situation
is a completely different world which has little to do with real-world
usage.

--
/~\ The ASCII
\ / Ribbon Campaign
X Against HTML
/ \ Email!

Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).



Reply With Quote
  #7  
Old   
David Kerber
 
Posts: n/a

Default Re: Need some help on Normalization - 10-10-2008 , 08:43 AM



In article <62ed393e-9794-4c4f-a34a-b0eca18ecf10
@i76g2000hsf.googlegroups.com>, techtechxxxx (AT) gmail (DOT) com says...
Quote:
You identify the following attributes, in part, for the Employee
entity:
Employee number (Primary key)
Full name
Phone number
Supervisor number

What change should you make to ensure that the entity is normalized to
the 1st normal form (1NF)?

A) Separate the full name into first, middle (optional), and last
names.
Not really part of normalization, but good practice in databases.


Quote:
B) Use a different primary key value.
Yes, make it an autonumber, guid or some other automatically-generated
value, so it's independent of any of the employee's stored data.


Quote:
C) Move the supervisor to a different table.
No, just change its value to the supervisor's pkey value. Supervisors
are still employees, and should be stored in the same table.


Quote:
D) Separate the phone number into separate fields.
That has nothing to do with normalization, unless you are going to store
numbers in a separate table, with the area code being a key field (which
is going way overboard, IMO). Also not if you want to be able to handle
different countries (because every country has their own style for
writing a phone number), though you might want to store the country code
as a separate field. If a user may have several different phone numbers
(home, office, mobile, pager, etc), you will sometimes see them stored
in a separate table, with foreign keys pointing to the employee's
record, and to indicate the "type" of number.


Quote:
I see the table as looking like this:
*Emp # (PK) Full name Phone# Supervisor#*
123 Joe Smith 123-4567 1
888 John Doe 555-1212 2
316 Jack Pi 888-8080 1
451 Suzy Q 457-7410 3

Anybody have any comments? Thanks is advance - is there an answer
No hard and fast answers, but experience has provided methods that have
proven to work well in real-life applications, which I'm assuming you
are working toward. "Full" normalization in a database theory situation
is a completely different world which has little to do with real-world
usage.

--
/~\ The ASCII
\ / Ribbon Campaign
X Against HTML
/ \ Email!

Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).



Reply With Quote
  #8  
Old   
David Kerber
 
Posts: n/a

Default Re: Need some help on Normalization - 10-10-2008 , 08:43 AM



In article <62ed393e-9794-4c4f-a34a-b0eca18ecf10
@i76g2000hsf.googlegroups.com>, techtechxxxx (AT) gmail (DOT) com says...
Quote:
You identify the following attributes, in part, for the Employee
entity:
Employee number (Primary key)
Full name
Phone number
Supervisor number

What change should you make to ensure that the entity is normalized to
the 1st normal form (1NF)?

A) Separate the full name into first, middle (optional), and last
names.
Not really part of normalization, but good practice in databases.


Quote:
B) Use a different primary key value.
Yes, make it an autonumber, guid or some other automatically-generated
value, so it's independent of any of the employee's stored data.


Quote:
C) Move the supervisor to a different table.
No, just change its value to the supervisor's pkey value. Supervisors
are still employees, and should be stored in the same table.


Quote:
D) Separate the phone number into separate fields.
That has nothing to do with normalization, unless you are going to store
numbers in a separate table, with the area code being a key field (which
is going way overboard, IMO). Also not if you want to be able to handle
different countries (because every country has their own style for
writing a phone number), though you might want to store the country code
as a separate field. If a user may have several different phone numbers
(home, office, mobile, pager, etc), you will sometimes see them stored
in a separate table, with foreign keys pointing to the employee's
record, and to indicate the "type" of number.


Quote:
I see the table as looking like this:
*Emp # (PK) Full name Phone# Supervisor#*
123 Joe Smith 123-4567 1
888 John Doe 555-1212 2
316 Jack Pi 888-8080 1
451 Suzy Q 457-7410 3

Anybody have any comments? Thanks is advance - is there an answer
No hard and fast answers, but experience has provided methods that have
proven to work well in real-life applications, which I'm assuming you
are working toward. "Full" normalization in a database theory situation
is a completely different world which has little to do with real-world
usage.

--
/~\ The ASCII
\ / Ribbon Campaign
X Against HTML
/ \ Email!

Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).



Reply With Quote
  #9  
Old   
David Kerber
 
Posts: n/a

Default Re: Need some help on Normalization - 10-10-2008 , 08:43 AM



In article <62ed393e-9794-4c4f-a34a-b0eca18ecf10
@i76g2000hsf.googlegroups.com>, techtechxxxx (AT) gmail (DOT) com says...
Quote:
You identify the following attributes, in part, for the Employee
entity:
Employee number (Primary key)
Full name
Phone number
Supervisor number

What change should you make to ensure that the entity is normalized to
the 1st normal form (1NF)?

A) Separate the full name into first, middle (optional), and last
names.
Not really part of normalization, but good practice in databases.


Quote:
B) Use a different primary key value.
Yes, make it an autonumber, guid or some other automatically-generated
value, so it's independent of any of the employee's stored data.


Quote:
C) Move the supervisor to a different table.
No, just change its value to the supervisor's pkey value. Supervisors
are still employees, and should be stored in the same table.


Quote:
D) Separate the phone number into separate fields.
That has nothing to do with normalization, unless you are going to store
numbers in a separate table, with the area code being a key field (which
is going way overboard, IMO). Also not if you want to be able to handle
different countries (because every country has their own style for
writing a phone number), though you might want to store the country code
as a separate field. If a user may have several different phone numbers
(home, office, mobile, pager, etc), you will sometimes see them stored
in a separate table, with foreign keys pointing to the employee's
record, and to indicate the "type" of number.


Quote:
I see the table as looking like this:
*Emp # (PK) Full name Phone# Supervisor#*
123 Joe Smith 123-4567 1
888 John Doe 555-1212 2
316 Jack Pi 888-8080 1
451 Suzy Q 457-7410 3

Anybody have any comments? Thanks is advance - is there an answer
No hard and fast answers, but experience has provided methods that have
proven to work well in real-life applications, which I'm assuming you
are working toward. "Full" normalization in a database theory situation
is a completely different world which has little to do with real-world
usage.

--
/~\ The ASCII
\ / Ribbon Campaign
X Against HTML
/ \ Email!

Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).



Reply With Quote
  #10  
Old   
ThanksButNo
 
Posts: n/a

Default Re: Need some help on Normalization - 10-14-2008 , 02:55 AM



On Oct 10, 6:43 am, David Kerber <ns_dkerber (AT) ns_wraenviro (DOT) com> wrote:
Quote:
In article <62ed393e-9794-4c4f-a34a-b0eca18ecf10
@i76g2000hsf.googlegroups.com>, techtechx... (AT) gmail (DOT) com says...


D) Separate the phone number into separate fields.

That has nothing to do with normalization, unless you are going to store
numbers in a separate table, with the area code being a key field (which
is going way overboard, IMO). Also not if you want to be able to handle
different countries (because every country has their own style for
writing a phone number), though you might want to store the country code
as a separate field.
It really depends on your application. For example, I need to separate
the country code from the rest of the number, because we send messages
to people's cell phones using an SMS service provider. Their rules
mandate that we have to send them the country code in a separate
field.

Other than that, there are absolutely no consistent rules for
formatting a phone number, especially between different countries, and
very often even within the same country. I'm tempted to carry two
versions of the phone number, one with punctuation and formatting
stripped out. It would be easier to search, because you could do { and
phone like '%1234%' } and not worry about where or whether the person
put dashes or spaces or pluses or parentheses, etc. etc. etc.

:-)


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.