Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.databases.ms-sqlserver > #1695
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Erland Sommarskog <esquel@sommarskog.se> |
| Newsgroups | comp.databases.ms-sqlserver |
| Subject | Re: Is it good to have a price column imn OrderLine table |
| Date | Thu, 27 Feb 2014 08:06:51 +0000 (UTC) |
| Organization | Erland Sommarskog |
| Lines | 22 |
| Message-ID | <XnsA2E15CB6F8EBAYazorman@127.0.0.1> (permalink) |
| References | <lelpn8$8sq$1@dont-email.me> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Thu, 27 Feb 2014 08:06:51 +0000 (UTC) |
| Injection-Info | mx05.eternal-september.org; posting-host="5d404a5d864426cbf50ddbcd9433a6e4"; logging-data="2544"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18qIdyWmO4UUCAvEfQDF4yx" |
| User-Agent | Xnews/2005.10.03 Mime-proxy/1.4.c.4 (Win32) |
| Cancel-Lock | sha1:Jd/3+zpP0SnMdGT2B6tD34b0EiA= |
| Xref | csiph.com comp.databases.ms-sqlserver:1695 |
Show key headers only | View raw
Tony Johansson (johansson.andersson@telia.com) writes: > Now to my question is it good to have a price column in the OrderLine > table. ? > If we have a price will that mean the total price per line such as if we > have ordered 3 shoes and this specific shoes cost 10 the price field in > OrderLine would be 30 All this depends on business rules, but yes, I would expect a price column in a Orderline table. That gives the price for that specific order. The customer may have gotten a discount. And more importantly, if you change the price for the product, you don't want that to affect old orders. Although, in your example I would store 10 in the Price column in the Orderline table. If it was called Amount I would store 30. But that's more of a language issue. -- Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se Books Online for SQL Server 2005 at http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx Books Online for SQL Server 2000 at http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Back to comp.databases.ms-sqlserver | Previous | Next — Previous in thread | Next in thread | Find similar
Is it good to have a price column imn OrderLine table "Tony Johansson" <johansson.andersson@telia.com> - 2014-02-26 23:26 +0100
Re: Is it good to have a price column imn OrderLine table Erland Sommarskog <esquel@sommarskog.se> - 2014-02-27 08:06 +0000
Re: Is it good to have a price column imn OrderLine table rja.carnegie@gmail.com - 2014-02-27 03:22 -0800
Re: Is it good to have a price column imn OrderLine table Erland Sommarskog <esquel@sommarskog.se> - 2014-02-27 11:50 +0000
Re: Is it good to have a price column imn OrderLine table Mark D Powell <markp28665@gmail.com> - 2014-02-27 11:23 -0800
csiph-web