Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.databases.ms-sqlserver    |    Notorious Rube Goldberg contraption    |    19,505 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 19,012 of 19,505    |
|    Erland Sommarskog to Tony Johansson    |
|    Re: More about relationship in a databas    |
|    16 Feb 14 19:42:44    |
      From: esquel@sommarskog.se              Tony Johansson (johansson.andersson@telia.com) writes:       > Assume I have a table in the database called Inventory.       > Now what is a resonable design type between Inventory and Product.       > Where should the foreign key be placed ?              That depends on what's in these tables.              If a given product can be associated with one given invetory at a time, the       InventoryId would be a foreign-key column in the Products table.              On the other hand, if the Inventory table contains something like the stock       of all products at all warehouses, the ProductId column would be a foreign-       key column in Inventory.              --       Erland Sommarskog, Stockholm, esquel@sommarskog.se              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca