dbTalk Databases Forums  

a neophytish normalization question

comp.databases comp.databases


Discuss a neophytish normalization question in the comp.databases forum.



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

Default a neophytish normalization question - 10-30-2008 , 07:36 PM






Hi all,

I am designing a database for a social science project I'm doing. It
is based on a Linnaen taxonomy (family, subfamily, etc). I know to
get it up to 3rd normal form, I will have to have separate tables for
each level in the hierarchy, with UIDs in each:

tblFamily
UID Name
1 Fam1
2 Fam2

tblSubfamily
UID Name DominatedBy
1 SubFam1 FamUID_1
2 SubFam2 FamUID_1
3 SubFam3 FamUID_2

tblBranch
UID Name DominatedBy
1 Branch1 SubFamUID_3

.... and so on.

As I understand things (having never taken a formal database design
course), I can keep it in 3rd normal form by moving down the levels
and only keeping the DominatedBy field on an "immediate ancestor"/
nontransitive basis. And there is actually not all that much other
attribute data until I get to the bottom level.

My problem is that as I move down through the levels, the
classifications become more and more controversial, as they are wont
to do. And while I am going to assign things on the bottom a certain
way, I am also going to release this database to others for them to
change as they see fit. So, in a way, I need to build in a 4th form
capacity, because things on the bottom may have a many-to-many
relationship by the time somebody else gets done with it.

So my question is, how do I build in the 4th form? I think I do it by
doing this:

tblBranch
UID Name DominatedBySubFam DominatedByFam
1 Branch1 SubFamUID_3 FamUID_2

I hope I am not mucking up my explanation of the problem. Any advice
is sincerely appreciated.

Guy

Reply With Quote
  #2  
Old   
Todd
 
Posts: n/a

Default Re: a neophytish normalization question - 11-01-2008 , 12:14 PM






On Oct 30, 8:36 pm, justaguy <your.mas... (AT) gmail (DOT) com> wrote:
Quote:
Hi all,

I am designing a database for a social science project I'm doing. It
is based on a Linnaen taxonomy (family, subfamily, etc). I know to
get it up to 3rd normal form, I will have to have separate tables for
each level in the hierarchy, with UIDs in each:

tblFamily
UID Name
1 Fam1
2 Fam2

tblSubfamily
UID Name DominatedBy
1 SubFam1 FamUID_1
2 SubFam2 FamUID_1
3 SubFam3 FamUID_2

tblBranch
UID Name DominatedBy
1 Branch1 SubFamUID_3

... and so on.

As I understand things (having never taken a formal database design
course), I can keep it in 3rd normal form by moving down the levels
and only keeping the DominatedBy field on an "immediate ancestor"/
nontransitive basis. And there is actually not all that much other
attribute data until I get to the bottom level.

My problem is that as I move down through the levels, the
classifications become more and more controversial, as they are wont
to do. And while I am going to assign things on the bottom a certain
way, I am also going to release this database to others for them to
change as they see fit. So, in a way, I need to build in a 4th form
capacity, because things on the bottom may have a many-to-many
relationship by the time somebody else gets done with it.

So my question is, how do I build in the 4th form? I think I do it by
doing this:

tblBranch
UID Name DominatedBySubFam DominatedByFam
1 Branch1 SubFamUID_3 FamUID_2

I hope I am not mucking up my explanation of the problem. Any advice
is sincerely appreciated.

Guy
You might want to take a look at nested sets.


Reply With Quote
  #3  
Old   
Todd
 
Posts: n/a

Default Re: a neophytish normalization question - 11-01-2008 , 12:14 PM



On Oct 30, 8:36 pm, justaguy <your.mas... (AT) gmail (DOT) com> wrote:
Quote:
Hi all,

I am designing a database for a social science project I'm doing. It
is based on a Linnaen taxonomy (family, subfamily, etc). I know to
get it up to 3rd normal form, I will have to have separate tables for
each level in the hierarchy, with UIDs in each:

tblFamily
UID Name
1 Fam1
2 Fam2

tblSubfamily
UID Name DominatedBy
1 SubFam1 FamUID_1
2 SubFam2 FamUID_1
3 SubFam3 FamUID_2

tblBranch
UID Name DominatedBy
1 Branch1 SubFamUID_3

... and so on.

As I understand things (having never taken a formal database design
course), I can keep it in 3rd normal form by moving down the levels
and only keeping the DominatedBy field on an "immediate ancestor"/
nontransitive basis. And there is actually not all that much other
attribute data until I get to the bottom level.

