![]() | |
![]() |
| | Thread Tools | Display Modes |
#11
| |||
| |||
|
|
Chris wrote: Frank, While I can definitely appreciate the humor in your post, perhaps you are not familiar with the recording industry ... Let me most assuredly inform you that in this industry part numbers can (and do) change all the time. For example: Record label A manufactures and distributes Album X from artist Y - part number is 123 and UPC is 789. Record label B acquires/buys/whatever record company A. Album X by artist Y is now part number 456 from company B with the same 789 UPC code (unitl they run out of inventory, at which time the UPC will change to reflect the new vendor if they reprint the title). Again - this is just one tiny illustration of an EXTREMELY common event. I may not be a DBA, but I certainly know my business. Thanks, Chris You just solved your problem: the primary key did not change: Company - part# - UPC # In other words: My Elvis album is still Elvis, and my Deutsche Grammophon Beethoven s 9th by the Berliner Philharmoniker, conducted by Herbert von Karajan is still that, and will always be. -- Regards, Frank van Bortel |
#12
| |||
| |||
|
|
I am a programmer with extensive exposure working with Oracle databases. However, up until now, I have been working with databases that were either designed without my input, or for other applications. This is my first forray into the actual design of the database. I have been doing some reading and am just starting to grasp the concept of using a "dumb" primary key in combination with a unique key. I understand the theory, but am not 100% sure on the practice. How does one go about working with tables that are linked via "dumb" keys? Is the best practice to create a View that gives you all the data you need to see, and edit it accordingly? As a newbie to this process, I appreciate any time you may take to respond. If you can point me to any online literature that would also be appreciated. Thanks in advance, |
|
Chris |
#13
| |||
| |||
|
#14
| |||
| |||
|
#15
| |||
| |||
|
|
Frank - I see where you are coming from with this, but it is problematic. How would I then go about reporting total sales, for instance? If my internal ID changes, I'd have no way of linking together the mulitple records that exist for my part, since of course any and/or all of the key values in your example may be changed. Under your theory, and using my earlier example, I'd have these two parts in my system for Heartbreak Hotel, by the King: A (Company), 123 (Part#), 789 (Barcode) B (Company), 456 (Part#), 789 (Barcode) Now - company B presses new CD's with their own UPC - so this record needs to be added: B (Company), 456 (Part#), 246 (Barcode) But now lets suppose that record comany C aquires the rights to this album. I also need to add this record: C (Company), 135 (Part#), 468 (Barcode) If I do not use an internal ("dumb") key to represent this item, how can I calculate any sort of historical data referencing Heartbreak Hotel by Elvis Presley. How would I know that in reality these 4 separate products really represent the same Artist/Title/Media? I know I may be over simplifying, but it is in large part due to my ignorance of DB design. As I said before, I am a programmer not a DBA - this is all new territory for me. Thanks again for taking the time. Chris Perhaps add an extra field? VALID_UNTIL (DATE) would do the trick |
#16
| |||
| |||
|
#17
| |||
| |||
|
|
Thanks for the input Frank! I ran your question by the purchasers here this morning. The product numbers you have here don't line up with RCA's current catalog. Product 7035 is now actually Hall & Oates Live At the Apollo. Their numbering system has changed a bit too: the current available products are RCA7035.2 (CD) and RCA7035.4 (Cassette). That being said, the purchasers are pretty sure that the numbering that you have here indicates a 7" vinyl single (the 45rpm disc) vs. a 12" vinyl single (the 78rpm disc). Thanks again, Chris Thx - we *do* talk 1957, after all, so 12" 78rpm did cross my mind. |
![]() |
| Thread Tools | |
| Display Modes | |
| |