Hi guys,
My question from yesterday was a bit confusing so I decided to reprhase the problem.
We want to desing a connector database.
A connector is composed of its housing which has in general 1...N cavities, and in each cavity can be a terminal.
The cavities can differ (in practice one connector can have max 4 different cavities).
Each cavity is compatible with some set/sets of terminals.
There can be 1 - N terminals in one set of terminals.
We want to desing the database so we are able to match any cavity of given connector with all possible terminals/ terminal sets.
Example:
Find all
Compatible Terminals for
pin1/cavity1 of Connector
XYZ.
or
Find all
Connectors using terminal
XYZ
I've designed following tables:
table Housing:
ID_Hous (Primary Key)
Manufacturer
SUPPLIER_PART_NUMBER
SUPPLIER
MATERIAL
NOTE
PITCH
etc.
So we are able to match each pin with a terminal, I've defined a tabel called PIN_LAYOUT:
ID_Hous (Primary key)
PIN (Primary key)
SET_ID (Primary key)
table of Terminal Sets:
SET_ID (Primary key)
Each terminal belongs to some set, BELONGS_TO_SET table:
SET_ID
TERMINAL_ID
and table of terminals:
TERMINAL_ID (Primary key)
SUPPLIER_PART_NUMBER
CURRENT_LOAD
MATERIAL
SURFACE_FINISH
My concerns are related to the PIN_LAYOUT table. Because of lack of experiences with DB design, I'm affraid of the composite key, but I've no Idea, how to keep the possibilities described in example above and to "simplify" the DB.
Also what would you suggest? Should I keep the TERMINAL_SET table? because I can throw away the TERMINAL_SET and BELONGS_TO_SET tables and pair the Terminals directly in PIN_LAYOUT I guess with a cavity_id, which would be some automatically generated number.
Picture of the relations[
^]