A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Your Opinion on Design Question



 
 
Thread Tools Display Modes
  #1  
Old November 23rd, 2008, 03:52 PM posted to microsoft.public.access.tablesdbdesign
dhstein
external usenet poster
 
Posts: 665
Default Your Opinion on Design Question

I'll try to describe the situation pretty thoroughly and then I have a pretty
specific question. For an Inventory database, we are trying to keep track of
2 pieces of information. One piece is the quantity of each item (each item
is defined by an SKU number). The other piece is the location of each item.
Items can be and will be in more than 1 warehouse. There are 4 warehouses
and each warehouse has hundreds of locations. One table is the Product Table
which defines Vendors and other pieces of information. Now I want either of
these two configurations:

A) Multiple Tables
1) Locations Table which contains a SKU and information about which
warehouse or warehouses hold the item
2) Warehouse Tables - a separate table for each warehouse containing
information about shelves and specific SKU numbers and quantities

B) A Single Table
This table would contain all location information about the SKU
locations. Which warehouses it is in and which locations in the warehouse.


It seems to me that the first choice is better, but maybe I'm wrong - what's
your opinion? Thanks.
  #2  
Old November 23rd, 2008, 06:18 PM posted to microsoft.public.access.tablesdbdesign
Douglas J. Steele[_3_]
external usenet poster
 
Posts: 3,143
Default Your Opinion on Design Question

Option A is the only appropriate one.

You have a classic many-to-many relationship (one product can be kept at
many different warehouses, and one warehouse can keep many different
products).

To resolve many-to-many relationships, you need 3 tables: one to hold the
details on the products, one to hold the details on the warehouses, and one
to hold which products are being stored in which warehouses.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"dhstein" wrote in message
...
I'll try to describe the situation pretty thoroughly and then I have a
pretty
specific question. For an Inventory database, we are trying to keep track
of
2 pieces of information. One piece is the quantity of each item (each
item
is defined by an SKU number). The other piece is the location of each
item.
Items can be and will be in more than 1 warehouse. There are 4
warehouses
and each warehouse has hundreds of locations. One table is the Product
Table
which defines Vendors and other pieces of information. Now I want either
of
these two configurations:

A) Multiple Tables
1) Locations Table which contains a SKU and information about which
warehouse or warehouses hold the item
2) Warehouse Tables - a separate table for each warehouse
containing
information about shelves and specific SKU numbers and quantities

B) A Single Table
This table would contain all location information about the SKU
locations. Which warehouses it is in and which locations in the
warehouse.


It seems to me that the first choice is better, but maybe I'm wrong -
what's
your opinion? Thanks.



  #3  
Old November 23rd, 2008, 09:13 PM posted to microsoft.public.access.tablesdbdesign
Tony Toews [MVP]
external usenet poster
 
Posts: 3,776
Default Your Opinion on Design Question

dhstein wrote:

There are 4 warehouses
and each warehouse has hundreds of locations.


I strongly suggest multiple tables because what happens when your
employer adds a 5th warehouse? Also it's much easier to find the
current locations of all of a particular item by reading multiple
records down rather than have to programmatically read sideways on a
single table.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
  #4  
Old November 23rd, 2008, 10:10 PM posted to microsoft.public.access.tablesdbdesign
Steve[_57_]
external usenet poster
 
Posts: 598
Default Your Opinion on Design Question

TblVendor
VendorID
Vendor contact fields

TblProduct
ProductID
ProductName
SKUNumber
VendorID
Other product desc fields
ProductPrice

TblWarehouse
WarehouseID
WarehouseName
Warehouse location fields

TblWarehouseLocation
WarehouseLocationID
WarehouseID
WarehouseLocation

TblProductWarehouseLocation
ProductWarehouseLocationID
WarehouseLocationID
ProductID
ProductInventory

I assumed the price of any product is independent of the warehouse it is in.

Steve



"dhstein" wrote in message
...
I'll try to describe the situation pretty thoroughly and then I have a
pretty
specific question. For an Inventory database, we are trying to keep track
of
2 pieces of information. One piece is the quantity of each item (each
item
is defined by an SKU number). The other piece is the location of each
item.
Items can be and will be in more than 1 warehouse. There are 4
warehouses
and each warehouse has hundreds of locations. One table is the Product
Table
which defines Vendors and other pieces of information. Now I want either
of
these two configurations:

A) Multiple Tables
1) Locations Table which contains a SKU and information about which
warehouse or warehouses hold the item
2) Warehouse Tables - a separate table for each warehouse
containing
information about shelves and specific SKU numbers and quantities

B) A Single Table
This table would contain all location information about the SKU
locations. Which warehouses it is in and which locations in the
warehouse.


It seems to me that the first choice is better, but maybe I'm wrong -
what's
your opinion? Thanks.



  #5  
Old November 23rd, 2008, 11:34 PM posted to microsoft.public.access.tablesdbdesign
dhstein
external usenet poster
 
Posts: 665
Default Your Opinion on Design Question



"Tony Toews [MVP]" wrote:

dhstein wrote:

There are 4 warehouses
and each warehouse has hundreds of locations.


I strongly suggest multiple tables because what happens when your
employer adds a 5th warehouse? Also it's much easier to find the
current locations of all of a particular item by reading multiple
records down rather than have to programmatically read sideways on a
single table.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
Thanks for the information Tony

  #6  
Old November 23rd, 2008, 11:34 PM posted to microsoft.public.access.tablesdbdesign
dhstein
external usenet poster
 
Posts: 665
Default Your Opinion on Design Question



"Douglas J. Steele" wrote:

Option A is the only appropriate one.

You have a classic many-to-many relationship (one product can be kept at
many different warehouses, and one warehouse can keep many different
products).

