I have changed my relationships but it is still not working. When I run a query with a conection between tblkwaliteitswaarde - tbl machine - tbl kwaliteitsgegevens the records are multiplied with a factor x.
What kind of query were you running? What did it look like? Were there calculations involved? That might be the only reason you got that multiplication factor in there.
there are T tables:
TblMachine --> table with all the machines there are in the factory
TblKwaliteitsgegevens --> measurements that are to be registrated on the product
TblMoederrollen --> product that is made on these machines
TblMachineonderdeel --> machineparts
TblFreqentie --> the frequentie that the measurements needs to be done
TblKwaliteitswaarde --> values about the measurements
So as I see it:
machine has machineparts and machineparts has related measurements.
for each product that is made on a machine the mesurements has to be registrated according the frequentie.
The way you have it set up right now, I don't think compliments the different types of data that you have to sort out. Here are the reasonings I would use if I was doing what you're doing:
1) Machine Table - Obviously you have to have a PK in this field (Machine ID), because if you had no machines, you wouldn't be making products and you would have no need for a database. So there is nothing wrong here. A good thing to remember though is that you should look at this table as the
source and
reason for all other data in the database.
2) Machine Parts Table - I don't see the need for a composite key here. The relationship to the Machines table should be a classic 1-many, on MachineID.
3) Products Table - Again, this table has the same issue as in #2 above. There is no need for a composite, as the products themselves relate to the machine they are produced on. Each product is unique, but one machine can make many products (I am assuming this, but it doesn't matter anyway), thus another classic 1-many relationship should be set up on MachineID.
4) Measurements Table - I would assume this information serves as an
extension of the "product" information, from your description of this table's purpose. If the measurements pertain to a certain product, then this is another 1-many situation. No triple composite key is needed here either. In fact, I don't think you even need a PK in this table, although it's always good to have one (but it's not always necessary).
5) Fequency (frequentie?) and Values - I think these two sets of data are still the same as everything else!
So, basically what I see here is just a bunch of one-to-many relationships. I know you have those all set up now, but all of the composite keys you have set up need to be dropped! Looking at your relationships window just tells me that you're scared to have just one linking field. It's almost like you think that won't be good enough. Well, trust me, it's plenty good, and most of the time, anything more than that can cause you headaches that you don't want!
I apologize for taking so long to get back to you. I hope some of the information I've given can help you too.