S
steveh
My company is in need of a database. We receive equipment from customers for repairs. Each piece of equipment has a serial number in 99.9% of the cases. Occasionally we receive a piece that has no serial number. We need to be able to track the service records in case we receive a piece of equipment back that is under warranty. We would also like to use the database for some level of inventory control. This is my first shot at a db and I need some advice from experts. I have read some books and looked at tutorials. I understand from what I have read that the design should be well thought out and that is what I am attempting to do here. Please send any comments or suggestions on the following. Thanks!
Table
TblCustome
CustomerID(PK
Last nam
First nam
TblProduct
ProductID(PK?
Serial Number(PK?
Mak
Mode
TblServiceRecord
SRID(PK
Dat
type of servic
parts use
TblInventor
InventoryID(PK
Part Numbe
Part Descriptio
Supplie
Parts in stoc
reorder leve
The following tables are only necessary if I am understanding relationships correctl
TblCustomerProductLin
CustProdID(PK
CustomerID(FK
ProductID(FK
SRID(FK
TblSRInventoryLin
SRInvID(PK
SRID(FK
InventoryID(FK
Relationship
Each customer can have many products and service records
TblCustomer Many-to-many relationship to TblProducts and TblServiceRecords via TblCustomerLin
Each product can have many service records but only one custome
TblProducts One-to-many relationship to TblServiceRecord
Since TblCustomer already has many-to-many relationship with TblProducts what happens here since each product can have only one customer
Each service record can have one product, one customer and many parts(inventory
TblServiceRecords many-to-many relationship to TblInventory via TblSRInventoryLin
Since TblCustomer already has many-to-many relationship with TblServiceRecords what happens here since each service record can have only one customer
Since TblProducts already has many-to-many relationship with TblServiceRecords what happens here since each service record can have only one product
-----------------------------------------------------------------------------------------------------------------------------
need to be able to query/lookup service records based on customer or serial number(not sure which is best
If by customer would have to select serial number then service dat
If by serial number would have to select service date(seems like the better choice
------------------------------------------------------------------------------------------------------------------------------
Does serial number belong in the products table or the service records table
Same Make and Model may apply to many different Serial number
Do I need SRID in TblServiceRecords for PK or is Serial Number O
Serial number would always be unique. May occasionally have product with no serial number(probably answers my question. Would need SRID
Table
TblCustome
CustomerID(PK
Last nam
First nam
TblProduct
ProductID(PK?
Serial Number(PK?
Mak
Mode
TblServiceRecord
SRID(PK
Dat
type of servic
parts use
TblInventor
InventoryID(PK
Part Numbe
Part Descriptio
Supplie
Parts in stoc
reorder leve
The following tables are only necessary if I am understanding relationships correctl
TblCustomerProductLin
CustProdID(PK
CustomerID(FK
ProductID(FK
SRID(FK
TblSRInventoryLin
SRInvID(PK
SRID(FK
InventoryID(FK
Relationship
Each customer can have many products and service records
TblCustomer Many-to-many relationship to TblProducts and TblServiceRecords via TblCustomerLin
Each product can have many service records but only one custome
TblProducts One-to-many relationship to TblServiceRecord
Since TblCustomer already has many-to-many relationship with TblProducts what happens here since each product can have only one customer
Each service record can have one product, one customer and many parts(inventory
TblServiceRecords many-to-many relationship to TblInventory via TblSRInventoryLin
Since TblCustomer already has many-to-many relationship with TblServiceRecords what happens here since each service record can have only one customer
Since TblProducts already has many-to-many relationship with TblServiceRecords what happens here since each service record can have only one product
-----------------------------------------------------------------------------------------------------------------------------
need to be able to query/lookup service records based on customer or serial number(not sure which is best
If by customer would have to select serial number then service dat
If by serial number would have to select service date(seems like the better choice
------------------------------------------------------------------------------------------------------------------------------
Does serial number belong in the products table or the service records table
Same Make and Model may apply to many different Serial number
Do I need SRID in TblServiceRecords for PK or is Serial Number O
Serial number would always be unique. May occasionally have product with no serial number(probably answers my question. Would need SRID