[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PHPwestoz] [OT] Relational SQL Databases



Nicolas Connault wrote:

Timothy White wrote:


Music.Artists ID | Artist 1 | Avril 2 | Baxtar 3 | Zebra ... Music.Albums ID | Album | Artist 1 | Pink | Baxtar 2 | Mouse | Baxtar 3 | Rock | Zebra Music.Songs


Tim,

The design of your database doesn't take advantage of your ID fields.
I suggest you change it to this:

Ok. I wasn't sure how to do relational stuff. As Evan said I don't need innoDB to do this. What would be the INSERT command that would insert the ID with out needing a separate SELECT? Basically I don't want to do 2 SELECTs to get the Artist and Album ID's for my INSERT for each song. Along that note how can I do INSERT if not exists?

Thanks

Tim

--
Tim White - Use the Fox, Luke!
PGP/GPG id: 602E944D, Pub Key Serv: subkeys.pgp.net
Fingerprint: 04C2 9682 B7B2 3006 009D  A9F3 067E EDCD 602E 944D
Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread!
--

Attachment: signature.asc
Description: OpenPGP digital signature