My problem is that as I move down through the levels, the
classifications become more and more controversial, as they are wont
to do. And while I am going to assign things on the bottom a certain
way, I am also going to release this database to others for them to
change as they see fit. So, in a way, I need to build in a 4th form
capacity, because things on the bottom may have a many-to-many
relationship by the time somebody else gets done with it.

So my question is, how do I build in the 4th form? I think I do it by
doing this:

tblBranch
UID Name DominatedBySubFam DominatedByFam
1 Branch1 SubFamUID_3 FamUID_2

I hope I am not mucking up my explanation of the problem. Any advice
is sincerely appreciated.

Guy
You might want to take a look at nested sets.


Reply With Quote
  #4  
Old   
Todd
 
Posts: n/a

Default Re: a neophytish normalization question - 11-01-2008 , 12:14 PM



On Oct 30, 8:36 pm, justaguy <your.mas... (AT) gmail (DOT) com> wrote:
Quote:
Hi all,

I am designing a database for a social science project I'm doing. It
is based on a Linnaen taxonomy (family, subfamily, etc). I know to
get it up to 3rd normal form, I will have to have separate tables for
each level in the hierarchy, with UIDs in each:

tblFamily
UID Name
1 Fam1
2 Fam2

tblSubfamily
UID Name DominatedBy
1 SubFam1 FamUID_1
2 SubFam2 FamUID_1
3 SubFam3 FamUID_2

tblBranch
UID Name DominatedBy
1 Branch1 SubFamUID_3

... and so on.

As I understand things (having never taken a formal database design
course), I can keep it in 3rd normal form by moving down the levels
and only keeping the DominatedBy field on an "immediate ancestor"/
nontransitive basis. And there is actually not all that much other
attribute data until I get to the bottom level.

My problem is that as I move down through the levels, the
classifications become more and more controversial, as they are wont
to do. And while I am going to assign things on the bottom a certain
way, I am also going to release this database to others for them to
change as they see fit. So, in a way, I need to build in a 4th form
capacity, because things on the bottom may have a many-to-many
relationship by the time somebody else gets done with it.

So my question is, how do I build in the 4th form? I think I do it by
doing this:

tblBranch
UID Name DominatedBySubFam DominatedByFam
1 Branch1 SubFamUID_3 FamUID_2

I hope I am not mucking up my explanation of the problem. Any advice
is sincerely appreciated.

Guy
You might want to take a look at nested sets.


Reply With Quote
  #5  
Old   
--CELKO--
 
Posts: n/a

Default Re: a neophytish normalization question - 11-01-2008 , 02:23 PM



Quote:
I am designing a database for a social science project I'm doing. *Itis based on a Linnaen taxonomy (family, subfamily, etc). *I know to get it up to 3rd normal form, I will have to have separate tables for
each level in the hierarchy, with UIDs in each:

NO! NO! and NO with a cherry on top! There is no such thing as a
magical UID in RDBMS -- do you also believe in the "Elixir of Life" of
Kabhalah numbers? The levels are attributes of the creature you are
categorizing, not entities by themselves.

Then Tables never have that silly "tbl-" prefix to violate both
ISO-11179 rules and basic data m

The Linnaen taxonomy levels are attributes of the creature you are
classifying, not entities in themselves.

Quote:
As I understand things (having never taken a formal database design course), I can keep it in 3rd normal form by moving down the levels and only keeping the DominatedBy field [sic: columns are not fields] on an "immediateancestor"/ non-transitive basis. *And there is actually not all that much other attribute data until I get to the bottom level.
Nope, totally wrong idea of 3NF.

Have you worked with Dewey Decimal in a library? Would you build a
table for the 100"s, one for the tens and one for the digits?

As I recall and my biology is waaaaay out of date, you have less than
ten levels that start at Kingdoms (Animal, Vegetable, Mineral?) so
that is not too many columns.

But you will want axillary tables that are referenced by the columns ,
so

CREATE TABLE NoahArk
(kingdom_name CHAR(10) NOT NULL
REFERENCES Kingdoms(kingdom_name),
..);

You might want to put the whole taxonomy into a Nested sets model, but
I don't know enough to advise you.


Reply With Quote
  #6  
Old   
--CELKO--
 
Posts: n/a

Default Re: a neophytish normalization question - 11-01-2008 , 02:23 PM



Quote:
I am designing a database for a social science project I'm doing. *Itis based on a Linnaen taxonomy (family, subfamily, etc). *I know to get it up to 3rd normal form, I will have to have separate tables for
each level in the hierarchy, with UIDs in each:

NO! NO! and NO with a cherry on top! There is no such thing as a
magical UID in RDBMS -- do you also believe in the "Elixir of Life" of
Kabhalah numbers? The levels are attributes of the creature you are
categorizing, not entities by themselves.

