Do you only ever envisage 255 Image Types? And if you are making your imagename an nvarchar you may a well make your description ntext.
N -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 05 July 2005 04:31 To: SQL Subject: efficient design? I'm building out a new photo gallery and I'm looking at different DB designs. The gallery will have pictures on a per person basis as well as a per event basis. I was thinking the following table for the pics: imageid int primary userid int primary imagetype tinyint primary imagename nvarchar description text height int width int Note the imageid, userid and imagetype all being primary. I'm thinking that I can have the following example data: image 1 for userid 1 is a personal image (imagetype 1) image 2 for userid 1 is a personal image (imagetype 1) image 1 for userid 1 is an event image (imagetype 50 for cfunited) image 1 for userid 1 is an event image (imagetype 49 for powered by Detroit) image 2 for userid 1 is an event image (imagetype 49 for powered by Detroit) This would mean that I have an exact lookup for each user's images per type. Is this efficient? The normal way of doing this is to have a single imageid as an incremental int or by having a separate table for personal and event images. Your thoughts? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:6:2317 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/6 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:6 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.6 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
