No replies
parahumanoid
Offline
newbie
Izmail, Ukraine
Last seen: 10 years 30 weeks ago
Izmail, Ukraine
Joined: 2004-03-28
Posts: 10
Points: 0

for those of you out there with extensive DB experience:

granted, the question is out of context but try your best. So, I have to build a db for a store-like site. It's actually a product showcase. I does everything a store does, except actually provide for an online purchasing transaction. It serves as an advertising spot for a number of stores. Currently, I am plainning the DB like so:

CATEGORIES table
CatName TEXT
CatID INT

ITEMS table
ItemID INT
PrototypeID INT
Image BINARY
Description TEXT (in Schema-controlled XML)

PROTOTYPES table
PrototypeID INT
Description TEXT (in Schema-controlled XML)
Image BINARY

JUNCTIONS table
JunctionID INT
NodeType INT (category, store, or item)
NodeID INT (interpreted based on the NodeType value)
Parent INT (the JunctionID of the containing element).

There are some other tables (such as STORES), but as this short tour shows, I am shooting for separating of individual items and their data (price, discounts, color) from the data, representative of those items as a product (manufacturer, name, characteristics) - stored in prototype description, rather than the item description itself. Junction points (or 'mount points', so to speak) are the intermediary between the site's data and its structure, built by the administrator via the admin tool, where he can append various products to different categories (and more than one category at a time), cross-link the categories and so forth. Now then, I am thinking of storing the product data description in XML, which would include the product name and specs, rather than having fields for them. Any reason I should do otherwise? The thing is that it's difficult to predict what data the site administrator will assign to every product, so allocating a number of columns seems silly and inflexible. Besides, having it all in XML allows me to run this through and XSLT processor and merge the two, so that the product's data overrides and amends the prototype's data where necessary.

Do you have any recommendations for this approach? Warnings? Are you for it? Against it? Does the XML thing (or any other described here) sound like a good idea?

Thanks for your time.
Alex.

Tags: