If you go for option 2 and Normalise the structure some of your fields are
redundant - i.e. you do not need detailid in table Model as you can get it
through the foreign key makeid to the Make table and then use the detailid
foreign key back to the detail table

-----Original Message-----
From: Tony Carcieri [mailto:[EMAIL PROTECTED]]
Sent: 11 June 2002 19:14
To: CF-Talk
Subject: RE: Database layout advice?


Personally, I always do option 2. I like having very specific and detailed
breakdown of what I am doing. It is easier for me to do on a whiteboard and
observe the flow and relationship. Just my 2cents

-----Original Message-----
From: Douglas Brown [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 11, 2002 2:20 PM
To: CF-Talk
Subject: OT: Database layout advice?


I am creating a database for the sale of autos online. I have mulled
over how I should lay this out to function properly and decided to post
this to the group for advice. Forgive me if this is a little long.
Please keep in mind that I do not like setting anything static if I can
help it.

The 2 ways I have envisioned this is as follows and any input would help
greatly

(option 1)
I though of placing all inventory into one table and just using the
other tables to populate fields.

[inventory]
This table would hold all the details about the car. IE: make, model,
year, vin, options, price etc... etc...

[make]
list of all makes to dynamically populate fields in application back-end

[model]
list of all models to dynamically populate fields in application
back-end

[options]
list of all options to dynamically populate fields in application
back-end

(option 2)

I thought of seperating all the colums in the inventory into seperate
tables, but I would also have to make seperate tables for the populating
of fields in the back-end

IE:


[details]
id
vin
price

[make]
id
detail_id
make

[model]
id
make_id
detail_id
model

[options]
id
make_id
model_id
detail_id
option1
option2
option3




[makeList]
list of all makes to dynamically populate fields in application back-end

[modelList]
list of all models to dynamically populate fields in application
back-end

[optionsList]
list of all options to dynamically populate fields in application
back-end




Douglas Brown
Email: [EMAIL PROTECTED]



______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to