Re: Database design, Keys and some other things
Date: 30 Sep 2005 01:48:37 -0700
Let the data from the relation Car be represented with the following
(this is the relation Car from the beginning of the thread)
S-Relation: CarKey CarID ------------------- 23 vin1 24 vin1 25 vin1 26 vin2 27 vin3 K1-Relation: CarKey Make ------------------ 23 Buick 24 Buick 25 Buick 26 Honda 27 Ford K2-Relation: CarKey Color ------------------- 23 Silver 24 Blue 25 Red 26 Silver 27 Black
Now we can set the query on above S-Relation, K1-Relation and K2-relation and we can get for example the following tuple:
( 24, vin1, Buick, Blue )
This is what you want: that part of the tuple identifies tuple.
Key "24" uniquely identifies the above tuple which it is part.
First key "24" was set in the S-Relation as well as in the
K1-Relation and K2-Relation which are real and in the database.
( Similar ideas exist in the math and the computer science)
This Key also has the semantic line, which beginning is one event in the Real World. (see the definition of the key).
(We also can notice that this is not a surrogate key by definition.)
In www.dbdesign10.comm 2.4 under 2. I defined K-Relations, E-relation
Here P,E,A1,...,An are the attributes of a relation from RM.
(They are also the pictures of some attributes P, E, A1,...An from the
Here in RM, S-Relation:
a) Determines the keys in the database b) Shows relationship to entity's identifier E c) Associates knowledge related to P
I also wrote in my text that we create keys using Constructors that is
we can for example click on a button, New or Close to get the
Constructor's screen with many fields on it. So I can create a key
and the knowledge related to this key: who initialize this Constructor,
name of the Constructor (it can be more then one), which procedure
created key, what is the previous key,... Now besides above mentioned
the database "can recognize" which procedures (logic) created its
data. So we can get some meaning and knowledge about the key.If we
really need this.
(My notice to dawn about my mistake was put because, the relation was
in form 2.4 under 1)
Vladimir Odrljin Received on Fri Sep 30 2005 - 10:48:37 CEST