Hi
Just asking for ideas on table design.
The design I have is as follows:
*tblBuildData*
BuildID (PK) AutoNumber
ManufactureDate
SerialNumber
"
"
*tblRegistratio nData*
BuildID (PK) 1 - 1 from tblBuildData
RegID AutoNumber
RegDate
CustomerID
"
"
*tblWarrantyDat a*
WarrantyID (PK)
RegID (FK) from tblRegistration Data
ClaimDate
"
"
tblBuildData details everything about the machine when it comes out of the
factory and the tblRegistration Data details when the machine was registered
after the customer buys it so the reason why the 1 -1 relationship. Warranty
claims can only be made against machines that have been registered is
another reason why the registration details are separate from the other
machine data.
This design is now starting to kick me in the butt where I really notice it
now when my client wanted to be able to enter a claim against a machine if
it's unregistered if certain criteria was met. This wasn't foreseen a couple
of years ago was the system was designed. I got around this problem with
code by inserting a date in the RegDate field and then deleting the date so
the AutoNumber was created for the tblWarrantyData could then create a
record.
How would you have designed the tables?
I'll like to move all the fields from the tblRegistration Data to the
tblBuildData to simplify the design and improve reporting but that will be a
major with modifying all objects in the database and SQL in code that use
that table structure. About 350 objects.
Stewart
Just asking for ideas on table design.
The design I have is as follows:
*tblBuildData*
BuildID (PK) AutoNumber
ManufactureDate
SerialNumber
"
"
*tblRegistratio nData*
BuildID (PK) 1 - 1 from tblBuildData
RegID AutoNumber
RegDate
CustomerID
"
"
*tblWarrantyDat a*
WarrantyID (PK)
RegID (FK) from tblRegistration Data
ClaimDate
"
"
tblBuildData details everything about the machine when it comes out of the
factory and the tblRegistration Data details when the machine was registered
after the customer buys it so the reason why the 1 -1 relationship. Warranty
claims can only be made against machines that have been registered is
another reason why the registration details are separate from the other
machine data.
This design is now starting to kick me in the butt where I really notice it
now when my client wanted to be able to enter a claim against a machine if
it's unregistered if certain criteria was met. This wasn't foreseen a couple
of years ago was the system was designed. I got around this problem with
code by inserting a date in the RegDate field and then deleting the date so
the AutoNumber was created for the tblWarrantyData could then create a
record.
How would you have designed the tables?
I'll like to move all the fields from the tblRegistration Data to the
tblBuildData to simplify the design and improve reporting but that will be a
major with modifying all objects in the database and SQL in code that use
that table structure. About 350 objects.
Stewart
Comment