![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have an Access database that stores product data that I use to publish a print catalog and run a website. Everything currently works okay where I only have a single catalog but I would like to be able to create additional catalogs that use a subset of records in the database. BIG SNIP |
#3
| |||
| |||
|
|
I have an Access database that stores product data that I use to publish a print catalog and run a website. Everything currently works okay where I only have a single catalog but I would like to be able to create additional catalogs that use a subset of records in the database. Here is an overview of the relevant current tables: tblCategory ----------------------- CategoryID, PK ParentCategory CatSort, int CatName etc. tblProductsInCategory ----------------------- CategoryID, FK ProductID, FK tblProducts ------------------------ ProdID, autonumber, PK ProdName, text ProdDescription, text ProdImage AttributeName1 AttributeName2 ... AttributeName10 etc. tblItems ------------------------- ItemID, autonumber, PK ProductID, long, FK Price, currency UnitOfMeasure, text AttributeValue1, text AttributeValue2, text ... Attribute Value10, text The top level categories are actually sections or chapters in the catalog. Categories might be named Hand Tools, Fasteners or Lighting. One product may be in one or more categories and consists of many Items. Products might be things like screwdrivers, screws, flashlights or batteries. The ProductName, Description and Image associated with each product represent many items which display in a tabular format. The Product.AttributeName fields supply column headings for the tables while the Item.AttributeValues fileds fill the cells below the appropriate headings. For example a screwdriver might have attributes of Blade Diameter, Blade Length and Overall Length and an associated item may have values of 1/4", 8" and 12". I realize that this is denormalized but I have done this intentionally for ease of data maintenance. To build a catalog my code loops through the categorie To the point of my current problem I want to be able to define customer specific catalogs that have their own category structure and use a subset of records from my Product and Item tables. For example for customer A I might want to include screwdrivers and flashlights from the product table and assuming that there are 20 related screwdriver items I want to be able to select only 10 particular records for this particular customer catalog. I know I need: tblCatalog CatalogID, autonumber, PK CatalogName, text CatalogDescription, text etc. Beyond that I'm thinking I need to add a table to join the Catalog table to the Category table or if there is a better way. *At this point I'm struggling to envision an interface that would allow a user to select a catalog to edit and then add or delete any category, product or item that is in the database. Any help is appreciated. |
#4
| |||
| |||
|
|
But, I would be reluctant to even try to implement something as nearly totally flexible as you suggest with an unnormalized database -- almost |
#5
| |||
| |||
|
|
so categories have products products have items customers have catalogs catalogs have * * *categories or * * *products or * * *items correct ?- Hide quoted text - - Show quoted text - |
|
so categories have products products have items customers have catalogs catalogs have categories or products or items correct ?- Hide quoted text - - Show quoted text - |
![]() |
| Thread Tools | |
| Display Modes | |
| |