473,320 Members | 1,978 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,320 software developers and data experts.

database design

I've been working on a project for awhile now and can't seem to get it
working the way I want. What I've got is a database with different
category's and products below them. The thing I'm having trouble with is
the products all have different sizes and colors, and each (different)
product has it's own id and quantity. My first idea was to create one
huge table and deal with it. Is there a better way to do this? Is there
some resources on database design which would point me in the right
direction?

Aaron
Jul 20 '05 #1
5 1814
"_Skare_Krow_" <te******@access4less.net> wrote in message
I've been working on a project for awhile now and can't seem to get it
working the way I want. What I've got is a database with different
category's and products below them. The thing I'm having trouble with is
the products all have different sizes and colors, and each (different)
product has it's own id and quantity. My first idea was to create one
huge table and deal with it. Is there a better way to do this? Is there
some resources on database design which would point me in the right
direction?


The exact design depends on the problem you're trying to solve, and there's
no right or wrong answer.

One possibility is: (1) A table of categories with column NAME, (2) A table
of products with columns NAME and a foreign key to the table of categories,
(3) A table of product types with columns SIZE and COLOR and a foreign key
to the table of products.
Jul 20 '05 #2
On Thu, 05 Aug 2004 05:26:26 +0000, Siemel Naran wrote:
The exact design depends on the problem you're trying to solve, and there's
no right or wrong answer.

One possibility is: (1) A table of categories with column NAME, (2) A table
of products with columns NAME and a foreign key to the table of categories,
(3) A table of product types with columns SIZE and COLOR and a foreign key
to the table of products.


Well the biggest challenge I'm facing is each product (Let's say a
t-shirt) has a distinct size, color, and quantity. I may have 5 red xl
tshirts but only 1 blue xl shirt and there is where my problem lies.

Jul 20 '05 #3
"_Skare_Krow_" <te******@access4less.net> wrote in message
On Thu, 05 Aug 2004 05:26:26 +0000, Siemel Naran wrote:

One possibility is: (1) A table of categories with column NAME, (2) A table of products with columns NAME and a foreign key to the table of categories, (3) A table of product types with columns SIZE and COLOR and a foreign key to the table of products.


Well the biggest challenge I'm facing is each product (Let's say a
t-shirt) has a distinct size, color, and quantity. I may have 5 red xl
tshirts but only 1 blue xl shirt and there is where my problem lies.


The QUANTITY column would be in table of product types (3).
Jul 20 '05 #4
On Fri, 06 Aug 2004 03:08:29 +0000, Siemel Naran wrote:
"_Skare_Krow_" <te******@access4less.net> wrote in message
On Thu, 05 Aug 2004 05:26:26 +0000, Siemel Naran wrote:

> One possibility is: (1) A table of categories with column NAME, (2) A table > of products with columns NAME and a foreign key to the table of categories, > (3) A table of product types with columns SIZE and COLOR and a foreign key > to the table of products.


Well the biggest challenge I'm facing is each product (Let's say a
t-shirt) has a distinct size, color, and quantity. I may have 5 red xl
tshirts but only 1 blue xl shirt and there is where my problem lies.


The QUANTITY column would be in table of product types (3).


That was so obvius.

Thanks
Jul 20 '05 #5
Well, you might try "The Definitive Guide to MySQL" too. It's great
book next to that SQL cookbook. You can see an overview of that book
here at http://www.kofler.cc/mysql/mysqlbook.html

And the best part, chapter 5, (Database design: The idea of relational
databases. Relations, normalization, indices, hierarchies. MySQL data
types. Many samples) is available online!

Thanks to Michael Kofler.
--
raqueeb hassan
congo (drc)
Jul 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Rushikesh | last post by:
I am designing a WEB BASED Accounting Software with ASP and SQL Server. For this I need some help for the Database design. My design is as follows. I)User table: User_id, UserName..... Users...
5
by: Don Vaillancourt | last post by:
Hello all, Over the years as I design more database schemas the more I come up with patterns in database design. The more patterns I recognize the more I want to try to design some kind of...
1
by: Lane Beneke | last post by:
All, New to the list and a relative newbie to PostgreSQL. Please forgive stupid questions. Designing an application server for a work order processing (et al) database. I have a good handle...
5
by: trynittee | last post by:
Hello, It's been a while since I've posted. I am an intermediate user of Access. I can read simple VB code, have done complex queries, comfortable with event procedures, designing forms and...
12
by: nyathancha | last post by:
Hi, I have a question regarding best practices in database design. In a relational database, is it wise/necessary to sometimes create tables that are not related to other tables through a...
3
by: vicky | last post by:
Hi All, Can u please suggest me some books for relational database design or database modelling(Knowledgeable yet simple) i.e. from which we could learn database relationships(one to many,many to...
0
by: Laurynn | last post by:
# (ebook - pdf) - programming - mysql - php database applicati # (Ebook - Pdf)Learnkey How To Design A Database - Sql And Crystal Report # (ebook-pdf) E F Codd - Extending the Database Relational...
1
by: abhijitbkulkarni | last post by:
Hello, I am designing a .NET database application that uses 3 tier architecture. Starting initially, this application will be desktop application but I will convert it into a website later but...
0
by: sam | last post by:
Hi, Hope you are doing well !!!! One of our clients is looking to augment their team with “Database Architect – DB2" please find below the details and respond with
2
by: programmerx101 | last post by:
Ok, I'm looking for expert advice on this one. I have a database which keeps going into read_only mode. Sometimes it goes into read_only / single user mode. Once it was taken offline completely....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.