A simple situation shows confusion about basic concepts

From: Ney André de Mello Zunino <zunino_at_inf.ufsc.br>
Date: Mon, 25 Oct 2004 17:26:23 -0300
Message-ID: <2u55lqF25f27iU1_at_uni-berlin.de>



Hello.

Even though I have designed and worked on some projects involving databases before, I realize my understanding of the concepts still needs a lot of improvement. After a relatively long period of inactivity, I find myself struggling to comprehend and get the design of a current project right. In particular, I am having trouble with a pair of entities and their interrelationship.

The first entity represents what is called, in the context of the project, a /universal concept/. Think of it as a unique string which identifies a real concept such as a rock, a car, love, peace, etc. There I had my first dilemma: should I make that very string the primary key of my entity or should I use an artificial key such as "concept_id"? Because the strings can potentially become very long and cumbersome, I chose the latter option. All right, let's move on.

The second entity represents entries in a knowledge base or a conceptual graph. Those entries establish binary relationships between pairs of /universal concepts/, the entity previously described. Schematically, the entities look something like:

UC (Universal Concept)



uc_id (PK)
uc

KB (Knowledge Base)



entry_id (PK)
uc1_id

uc2_id
relation_type

So, basically, the KB is a collection of entries which represent binary connections of different types between UCs.

Now for my questions (please, bear with me if some of them sound stupid):

  1. While reading about the different ER relation types on the documentation of the modelling tool, I was having a hard time choosing among /identifying/, /non-identifying/ and /m:n/ relationships. Who is dependent and who is independent in the situation presented? Is it correct to think that the KB entity is dependent on the other because an entry needs universal concepts (two actually) to exist? In that case, what is the proper way of relating the entities UC and KB?
  2. Are the /uw1_id/ and /uw2_id/ attributes in KB foreign keys? Is it correct to say that, whenever the primary key of an entity appears as an attribute on another entity, it is a foreign key? In other modelling environments with which I have worked, I was able to directly link an attribute such as /uw1_id/ to its corresponding primary key on the associated entity. With the present tool [1], however, the way to achieve that seems not so straightforward (of course, this is inherent to my lack of knowledge both of the tool and the theory). In other words, the foreign keys are created by establishing relationships, not explicitly. In the present context, that means I had to set up two relationships between the entities: one for the /uw1_id/ attribute and another for the /uw2_id/ one. I am not sure, but somehow, that doesn't seem right.

I would be very grateful if someone would care to help me clarify my confusion with the above issues.

[1] CASE Studio 2.17

Thank you very much,

-- 
Ney André de Mello Zunino
Received on Mon Oct 25 2004 - 22:26:23 CEST

Original text of this message