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  dBforums > General > Database Concepts & Design > Inventory table design

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-09-12, 03:18
gogo167 gogo167 is offline
Registered User
 
Join Date: Feb 2012
Posts: 9
Question Inventory table design

I have thousand of text files which store daily inventory info.
Each file is around 5 MBytes, so there's aound 7 GBytes of text data currently.
I want to sort them into database.

Each of the file stores a single day info, there are 1,000 products in a file,
each product may keep stock in 200 companies, each company got different product inventory.

If I just need to store just one day info, I can create a table
say 1000 row(product) x 200 column(company) got 200,000 cells which storing the inventory info.
It seems it's not properly for a table to contains 200 column, and my another problem
is how is the design to store more than 1 day info.

My target is, all the data will present in graphic type info, lines or bars,
and which can sort data in two ways: 1)trace the inventory trend of a product, or 2)trace the inventory trend of a company.

Anyone can help?

At this point, I have 2 plans:
1) Each day insert 200,000 records into a table, each record contain date/product/company/inventory,
so it will have 300,000,000 records up to now, sounds terrible... (or is it the usual case? )
2) It will have two tables(for tracing issues):
Table Product - each day insert 1000 records, each record contain date/product/[a string contain 200 company's inventory]
Table Company - each day insert 200 records, each record contain date/company/[a string contain 1000 product's inventory]
& it need do some programming to extract the string on-the-fly.

Is there any better solution? Thanks.
Reply With Quote
  #2 (permalink)  
Old 02-13-12, 02:27
gogo167 gogo167 is offline
Registered User
 
Join Date: Feb 2012
Posts: 9
Can someone point me to the right examples?
I believed some of the companies should sort the similar type of data.

Here in short, I got daily inventory data 1000 x 200 x 1500 (product x company x days),
how can I sort it structurally and turn it into traceable graphical data?

Thanks again.
Reply With Quote
  #3 (permalink)  
Old 02-16-12, 02:14
gogo167 gogo167 is offline
Registered User
 
Join Date: Feb 2012
Posts: 9
Finally I found the answer and it's related to the topic of:

BI- Business Intelligence / DW - Data Warehouse / ETL / OLAP...

Most the database solution suppliers got the product which can solve my problem, however, they all Enterprise grade & may difficult to familiarize with.
Reply With Quote
  #4 (permalink)  
Old 02-16-12, 11:41
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,605
That is actually a whole lot harder than it needs to be...

Create three tables, the first table for products, the second table for companies, and the third table for inventory. The inventory table should have foreign keys to the product and the company tables, along with the date and the quantity.

Once you've done this, all you need to do is import the data into your tables, then build the graphs using either an application (like Microsoft Excel or Open Office Calc) or code that you build into your website.

-PatP
__________________
In theory, theory and practice are identical. In practice, theory and practice are unrelated.
Reply With Quote
  #5 (permalink)  
Old 02-16-12, 12:02
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,246
if you can graph it Excel, then you can graph it in Access, both applications use the same graphing tool.
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #6 (permalink)  
Old 02-16-12, 22:47
gogo167 gogo167 is offline
Registered User
 
Join Date: Feb 2012
Posts: 9
Quote:
Originally Posted by Pat Phelan View Post
That is actually a whole lot harder than it needs to be...

Create three tables, the first table for products, the second table for companies, and the third table for inventory. The inventory table should have foreign keys to the product and the company tables, along with the date and the quantity.

Once you've done this, all you need to do is import the data into your tables, then build the graphs using either an application (like Microsoft Excel or Open Office Calc) or code that you build into your website.

-PatP
Thanks Pat, it's really hard for a beginner, I have little experiance in MSAccess only.

My data structure seems got 3 axises, Product/Company/Date, forming a cube.
I found BI/DW solution exactly build for analysis multi-axises data.
It is charm, but not for me for my limited database knowledge.

I planned using SQL Server coming, follow your suggestion to create 3 tables.
My concerns still the database performance, the "third" table will got 300,000,000 records, and every time I try to analysis say, a product trend/averaging/..., it may need doing SQL SUM for 200 times cause there got 200 companies.
Reply With Quote
  #7 (permalink)  
Old 02-16-12, 23:25
gogo167 gogo167 is offline
Registered User
 
Join Date: Feb 2012
Posts: 9
Quote:
Originally Posted by healdem View Post
if you can graph it Excel, then you can graph it in Access, both applications use the same graphing tool.
It's also my original plan to use Access to present the graph.
However, I planned migrate to SQL server due to huge data records, do you know what is the easy/best graphic apps to work with SQL server? For programming, I know Access & VB.net only.

(Microsoft seems got a new chart component for .NET, I haven't try it but I use a free module Zedgraph. It seems need to shift to Microsoft again for highly integration and speed up development.)
Reply With Quote
  #8 (permalink)  
Old 02-19-12, 17:42
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,605
If you use Microsoft SQL Server, you'll get Integration Services and Analysis Services included on the same media. At that point you can choose between using Microsoft Access for a desktop application or SQL Server Reporting Services (again, included on the MS-SQL media) for a web application.

-PatP
__________________
In theory, theory and practice are identical. In practice, theory and practice are unrelated.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On