Then Tables never have that silly "tbl-" prefix to violate both
ISO-11179 rules and basic data m

The Linnaen taxonomy levels are attributes of the creature you are
classifying, not entities in themselves.

Quote:
As I understand things (having never taken a formal database design course), I can keep it in 3rd normal form by moving down the levels and only keeping the DominatedBy field [sic: columns are not fields] on an "immediateancestor"/ non-transitive basis. *And there is actually not all that much other attribute data until I get to the bottom level.
Nope, totally wrong idea of 3NF.

Have you worked with Dewey Decimal in a library? Would you build a
table for the 100"s, one for the tens and one for the digits?

As I recall and my biology is waaaaay out of date, you have less than
ten levels that start at Kingdoms (Animal, Vegetable, Mineral?) so
that is not too many columns.

But you will want axillary tables that are referenced by the columns ,
so

CREATE TABLE NoahArk
(kingdom_name CHAR(10) NOT NULL
REFERENCES Kingdoms(kingdom_name),
..);

You might want to put the whole taxonomy into a Nested sets model, but
I don't know enough to advise you.


Reply With Quote
  #7  
Old   
--CELKO--
 
Posts: n/a

Default Re: a neophytish normalization question - 11-01-2008 , 02:23 PM



Quote:
I am designing a database for a social science project I'm doing. *Itis based on a Linnaen taxonomy (family, subfamily, etc). *I know to get it up to 3rd normal form, I will have to have separate tables for
each level in the hierarchy, with UIDs in each:

NO! NO! and NO with a cherry on top! There is no such thing as a
magical UID in RDBMS -- do you also believe in the "Elixir of Life" of
Kabhalah numbers? The levels are attributes of the creature you are
categorizing, not entities by themselves.

Then Tables never have that silly "tbl-" prefix to violate both
ISO-11179 rules and basic data m

The Linnaen taxonomy levels are attributes of the creature you are
classifying, not entities in themselves.

Quote:
As I understand things (having never taken a formal database design course), I can keep it in 3rd normal form by moving down the levels and only keeping the DominatedBy field [sic: columns are not fields] on an "immediateancestor"/ non-transitive basis. *And there is actually not all that much other attribute data until I get to the bottom level.
Nope, totally wrong idea of 3NF.

Have you worked with Dewey Decimal in a library? Would you build a
table for the 100"s, one for the tens and one for the digits?

As I recall and my biology is waaaaay out of date, you have less than
ten levels that start at Kingdoms (Animal, Vegetable, Mineral?) so
that is not too many columns.

But you will want axillary tables that are referenced by the columns ,
so

CREATE TABLE NoahArk
(kingdom_name CHAR(10) NOT NULL
REFERENCES Kingdoms(kingdom_name),
..);

You might want to put the whole taxonomy into a Nested sets model, but
I don't know enough to advise you.


Reply With Quote
  #8  
Old   
Ed Prochak
 
Posts: n/a

Default Re: a neophytish normalization question - 11-04-2008 , 07:40 AM



On Oct 30, 8:36*pm, justaguy <your.mas... (AT) gmail (DOT) com> wrote:
Quote:
Hi all,

I am designing a database for a social science project I'm doing. *It
is based on a Linnaen taxonomy (family, subfamily, etc). *I know to
get it up to 3rd normal form, I will have to have separate tables for
each level in the hierarchy, with UIDs in each:

tblFamily
UID * * Name
1 * * * *Fam1
2 * * * *Fam2

tblSubfamily
UID * * *Name * * * * *DominatedBy
1 * * * *SubFam1 * * *FamUID_1
2 * * * *SubFam2 * * *FamUID_1
3 * * * *SubFam3 * * *FamUID_2

tblBranch
UID * * * Name * * * * DominatedBy
1 * * * * Branch1 * * * *SubFamUID_3

... and so on.

As I understand things (having never taken a formal database design
course), I can keep it in 3rd normal form by moving down the levels
and only keeping the DominatedBy field on an "immediate ancestor"/
nontransitive basis. *And there is actually not all that much other
attribute data until I get to the bottom level.

My problem is that as I move down through the levels, the
classifications become more and more controversial, as they are wont
to do. *And while I am going to assign things on the bottom a certain
way, I am also going to release this database to others for them to
change as they see fit. *So, in a way, I need to build in a 4th form
capacity, because things on the bottom may have a many-to-many
relationship by the time somebody else gets done with it.

So my question is, how do I build in the 4th form? *I think I do it by
doing this:

tblBranch
UID * * * *Name * * * DominatedBySubFam * * * * DominatedByFam
1 * * * * Branch1 * * * *SubFamUID_3 * * * * * * * * * *FamUID_2

