FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Bad database design can cause unnecessary coding
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Bad database design can cause unnecessary coding [message #179651 is a reply to message #179641] Thu, 15 November 2012 18:03 Go to previous message
Peter H. Coffin is currently offline  Peter H. Coffin
Messages: 245
Registered: September 2010
Karma:
Senior Member
On Thu, 15 Nov 2012 15:49:46 +0100, Erwin Moller wrote:
> The only times I don't use a SERIAL is when storing many-to-many
> relationships.
> For example, when you store many-to-many relationships in a coupletable
> (not sure if that is the right word):
> eg, a table that links users to their favorite food:
> CREATE TABLE tbluserfavfood(
> userid integer references tbluser(userid),
> favfoodid integer references tblfavfood(favfoodid)
> )

Terms common for this are map table, junction table, and intersection
table. There are others, but these three are the most common among
people I work with.

--
The true sysadmin does not adjust his behaviour to fit the machine. He
adjusts the machine until it behaves properly. With a hammer, if necessary.
- Brian in the Monastery
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: php daemon
Next Topic: keeping the page content stay in their positions and not merging
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 04:32:54 GMT 2024

Total time taken to generate the page: 0.04276 seconds