Hello All,
Previously (quite a long time ago) I posted an article on a database I was trying to build for a friend in order to build quotes for a pipe fabrication business. This thread can be found here:
https://www.accessforums.net/databas...ign-32250.html
After a long hiatus and some delays due to my real job, I am now working on this project again and hoping that those out there can lend some guidance. In its simplest form, the task was to take the price book that the company had developed, and integrate it into a database so that they don't have to refer to the book each time to build their quotes (currently in excel). I find this project a little more complex than a standard quotation/invoicing project because rather than a scenario where product A costs X dollars, there are multiple criteria required by the user to input in order to determine a price for each "piece of work" to be performed.
After analyzing the price book and transitioning all of the data to a form that is "database friendly", I have come up with the following table which I hope will match the cascading drop down fields that the user will navigate with to determine the price for the "piece of work" to be performed. A simplified version of the table is below. The field of pipe fabrication is fairly convoluted so if you have any questions please ask (this wikipedia webpage is also helpful for some background information: http://en.wikipedia.org/wiki/Nominal_Pipe_Size).
Component Measurement System Task Category Task Type Task Price Criteria #1 Price Criteria #2 Pipe Schedule Fabrication Prep Pre-Heating Pipe Diameter Pipe Schedule Pipe Schedule Fabrication Weld Butt Weld Pipe Diameter Pipe Schedule Pipe Schedule Fabrication Finish Post-Heating Pipe Diameter Pipe Schedule Pipe Schedule Testing Examination Magnetic Examination Pipe Diameter Pipe Schedule Pipe Schedule Logistics Protection Pipe Protectors Pipe Diameter Pipe Schedule Pipe Wall Thickness Fabrication Prep Pre-Heating Pipe Diameter Pipe Schedule Pipe Wall Thickness Fabrication Weld Butt Weld Pipe Diameter Pipe Schedule Pipe Wall Thickness Fabrication Finish Post-Heating Pipe Diameter Pipe Schedule Pipe Wall Thickness Testing Examination Magnetic Examination Pipe Diameter Pipe Schedule Pipe Wall Thickness Logistics Protection Pipe Protectors Pipe Diameter Pipe Schedule Flange Flange Class Fabrication Weld Flange Weld Flange Diameter Flange Class Flange Flange Class Testing Examination Magnetic Examination Flange Diameter Flange Class Flange Flange Class Logistics Protection Flange Protectors Flange Diameter Flange Class
For the purpose of this post, I have not included all combinations (as there are many). The intent is that the user uses the fields to specify the criteria that leads to a single price for that "piece of work". The two fields that truly determine the price are the last two columns. However, the other fields are used both for categorization of work (for reporting etc) as well as to restrict the options at the next field to a manageable amount. It should be noted that there are differences between column 2 and column 7 in the table - column 2 defines which system is to be used, and column 7 is where the user would input the exact value within this measurement system (see below).
The step that I am slightly confused on is how to incorporate the pricing criteria (particularly the second criteria) fields into a single table. To understand this problem I need to provide you with the permissible options for these fields. With regards to pipe, the permissible options for price criteria #2 as shown in the table are:
For pipe schedule:
Pipe Schedule 20 30 40 60 80 100 120 140 160
And for wall thickness:
Wall Thickness (in) 0.375 0.500 0.750 1.000 1.250 1.500 1.750 2.000 2.250 2.500 2.750 3.000 3.250 3.500 3.750 4.000 4.250 4.500 4.750 5.000 5.250 5.500 5.750 6.000
Finally, for flanges:
Flange Class (lbs) 150 300 400 600 900 1500 2500
So, as you can see, the options for this category are very different, and I am struggling to see how to place them into a single field. Ideally, I think I should split the data into tables as follows
tbl_Pipe_Schedule
(for all schedule numbers)
PK Schedule 1 20 2 30 3 40
And create similar tables for tbl_Pipe_Thickness and tbl_Flange_Class. However, in order to make this data fit within the structure that has been established, I think I will actually need to do the following
tbl_Price_Criteria_2
PK Price Criteria 1 20 2 30 3 40 4 60 5 80 6 100 7 120 8 140 9 160 10 0.37511 0.500 12 0.750 13 1.000 14 1.250 15 1.500 16 1.750 17 2.000 18 2.250 19 2.500 20 2.750 21 3.000 22 3.250 23 3.500 24 3.750 25 4.000 26 4.250 27 4.500 28 4.750 29 5.000 30 5.250 31 5.500 32 5.750 33 6.000 34 150 35 300 36 400 37 600 38 900 39 1500 40 2500
So, I have written quite a lot here. If anyone out there has time to respond, I would appreciate if you could tell me:
-If the question makes sense
-If you require any more information
-If you have any advice on the problem stated.
Thanks