|
|
| XP is just a number | |
| PerlMonks |
Re: Re: Yet Another Half Perl Half mySQL Questionby jreades (Friar) |
| on Jul 06, 2001 at 22:08 UTC ( #94535=note: print w/ replies, xml ) | Need Help?? |
|
This really isn't a great table design since you're not actually gaining anything by splitting the information this way. The lookups are slower than on a single table using a straighforward SELECT query along the lines of "SELECT ipaddress WHERE name=?", but you haven't gained any additional flexibility since everything is bound to the name_id., If you really want to use ids to track this information a better schema would be:
This gives you a lot more flexibility -- reverse look ups on virtual hosts, for instance, and allows for extensibility at a later date (associating machine-specific information with an IP address id, and domain specific information with the name id).
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||