Jeffry offers a succinct and useful response. Frankly, the nature of the question suggests that you'd be really well-served by doing a little reading on relational database design. Then this sort of question becomes old hat. :-)
There are many excellent titles. Just do a search on "database design" at amazon and look at its most popular choices. Most are uniformly good (because the concepts are fundamentals which all DB designers should know). Some definitely take a lighter approach and are very approachable (and not going to be boring.) It's always tempting to jump right in, or lean on folks to help, but this is stuff you'll constantly bang your head against until you learn those fundamentals. You'll also save yourself a LOT of headache by designing things right up front. It's a nightmare to change things later (both the DB design and the code). /charlie -----Original Message----- From: Jeffry Houser [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 15, 2002 7:04 PM To: SQL Subject: Re: Database configuration ? : hmm: Well, there are way too many variations to tell you specifically what to do, but... I would do something like this: Artist (ArtistID, Artistinfo) Song (SongID, SongInfo) Disc (DiscID, DiscInfo) DiscSongArtist (DiscID, SongID, ArtistID) ( This is an intersection table and will give you the songs on a disc and the relevant artist.... for example, both Madonna and Don McClean do a version of American Pie.. you will want your system to be able to handle that without problems. Also it is not uncommon for a single song to be on multiple CDs, for example anything that was released as a single is usually on a full length album and the single ) As far as ordering stuff, yes I would separate price into it's own table. Are the prices going to change on a routine basis? If so, then when an order is created, I would also store the current price of the item in the order tables, as every time a price changes you aren't changing past orders in the process. I am wondering what site you are working on. At 02:28 PM 01/15/2002 -0800, you wrote: >I am trying to figure out how I should set up a database for an ecommerce >site. I will be selling music CD's. > >Each artist can have several albums, and each album can have several >tracks. I am pretty sure I will need 3 tables for that info. What I am >wondering , is where should I keep pricing info and such? Should it be in >the album table or should there be a seperate table for pricing etc. Any >insight would be helpful. > > > >There are two major products that come out of Berkeley: LSD and [Unix] >BSD. We don't believe this to be a coincidence. > > > >Doug Brown > >Archives: http://www.mail-archive.com/[email protected]/ >Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebarsts -- Jeffry Houser | mailto:[EMAIL PROTECTED] AIM: Reboog711 | ICQ: 5246969 | Fax / Phone: 860-223-7946 -- DotComIt: Database Driven Web Data My Book: Instant ColdFusion 5 | http://www.instantcoldfusion.com My New Book: ColdFusion: A Beginner's Guide February 2002 -- Far Cry Fly, Alternative Folk Rock http://www.farcryfly.com | http://www.mp3.com/FarCryFly ______________________________________________________________________ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
