Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Titre:
Order and Order details table
I am in the process of a logical database desing and I am not sure how to go about the design of the following tables :
(This tables are for a Spa and Salon. )
I have normalized the tables and I came up with the following :
1 - Ticket ( nTicket_id int)
2 - Ticket Details ( I have to determine the primary key, maybe a cluster index?)
3 - Products (nProduct_id int)( ex. Shampoos, Conditioners )
4 - Services (cService_id char, 4)( Hair cut, manicure )
Well here is the question:
Should I denormalize the Products and Services table into one table. This way I can reduce the number of required joins?.
In this case I would have one table called ProductsServices and on the 'Ticket Details' table I would have the ProductsServices_id ( from ProductsServices table ). Also I would be able to have a clusteded index on the 'Ticket Details' table( nTicket_id + ProductsServices_id ).
Is this the right approach?. Should I have the Products and Services data in two separate tables. If I do have two separate tables then I will have to create two fields in the 'Ticket Details' table ( nProducts_id and cService_id).
Any feedback is appreciated.
Thanks,
Sergio Ortiz
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement