RE: [PHP-DB] Question about database design
| From: | Bastien Koert | Date: | Thu, 25 Oct 2007 00:55:10 +0000 |
| Subject: | RE: [PHP-DB] Question about database design | ||
| References: | 1 2 3 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-44268@lists.php.net to get a copy of this message | ||
Nope, you got it
Bastien
________________________________> CC: php-db@lists.php.net> From: japruim@raoset.com>
________________________________> Subject: Re: [PHP-DB] Question about database design> Date: Wed, 24 Oct 2007 15:18:05 -0400>
________________________________> To: bastien_k@hotmail.com>> I think I understand what you are saying here... On the main table
________________________________> just list the persons name and then on a second table use a 1 to many relationship on a foreign key
________________________________> to link all the addresses into the name? Or did I miss the mark? :)> On Oct 24, 2007, at 9:30 AM,
________________________________> Bastien Koert wrote:> I would approach this by having a main people table (with a unique id of
________________________________> course) and then create a second addresses table which uses the people Id key as the foreign key to
________________________________> this table...then you can have multiple (more than two) addresses for those users, you could add a
________________________________> season in the addresses to be able to pull the correct one based on date> bastien>> To:
________________________________> php-db@lists.php.net>> From: japruim@raoset.com>> Date: Wed, 24 Oct 2007 09:06:29
________________________________> -0400>> Subject: [PHP-DB] Question about database design>>>> ********I sent this
________________________________> to the MySQL list but didn't receive any>> response, My apologies if you have already
________________________________> received this.>>>>>> Hi Everyone,>>>> So having learned my lesson with
________________________________> the last application, I am trying to>> plan out the addition of a feature to my database
________________________________> application.>> Basically, some of my customers go south for the winter ("Snow>>
________________________________> Birds") what I would like to do is have away of storing both their>> addresses in the
________________________________> database, and have it so that the people>> administering the list can choose between wether
________________________________> they are up north or>> down south without having to erase the old address.>>>> For
________________________________> that I was thinking creating a second table "SnowBirds" and list>> their southern
________________________________> addresses in there and then when the list admin clicks>> on the edit button for their name, it
________________________________> would also be able to pull up a>> list of the the addresses stored and associated with that
________________________________> person.>>>> I'm also considering adding a date range for the addresses so that
________________________________> if>> they know they'll be south from November to March it will check the>> date and
________________________________> switch between the record accordingly BEFORE exporting to>> excel.>>>> Now... I
________________________________> haven't really asked a question yet but gave some background>> into what I want to do.
________________________________> Sooooo... Here's the question, does anyone>> have any advice on the best way to do it? Am
________________________________> I right in thinking that>> a second table is required? Would it be called a Relational
________________________________> database?>> Or have I missed the terminology?>>>> Any help would be greatly
________________________________> appreciated!>>>> Thanks for looking!>>>> ohhh... and in case it makes a
________________________________> difference it's MySQL 5.* and I'll be>> writing the stuff to access that database
________________________________> with php 5.>>>> -->>>> Jason Pruim>> Raoset Inc.>> Technology
________________________________> Manager>> MQC Specialist>> 3251 132nd ave>> Holland, MI, 49424>>
________________________________> www.raoset.com>> japruim@raoset.com>>>>> ________________________________>
________________________________> Express yourself with free Messenger emoticons. Get them today!> --> Jason Pruim> Raoset
________________________________> Inc.> Technology Manager> MQC Specialist> 3251 132nd ave> Holland, MI, 49424>
________________________________> www.raoset.com> japruim@raoset.com
_________________________________________________________________
R U Ready for Windows Live Messenger Beta 8.5? Try it today!
http://entertainment.sympatico.msn.ca/WindowsLiveMessenger