Modeling Data Base, how can i do it??

  • Thread starter Thread starter cientocienreg
  • Start date Start date
C

cientocienreg

Hi, sorry for my english, I have a problem of conceptual design of my
database, i hope you can help me.

This is a shop with a variety of articles (Posters, mobiles,
decorative objects among others), which have different
characteristics,

Paint: size, author, image, ...
Moviles: brand, size, weight ....
Flashlight: Power, material, color, ...
.........
.........

I decided to make a table tblCategoria and another tblArticulo:
TblCategoria: id, name, description, picture
TblArticulo: id, category, images, prices

And here i have the problem, I would like how to save every property
of the article depending of the category, if is a lamina then the
article must have all their characteristics (size, author,
image .... ), but if it's a mobile should have (weight, brand,
dimensions ...)

Thanks
 
suggest a table of categories, as

tblCategories
CatID (Autonumber, primary key)
CatName
< one record for each category: Paint, Moviles, Flashlight, etc.>

tblCharacteristics
CharID (Autonumber, primary key)
CharName
< one record for each characteristic: size, author, image, brand, weight,
power, material, color, etc.>

one category may have many characteristics, and one characteristic may apply
to many categories. that's a many-to-many relationship; to model it in
Access, you need to use a join (or linking) table, as

tblCategoryCharacteristics
CatCharID (Autonumber, pk)
CatID (Number, Long, foreign key from tblCategories)
CharID (Number, Long, foreign key from tblCharacteristics)

the above gives you a list of characteristics for each category. for
inventory purposes, you need an Items table and an ItemDetails table, as

tblItems
ItemID (Autonumber, pk)
CatID (Number, Long, foreign key from tblCategories)
ItemQuantity (the number of items described in the related detail records)

tblItemDetails
DetailID (Autonumber, pk)
ItemID (Number, Long, foreign key from tblItems)
CharID (Number, Long, foreign key from tblCharacteristics)
Description (the value of the characteristic, such as: if characteristic is
Color, description may be Red, if characteristic is Size, description may be
Medium, etc.)

using the above examples, if the category is shirts, you would count the
number of red shirts in size medium, and enter that in the ItemQuantity.
make sense?

this may be off the mark of what you're trying to do, but it should give you
a basic idea of what you need. note that the tblCategoryCharacteristics can
be used to automatically add records to tblItemDetails; so you can enter a
record in a mainform bound to tblItems, autopopulate the matching
characteristics into a subform bound to tblItemDetails, and then go through
the records and just enter the description for each characteristic.

hth
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top