Author | Message |
---|---|
cysun
Posts: 2935
|
Posted 21:48 Sep 28, 2010 |
Please post your solution to the exercise here. The first one who posts the correct solution (both ER diagram and relational schema) will receive some extra credit. |
HuanXue
Posts: 34
|
Posted 22:17 Sep 28, 2010 |
Is it like this? I got a feel that I will get a great deal of E_mail this quarter.... |
ashasabeer
Posts: 55
|
Posted 00:33 Sep 29, 2010 |
|
cysun
Posts: 2935
|
Posted 07:57 Sep 29, 2010 |
HuanXue's solution is mostly correct; ashasabeer's solution is wrong. HuanXue is also correct about getting lots of emails this quarter, especially if you are in both 422 and 520. |
HuanXue
Posts: 34
|
Posted 10:32 Sep 29, 2010 |
Only a "mostly" correct? If I want the correct answer, I should visit you or just wait for next class? PS: there's our textbook on ebay around $50, not very expensive. |
cysun
Posts: 2935
|
Posted 13:18 Sep 29, 2010 |
I'll discuss the solution in the next class. And thanks for the information about the textbook. |
calikidd
Posts: 41
|
Posted 14:38 Sep 29, 2010 |
I'm still confused on this. 1.Can't many products have many prices? There could be multiple products with the same price or a different price, depends on the distribution center, or 2. Should I think about it in that a product has a price which would make it 1-to-1 right? Last edited by calikidd at
15:17 Sep 29, 2010.
|
cysun
Posts: 2935
|
Posted 15:21 Sep 29, 2010 |
Prices and products should be a many-to-one relationship as in HuanXue's solution. |
calikidd
Posts: 41
|
Posted 16:03 Sep 29, 2010 |
ok, did she need to add the price attribute like this: |
cysun
Posts: 2935
|
Posted 22:00 Sep 29, 2010 |
Yes, obviously the actual price must be stored. There's also a less obvious problem. |
calikidd
Posts: 41
|
Posted 23:24 Sep 29, 2010 |
I am assuming we talk about the less "obvious problem" in class. Is the problem on one of the slides? Last edited by calikidd at
23:24 Sep 29, 2010.
|
cysun
Posts: 2935
|
Posted 10:49 Sep 30, 2010 |
Yes. |
rhardytran
Posts: 8
|
Posted 23:58 Oct 02, 2010 |
Different idea to approach where product changing every second like stock market. |
cysun
Posts: 2935
|
Posted 13:49 Oct 03, 2010 |
It looks wrong. I don't get why you need two entity sets Price and Market Price. |
calikidd
Posts: 41
|
Posted 15:20 Oct 03, 2010 |
If we wanted to include the market price, wouldn't it just be another attribute for the Price entity? |
rhardytran
Posts: 8
|
Posted 16:06 Oct 03, 2010 |
well, price entity is a look-up value and market price is the actual values of the product occur overtime. This approach is to just eliminate the duplications of price number/value being stored in the table. However, we can simplify it by combine both price & market price entities into one entity. |
calikidd
Posts: 41
|
Posted 14:47 Oct 04, 2010 |
I don't know of any reason to do this, but can we have an attribute that is linked to an entity and a relationship? For instance, the price attribute be linked to the Price entity and the relationship diamond. |