I hope I am not mucking up my explanation of the problem. *Any advice
is sincerely appreciated.

Guy
Hi,
I am really curious why you think third normal form requires a UID. I
see people making that assumption and I am just puzzled as to where
they (you in this case) got that notion. As you say, it was not from
formal training on database design.

Thanks,
Ed


Reply With Quote
  #9  
Old   
Ed Prochak
 
Posts: n/a

Default Re: a neophytish normalization question - 11-04-2008 , 07:40 AM



On Oct 30, 8:36*pm, justaguy <your.mas... (AT) gmail (DOT) com> wrote:
Quote:
Hi all,

I am designing a database for a social science project I'm doing. *It
is based on a Linnaen taxonomy (family, subfamily, etc). *I know to
get it up to 3rd normal form, I will have to have separate tables for
each level in the hierarchy, with UIDs in each:

tblFamily
UID * * Name
1 * * * *Fam1
2 * * * *Fam2

tblSubfamily
UID * * *Name * * * * *DominatedBy
1 * * * *SubFam1 * * *FamUID_1
2 * * * *SubFam2 * * *FamUID_1
3 * * * *SubFam3 * * *FamUID_2

tblBranch
UID * * * Name * * * * DominatedBy
1 * * * * Branch1 * * * *SubFamUID_3

... and so on.

As I understand things (having never taken a formal database design
course), I can keep it in 3rd normal form by moving down the levels
and only keeping the DominatedBy field on an "immediate ancestor"/
nontransitive basis. *And there is actually not all that much other
attribute data until I get to the bottom level.

My problem is that as I move down through the levels, the
classifications become more and more controversial, as they are wont
to do. *And while I am going to assign things on the bottom a certain
way, I am also going to release this database to others for them to
change as they see fit. *So, in a way, I need to build in a 4th form
capacity, because things on the bottom may have a many-to-many
relationship by the time somebody else gets done with it.

So my question is, how do I build in the 4th form? *I think I do it by
doing this:

tblBranch
UID * * * *Name * * * DominatedBySubFam * * * * DominatedByFam
1 * * * * Branch1 * * * *SubFamUID_3 * * * * * * * * * *FamUID_2

I hope I am not mucking up my explanation of the problem. *Any advice
is sincerely appreciated.

Guy
Hi,
I am really curious why you think third normal form requires a UID. I
see people making that assumption and I am just puzzled as to where
they (you in this case) got that notion. As you say, it was not from
formal training on database design.

Thanks,
Ed


Reply With Quote
  #10  
Old   
Ed Prochak
 
Posts: n/a

Default Re: a neophytish normalization question - 11-04-2008 , 07:40 AM



On Oct 30, 8:36*pm, justaguy <your.mas... (AT) gmail (DOT) com> wrote:
Quote:
Hi all,

I am designing a database for a social science project I'm doing. *It
is based on a Linnaen taxonomy (family, subfamily, etc). *I know to
get it up to 3rd normal form, I will have to have separate tables for
each level in the hierarchy, with UIDs in each:

tblFamily
UID * * Name
1 * * * *Fam1
2 * * * *Fam2

tblSubfamily
UID * * *Name * * * * *DominatedBy
1 * * * *SubFam1 * * *FamUID_1
2 * * * *SubFam2 * * *FamUID_1
3 * * * *SubFam3 * * *FamUID_2

tblBranch
UID * * * Name * * * * DominatedBy
1 * * * * Branch1 * * * *SubFamUID_3

... and so on.

As I understand things (having never taken a formal database design
course), I can keep it in 3rd normal form by moving down the levels
and only keeping the DominatedBy field on an "immediate ancestor"/
nontransitive basis. *And there is actually not all that much other
attribute data until I get to the bottom level.

My problem is that as I move down through the levels, the
classifications become more and more controversial, as they are wont
to do. *And while I am going to assign things on the bottom a certain
way, I am also going to release this database to others for them to
change as they see fit. *So, in a way, I need to build in a 4th form
capacity, because things on the bottom may have a many-to-many
relationship by the time somebody else gets done with it.

So my question is, how do I build in the 4th form? *I think I do it by
doing this:

tblBranch
UID * * * *Name * * * DominatedBySubFam * * * * DominatedByFam
1 * * * * Branch1 * * * *SubFamUID_3 * * * * * * * * * *FamUID_2

I hope I am not mucking up my explanation of the problem. *Any advice
is sincerely appreciated.

Guy
Hi,
I am really curious why you think third normal form requires a UID. I
see people making that assumption and I am just puzzled as to where
they (you in this case) got that notion. As you say, it was not from
formal training on database design.

Thanks,
Ed


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.