Hi,

id like to hear your suggestions on how to design the case im facing
at the moment.

I have a library, stock and online shop, which should work together.
Stock has compositions (books) and other variable items, that are both
rented and selled.

So how would you link ShopItems to either compositions (material and
immaterial copyrighted stuff) or general items (arts, houseware)

Im thinking this sort of table structures:

DB:Shop
--------------------
Name

DB:ShopItems
--------------------
Shop.id
Title
Price
class = Items.id  | Compositions.id

DB:Composers
--------------------
name

DB:Publishers
--------------------
name

DB:Compositions
--------------------
Title
Composers.id
Publisher.id
CoverPhoto

DB:Items
--------------------
Title
AdditionalInfo
Photo

DB:Stock
--------------------
name

DB:StockItems
--------------------
Stock.id
class = Items.id | Compositions.id
count

DB:ShopStocks
--------------------
Stocks.id
Shops.id

DB:Library
--------------------
name

DB:LibraryItems
--------------------
Library.id
class = Items.id | Compositions.id
count

*****

So maybe you see the problem here. StockItems, ShopItems and
LibraryItems should link either to Items or Compositions. Could i put
column name "class" and insert table name as a reference to Items or
Reference? If so, how would you make connections and queries with DAL?
Im placing Items and Compositions to different tables because they
apparently contain partly different fields.

Regards,
Marko



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to