473,441 Members | 1,769 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,441 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 1590
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...
1
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.