List:General Discussion« Previous MessageNext Message »
From:David Blomstrom Date:July 2 2004 2:12am
Subject:Re: Parent-Child Relationship Question
View as plain text  
And here's a follow up question...

After looking at my database from a fresh perspective,
I'm now thinking of combining tables "area" and
"family" into a single table.

If I do that, it would make life so much simpler if I
had TWO name fields, like this:

ID |      Name      | ParentID | Parent Name
--------------------------------------------
az  |    Arizona    |    us    | United States
us  | United States |    kna   | North America
jpn |     Japan     |    keu   | Eurasia

I could then slap a $mycode = 'az" on a page and
easily fill in its name and the name of its parent
without fiddling with queries, joins, unions, etc.

I know that duplicating names in two fields isn't the
most elegant solution, but would create any major
problems?

Thanks.


		
__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail 
Thread
Parent-Child Relationship QuestionDavid Blomstrom2 Jul
  • Re: Parent-Child Relationship QuestionDavid Blomstrom2 Jul
    • RE: Parent-Child Relationship QuestionMatt Chatterley2 Jul
      • RE: Parent-Child Relationship Questionolinux3 Jul