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,017 of 19,505    |
|    rja.carnegie@gmail.com to Erland Sommarskog    |
|    Re: Is it really any point to have a rel    |
|    19 Feb 14 13:43:59    |
      On Wednesday, 19 February 2014 20:13:33 UTC, Erland Sommarskog wrote:       > Tony Johansson (johansson.andersson@telia.com) writes:       > > In this example is it any point to create a separate table for warehouse.       > > Is it just as good to store information such as current quantity for each       > > flower that exist in the product table.       > >       > > I find it funny to have a table warehouse with just an Id without any more       > > fields.       >       > Most likely the warehouse have other attributes like name, address, etc.       >       > But even we assume something that only has an ID, which in this case must       > be a natural key, it should probably be a separate table, as a foreign-key       > constraint to this table helps to restrict the possible values in the       > column.              If it's a book exercise, maybe they would have put in other columns,       as you say, but they didn't bother to do it.              If the business expands, it may have more than one warehouse       (or greenhouse?) I suppose that until then, if there is only       one, then you all know its address. But your database design       is ready, except for not having those columns.              We've also used a table with only one row and one column to hold       an ID that we don't want to have merely as a table's automatic       identity, although this may be unwise. I think it was about       putting an exclusive lock on that until a transaction was complete.              --- 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