Hi all,
I have a question regarding tables. I hope I can get some clarity and ideas from you all.
I have a table of mechanical parts, eg. pistons, bearings, valves, lubricants etc.
tPARTS
- ID_PARTS
- PART NUMBER
- MANUFACTURER
- QTY PER PACK
I want to store additional information about each part, eg. dimensions, materials etc. To do this, I thought of creating another table:
tSPECS
- ID_SPECS
- ID_PART
- FIELD 1
- FIELD 2
.
.
.
However, the set of fields for each part type varies. I have listed some below to illustrate this point:
PISTONS:
- MATERIAL
- DIAMETER
- COMPRESSION HEIGHT
- BOWL DEPTH
- PIN DIAMETER
- PISTON DESIGN
BEARINGS:
- HOUSING BORE
- BEARING WIDTH
- BEARING POSITION
VALVES:
- HEAD DIAMETER
- SKIRT DIAMETER
- SEAT ANGLE
- SKIRT MATERIAL
LUBRICANTS:
- APPLICATION TYPE
- VISCOSITY
- FLASH POINT
- SERVICE RATING
So, if I create a table that contains all the above fields, each row (record relating to a part in the tPARTS table) would only have data in a few of the columns (specifications fields that are applicable for that part), while the rest are blank. That seems inefficient. Am I right?
How else can I store the specifications? Do I create a table of specs for each part type?
tSPECS_PISTONS
- ID_SPECS_PISTONS
- ID_PART
- MATERIAL
- DIAMETER
- COMPRESSION HEIGHT
- BOWL DEPTH
- PIN DIAMETER
- PISTON DESIGN
.
.
.
tSPECS_LUBRICANTS
- ID_SPECS_LUBRICANTS
- ID_PART
- APPLICATION TYPE
- VISCOSITY
- FLASH POINT
- SERVICE RATING
If I take this approach, how do I link each specs table to the tPARTS table? Does this approach break any database design rules?
This has been driving me a little insane, so I appreciate you taking the time to read this. I welcome all your your ideas and clarifications.
Thank you.
I have a question regarding tables. I hope I can get some clarity and ideas from you all.
I have a table of mechanical parts, eg. pistons, bearings, valves, lubricants etc.
tPARTS
- ID_PARTS
- PART NUMBER
- MANUFACTURER
- QTY PER PACK
I want to store additional information about each part, eg. dimensions, materials etc. To do this, I thought of creating another table:
tSPECS
- ID_SPECS
- ID_PART
- FIELD 1
- FIELD 2
.
.
.
However, the set of fields for each part type varies. I have listed some below to illustrate this point:
PISTONS:
- MATERIAL
- DIAMETER
- COMPRESSION HEIGHT
- BOWL DEPTH
- PIN DIAMETER
- PISTON DESIGN
BEARINGS:
- HOUSING BORE
- BEARING WIDTH
- BEARING POSITION
VALVES:
- HEAD DIAMETER
- SKIRT DIAMETER
- SEAT ANGLE
- SKIRT MATERIAL
LUBRICANTS:
- APPLICATION TYPE
- VISCOSITY
- FLASH POINT
- SERVICE RATING
So, if I create a table that contains all the above fields, each row (record relating to a part in the tPARTS table) would only have data in a few of the columns (specifications fields that are applicable for that part), while the rest are blank. That seems inefficient. Am I right?
How else can I store the specifications? Do I create a table of specs for each part type?
tSPECS_PISTONS
- ID_SPECS_PISTONS
- ID_PART
- MATERIAL
- DIAMETER
- COMPRESSION HEIGHT
- BOWL DEPTH
- PIN DIAMETER
- PISTON DESIGN
.
.
.
tSPECS_LUBRICANTS
- ID_SPECS_LUBRICANTS
- ID_PART
- APPLICATION TYPE
- VISCOSITY
- FLASH POINT
- SERVICE RATING
If I take this approach, how do I link each specs table to the tPARTS table? Does this approach break any database design rules?
This has been driving me a little insane, so I appreciate you taking the time to read this. I welcome all your your ideas and clarifications.
Thank you.