To resolve many-to-many relationships, you need 3 tables: one to hold the
details on the products, one to hold the details on the warehouses, and one
to hold which products are being stored in which warehouses.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"dhstein" wrote in message
...
I'll try to describe the situation pretty thoroughly and then I have a
pretty
specific question. For an Inventory database, we are trying to keep track
of
2 pieces of information. One piece is the quantity of each item (each
item
is defined by an SKU number). The other piece is the location of each
item.
Items can be and will be in more than 1 warehouse. There are 4
warehouses
and each warehouse has hundreds of locations. One table is the Product
Table
which defines Vendors and other pieces of information. Now I want either
of
these two configurations:

A) Multiple Tables
1) Locations Table which contains a SKU and information about which
warehouse or warehouses hold the item
2) Warehouse Tables - a separate table for each warehouse
containing
information about shelves and specific SKU numbers and quantities

B) A Single Table
This table would contain all location information about the SKU
locations. Which warehouses it is in and which locations in the
warehouse.


It seems to me that the first choice is better, but maybe I'm wrong -
what's
your opinion? Thanks.



Thanks for your response Doug.

  #7  
Old November 23rd, 2008, 11:35 PM posted to microsoft.public.access.tablesdbdesign
dhstein
external usenet poster
 
Posts: 665
Default Your Opinion on Design Question



"Steve" wrote:

TblVendor
VendorID
Vendor contact fields

TblProduct
ProductID
ProductName
SKUNumber
VendorID
Other product desc fields
ProductPrice

TblWarehouse
WarehouseID
WarehouseName
Warehouse location fields

TblWarehouseLocation
WarehouseLocationID
WarehouseID
WarehouseLocation

TblProductWarehouseLocation
ProductWarehouseLocationID
WarehouseLocationID
ProductID
ProductInventory

I assumed the price of any product is independent of the warehouse it is in.

Steve



"dhstein" wrote in message
...
I'll try to describe the situation pretty thoroughly and then I have a
pretty
specific question. For an Inventory database, we are trying to keep track
of
2 pieces of information. One piece is the quantity of each item (each
item
is defined by an SKU number). The other piece is the location of each
item.
Items can be and will be in more than 1 warehouse. There are 4
warehouses
and each warehouse has hundreds of locations. One table is the Product
Table
which defines Vendors and other pieces of information. Now I want either
of
these two configurations:

A) Multiple Tables
1) Locations Table which contains a SKU and information about which
warehouse or warehouses hold the item
2) Warehouse Tables - a separate table for each warehouse
containing
information about shelves and specific SKU numbers and quantities

B) A Single Table
This table would contain all location information about the SKU
locations. Which warehouses it is in and which locations in the
warehouse.


It seems to me that the first choice is better, but maybe I'm wrong -
what's
your opinion? Thanks.



Steve thanks for the information and the table design.

  #8  
Old November 24th, 2008, 12:13 AM posted to microsoft.public.access.tablesdbdesign
Tony Toews [MVP]
external usenet poster
 
Posts: 3,776
Default Your Opinion on Design Question

"Steve" wrote:

TblVendor


Although, as I've posted in the past, I completely disagree with using
any kind of object prefixing such as tbl other than in VBA variables.

Tony's Object Naming Conventions
http://www.granite.ab.ca/access/tony...onventions.htm

Tony's Table and Field Naming Conventions
http://www.granite.ab.ca/access/tablefieldnaming.htm

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
  #9  
Old November 24th, 2008, 01:07 AM posted to microsoft.public.access.tablesdbdesign
Michael Gramelspacher
external usenet poster
 
Posts: 482
Default Your Opinion on Design Question

On Sun, 23 Nov 2008 17:13:27 -0700, "Tony Toews [MVP]" wrote:

"Steve" wrote:

TblVendor


Although, as I've posted in the past, I completely disagree with using
any kind of object prefixing such as tbl other than in VBA variables.

Tony's Object Naming Conventions
http://www.granite.ab.ca/access/tony...onventions.htm

Tony's Table and Field Naming Conventions
http://www.granite.ab.ca/access/tablefieldnaming.htm

Tony


If Steve were to drop the TblVendor nonsense and just name the table Vendors, if would be a giant
step in conveying the idea that he is truly a competent database professional. Appearance counts
for a lot when you are trying to sell yourself. Even though a database with names like TblVendor
could be designed correctly, the Tbl Vendor creates an unnecessary barrier for many people.

Of course I realize that prefixes Tbl, tbl, tbl_ , etc. have their defenders.
  #10  
Old November 24th, 2008, 02:31 AM posted to microsoft.public.access.tablesdbdesign
Steve[_57_]
external usenet poster
 
Posts: 598
Default Your Opinion on Design Question

If you are such a "truly competent database professional", answer this:
Vendor appears in some VBA code, is Vendor a table or query?

Steve



"Michael Gramelspacher" wrote in message
...
On Sun, 23 Nov 2008 17:13:27 -0700, "Tony Toews [MVP]"
wrote:

"Steve" wrote:

TblVendor


Although, as I've posted in the past, I completely disagree with using
any kind of object prefixing such as tbl other than in VBA variables.

Tony's Object Naming Conventions
http://www.granite.ab.ca/access/tony...onventions.htm

Tony's Table and Field Naming Conventions
http://www.granite.ab.ca/access/tablefieldnaming.htm

Tony


If Steve were to drop the TblVendor nonsense and just name the table
Vendors, if would be a giant
step in conveying the idea that he is truly a competent database
professional. Appearance counts
for a lot when you are trying to sell yourself. Even though a database
with names like TblVendor
could be designed correctly, the Tbl Vendor creates an unnecessary barrier
for many people.

Of course I realize that prefixes Tbl, tbl, tbl_ , etc. have their
defenders.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:59 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.