473,406 Members | 2,390 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Very different products and how to control the data

stonward
145 100+
Help!

I have a database with a large number of (very similar) products - tyres - but in addition I need to add other completely dissimilar products/services. At the moment I have a table for Tyres (Products) and another two tables, one for Batteries and the other, Non_Tyre_Products. These are happily linked to a categories table and I thought all would be fine....

Until, that is, I came to building a point of sale form. I have to cater for any combination of products/services. My point of sale forms subform is primarily based upon SaleDetails, but at the moment the form comes up BLANK.

Can anyone see a better way of organising this (the relationships between tables has worked fine)...in particular, can anyone see how a POS might be constructed? Have you seen this sort of problem before?

Thanx,

Stonward
Sep 25 '07 #1
5 1587
stonward
145 100+
Okay, I'm gonna think aloud...and try and give everyone more info on my problem..

I think I need another 'layer' somehow, to decipher what product is being 'bought' and then to run the required SQl/enable the right fields in the subform.

But the practicalities of this are out on the outer edge of my abilities!

Stonward
Sep 25 '07 #2
FishVal
2,653 Expert 2GB
Hi, Stonward.

As far as I've got it you have 3 different tables to store products of 3 different categories. The reason is that different category products require different information to be stored. However some of the product fields should be the same: e.g. ID, Name etc. Could you post the structure of these 3 tables mentioned?

I have inventory db where more or less the similar situation is resolved in the following way.

Tables:

tblItemCategories
keyCategoryID PK
txtCategoryName

tblProperties
keyPropertyID PK
txtPropertyName

tblCategoryProperties

keyCategoryPropertyID PK
keyCategoryID FK
keyPropertyID FK

tblItemNames
keyItemNameID PK
keyCategoryID FK
txtItemName

tblItemProperties
keyItemPropertyID PK
keyItemNameID FK
keyPropertyID FK
txtPropertyValue
Sep 25 '07 #3
stonward
145 100+
FishVal,

Thanks for your reply....
Your example still has me a little baffled - I can see what you're doing, breaking down the data even further, but I can't see how this will help me, say, make a point of sale form/subform or the queries it'll be based on. Here are my product table details:

tbl_Tyres;
ProductID - PK (auto)
Handle
Category
Series
Size
Rating
Manufacturer
Notes
CostEach
Trade
Retail
Diameter
Width
Stocklevel

'TYRES' makes up 98% or more of the use of the system...

Tbl_Batteries
ProductID - PK (auto)
Category (always '16' - batteries)
Reference (Manufacturers Ref No)
CostEach
Retail
Notes
StockLevel

tbl_NonTyreProducts

ID - PK (auto)
Category
Product
UnitCost
TradePrice
RetailPrice
Notes

I can see how I could easily narrow it to two Products tables, but I can't see how this would help? I can also see how i can make a form with a combo (say) that when a cetain category is selected, the fields alter to suit. My problem is mainly with building the queries/SQL strings necessary....they come up 'empty' until I remove (say) the batteries table...Help Please!

Stonward the Weeping
Oct 1 '07 #4
FishVal
2,653 Expert 2GB
FishVal,

Thanks for your reply....
Your example still has me a little baffled - I can see what you're doing, breaking down the data even further, but I can't see how this will help me, say, make a point of sale form/subform or the queries it'll be based on. Here are my product table details:

tbl_Tyres;
ProductID - PK (auto)
Handle
Category
Series
Size
Rating
Manufacturer
Notes
CostEach
Trade
Retail
Diameter
Width
Stocklevel

'TYRES' makes up 98% or more of the use of the system...

Tbl_Batteries
ProductID - PK (auto)
Category (always '16' - batteries)
Reference (Manufacturers Ref No)
CostEach
Retail
Notes
StockLevel

tbl_NonTyreProducts

ID - PK (auto)
Category
Product
UnitCost
TradePrice
RetailPrice
Notes

I can see how I could easily narrow it to two Products tables, but I can't see how this would help? I can also see how i can make a form with a combo (say) that when a cetain category is selected, the fields alter to suit. My problem is mainly with building the queries/SQL strings necessary....they come up 'empty' until I remove (say) the batteries table...Help Please!

Stonward the Weeping
Hi, Stonward.

To my mind, you need to make a 4th table (let us say [tblProducts]) where the following fields supposed to be ProductID, Category, <all fields needed for "SalesForm" proper calcilations (price etc.)>.

The rest is your decision:
1) you are going with the solution from post#3 having a flexible db ready to deal with any product category / fields combination
2) you add FK associated with the tblProducts.ProductID to your 3 tables each dedicated to particular product category

Anyway this is a very general issue - the internal ideology of your db.
Without understanding your particular situation I can easily suggest you a not optimal or completely unsuitable tables relationship schema.
You should better than any other understand what functionality your db should have to fit all present and possible requirements. So to make my advices more useful you have to describe the whole situation in a very detailed manner.

P.S. The structure of tables you've provided seems me somewhat useless so far. Did you mean each product has a constant price, size etc?
Oct 1 '07 #5
stonward
145 100+
FishVal,

I'm not sure how I'd put across to you my system as it is in detail....

There are about 1200 products in Tyres at present, which is growing steadily at about 10 per week. Do I not put in prices in the products tables? The other fields stay stable for each individual tyre...Im not sure what you're getting at.

I'm going to continue battling it - I am intrigued by your idea of adding a table (although I do already have a nice set of one to many relationships between all my tables). Can you explain more on this?

In the meantime, I'll try and find a way to simplify my requirements.

Thanx for your patience,

Stonward
Oct 1 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: deko | last post by:
RE: "Object Invalid or No Longer Set" errors I've had an angelic visitation and the revelation is that my problem, in essence, is due to the fact that I have multiple forms open at the same time...
4
by: Heather | last post by:
I am creating a database with a backend and frontend. The backend consists of a Products table and many other tables. The products table in an .mdb file by itself is over 2 meg. I thought about...
2
by: moondaddy | last post by:
I have a user control that's used to display the products listing in the main part of a page. This control is populated with a listing of products from the database based on a category name passed...
7
by: SL | last post by:
Could someone direct to a simple explanation of how to use MS Visual Studio 2003 to design .aspx code? This code works if pasted into notepad and run as an .aspx file: <%@ Import...
1
by: ANDRES BECERRA | last post by:
Herfried K. Wagner was kind enough to point me to the PropertyGrid control http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemwindowsformspropertygridclasstopic.asp I have found a few...
1
by: Bruce | last post by:
Hi, there, I meet a problem about comboBox binding. -------------------- Database: Northwind Tables: 1) Products 2) Categories I create a form (named "form1") to edit the record from...
17
by: IanIpp | last post by:
We have a 3 month old quad processor/dual core server running SQL Server 2005 and already it is getting close to hitting the CPU wall. An 8 way CPU box is prohibitively expensive and out of the...
9
by: dan | last post by:
within a loop i am building a sql insert statement to run against my (programatically created) mdb. it works but it seems unreasonably SLOW! Sorry, dont have the code here but the jist is very...
4
by: sklett | last post by:
(I posted this in a databinding NG, but it's a VERY low traffic NG so I thought I would post here as well. I hope no one minds too much, if you do I'm sorry) I have a DGV that is bound to a...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.