Re: Help with database schema for e-commerce paint shop
Posted by: Alec Pritchard
Date: December 07, 2010 11:23PM

Nice1 Peter,

I'll get writing those queries and experimenting with ways of pulling out the required data...

But what would be the benefit of having the address information in it's own table? Each user will input their own address for delivery - I thought that the customers table would be a good one-table place to store all the info the users insert for registration.

Another thing: am i setting up the indexes correctly?

Look @ the relationships with the user_preferences table - records for customer accounts will have to have null values for the admin_id and admin username columns and vice versa with the admin accounts having nulls for the customer id and username columns. Is this a bad strategy? How could I do it better if so?

Also, I have some composite primary keys - but how do you decide when to use composite primary keys and when to just make the surrogate auto-incrementing INT value the lone primary key?

Pointers and advice appreciated as ever!

Cheers :)

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.