Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase ««12

Get multiple rows of data based on one condition and grouping Expand / Collapse
Posted Wednesday, October 3, 2012 8:45 AM


Group: General Forum Members
Last Login: Today @ 4:51 PM
Points: 2,095, Visits: 3,146
Eugene Elutin (10/2/2012)

Given that a customer's name can change, perhaps it is an attribute of the purchase.

Given that nothing in the Universe is constant and everything can change, I would suggest to have one table CustomerPurchase and make all attributes to be attributes of purchase...

It's right for pointer to customer address and price to be attributes of the purchase. But,
it is wrong for customer name. Even if customer name has changed, you will most likely want to see and report all existing purchases with the new name not he old one, until you want datawarehouse changing dimension.

For, say, medical implants and gun sales, to pick just two, is it legal for you not to know the name you sold to?? Just asking. I worked at a medical implant device maker and the FDA was very, very strict on what records had to be kept.

SQL DBA,SQL Server MVP('07, '08, '09)

"We came in spastic, Like tameless horses /
We left in plastic, As numbered corpses / ...
Remember Charlie, Remember Baker /
They left their childhood On every acre /
And who was wrong? And who was right? /
It didn't matter in the thick of the fight." : the inimitable Mr. Billy Joel, about the Vietnam War
Post #1367740
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse