I'm no expert on this.  Nonetheless, here is my non-expert thinking:

I'd keep all of the user information in one table.  I would then create
separate tables for payment, questions, text, image, sound, and video.  This
way, any "single" can have as many or as few payments/questions/etc., as
they want, without necessitating changes to the table structure.  I think
that it's more flexible in the long run.

You probably already know what I'm driving at, but just in case:

tblUSERS
userid
userpass
nickname
lastname
firstname
email
phone
address1
address2
city
state
zip

tblPAYMENTS
paymentid
userid_foreign_key
payment_info

tblQUESTIONS
questionid
userid_foreign_key
question_text

etc.

If you want the questions (or anything else) ordered, just add another
column called rank, and put in integers ranking the questions on entry.  You
can sort by that later.

To pull the questions for userid 35409, do this:

SELECT question_text
FROM tblQUESTIONS
WHERE userid_foreign_key = 35409

Hope this helps.

Matthieu


-----Original Message-----
From: Adrian Cesana [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 28, 2001 2:34 PM
To: CF-Talk
Subject: OT: DB design suggestion


I need to build a "singles" database...After pondering a while it seems a
single (no pun intended) table would be simplest to deal with, or would it
be better to split the user information from the user details, looking for
suggestions.  The basic info I need would be (im sure I missed a few
fields):


userid
userpass
nickname
lastname
firstname
email
phone
address1
address2
city
state
zip
payment1
payment2
payment3
question1
question2
question3
question4
question5
question6
question7
question8
question9
question10
question11
question12
question13
question14
question15
text1
text2
text3
text4
text5
image1
image2
image3
image4
sound1
sound2
video1
video2

Thanks! Adrian
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to