borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Issues with tableadapter inserts)Next Topic (String Function needed) New Topic New Poll Post Reply
AndreaVB Forum : Database : Too Many Tables
Poster Message
bolendercm
Level: Scholar


Registered: 25-10-2005
Posts: 39

icon Too Many Tables



Boy have I got a big one (for me anyway).
Okay here it is.  
Our CE shop has what they call Maintenance Sheets on all the equipment here.  And of course the Chief of CE wants every thing available electronic (Computer).  I see not problem with that however, there are over 150 of the Maintenance Sheets.  Each one has a form. Each form has 84 fields and yes they all fit on a normal 81/2 X 11 sheet of paper.  Of the 84 fields, 40 of the fields are different on each form.  I am struggling with the Normalization process.  I know there is another way instead of having over 150 tables one for each Maint sheet.  I am only a one man shop here and don't have the ability to bounce anything off anyone.  ANY and ALL suggestions will be greatly appreciated.        

____________________________
C.......................

16-02-2006 at 03:21 PM
View Profile Send Email to User Show All Posts | Quote Reply
stickleprojects
Level: Moderator


Registered: 09-09-2002
Posts: 891
icon Re: Too Many Tables

Hi,
Without seeing the forms, one thing occurs.
Are there 84 individual fields, or are any related to each other?
Example:
A printed invoice has, say about 15 fields at the top (for the client name, address, etc.) and about 30 rows for items - with 3 columns per row for desc, qty, price.
That is actually:
1 field for the client (the rest is looked-up from the client table)
a couple of fields to identify the invoice (date, ref, notes, etc.)
another table containing the invoiceid, desc, qty and price.
So can you "group" the fields on a form?

Hope this is clear,
Kieron

PS. If you can get a scan/screen-dump/sample up here that would be really helpful.


____________________________
Build it better, faster, quicker, easier.. then fix it (non-offical MS mission statement)

16-02-2006 at 05:53 PM
View Profile Send Email to User Show All Posts | Quote Reply
bolendercm
Level: Scholar


Registered: 25-10-2005
Posts: 39
icon Re: Too Many Tables

Kieron,

Thanks for the reply.

There is information common to every form: Date, Type(Critical, Sub Critical or Non-Critical), Crew Size, Frequency(Yearly, Quarterly, Monthly or Weekly), Hours and Cost Center.

Of the over 150 Maint Sheets they are divided into three maintenance areas, HVAC, Electrical and Power Production.

I could group fields on the form.  Do you mean sub forms on a Main form?

The top of the form has your normal info.  FY, Cost Center
Description, Frequency.

The Mid section section has Required Actions, Reference, Hours and Crew size.  

The bottom section has Date, Initials and Total number of hours.

It just occured to me .  I could have Main form and the Mid and Bottom sections could be a sub-forms.

The only problem with that is, the largest section is the 10 Required Maintenance Action fields located in the mid section and each one is different per piece of equipment.

Am I on the right track?

____________________________
C.......................

16-02-2006 at 06:15 PM
View Profile Send Email to User Show All Posts | Quote Reply
JLRodgers
Level: Moderator

Registered: 04-04-2002
Posts: 1619
icon Re: Too Many Tables

When you look at the data, try to find things that are similar to all, that could be listed in the same table (think of a table from a programming point of view, not a user POV).

Meaning that if you look at a record for say a part, you could have one table that has:
ID (primary key, unique), part #, date, type, freq, etc

then other tables for information that's unique to each form
ex: LID (lid = the ID in the other table that it applies to), extruder, press

(actually I find it hard to think of things... technically, you could just have one large table with all the fields, but only enter data if it's relevant to the field - otherwise keep it null or "" )

Anyway, then you could just, when a person wants info, use the first table with all the common info or the other table, and use a query to find the related records in the other table(s) based on the id.


____________________________
Everywhere's Local (classifieds, job postings, & more for everycity in the world - user entered)

16-02-2006 at 11:19 PM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
steve_w
Level: Moderator


Registered: 18-04-2003
Posts: 1156
icon Re: Too Many Tables

Hi

I have a similar setup  but not quite the same number of fields you have and mine is screen based. When an operator manufactures a product he would be required to enter a series of test results, these could be numbers or check boxes.

What I have is a table which contains all the tests that can be done.

TestField
----------
TestFieldID int
Description varchar(255)
ScreenPrompt varchar(255)
Mandatory bit
TestFieldType tinyint.

Then I have two tables for test programs. This would be used to link associated tests into a group

TestProgram
--------------
TestProgramID int
TestProgramName varchar(30)

TestProgramFields
---------------------
TestProgramID int
TestFieldID int
SortOrder int
Active bit

Then I have another table which link the product to the test programs.

ProductTests
--------------
ProductTypeID int
TestProgramID int
Frequency int
SortOrder int


I also have other table which contain maximum and minimum values if they are any help.


Steve :-)

17-02-2006 at 09:16 AM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : Database : Too Many Tables
Previous Topic (Issues with tableadapter inserts)Next Topic (String Function needed) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder