Ziay Chat Forums

Ziay!

General Discussion Forum

what are the properties of a relationship?

This is a discussion on what are the properties of a relationship? within the General Chat forums, part of the Main Category category; in database technology we have have relationships. now i would like the charatersistics....





Go Back   Ziay Chat Forums > Main Category > General Chat

FAQ Members List Mark Forums Read
Old 06-14-2008, 04:44 PM   #1
Junior Member
 
sipathas's Avatar
 
Join Date: Jun 2008
Posts: 1

in database technology we have have relationships. now i would like the charatersistics.
sipathas is offline   Reply With Quote
Old 06-14-2008, 04:44 PM   #2
Junior Member
 
Join Date: Jun 2008
Posts: 1
Default

There are many.

The first and most important is the property of 'existence'. Not the exitence of the relationship, but the existence of the "independent" (or 'top') table.

+---+........+---+
| A |-------<| B |
+---+........+---+

In the above example, table B is said to depend on table A. This is also called 'referential integrity'.

So, the first thing a relationship tells you is which of the two tables have to have a row in them for a row in the other one to be created.

Next a relationship has the characteristic of cardinality. The word 'cardinality' means 'how many'. In the above example, one row of table B can relate to only one row of table A, and one row of table A can relate to many rows of table B.

The next quality is opionality. Can a row in A exist without a row in B, and can a row in B exist without a row in A?

+---+........+---+
| A |-+----O<| B |
+---+........+---+

In the above representation (using IDEF1X) a row in A can exist with no rows in B, but a row in B cannot exist without a row in A.

+---+........+---+
| A |-O----+<| B |
+---+........+---+

Here is the opposite condition. A row in A cannot exist without at least one row in B but a row in B can exist without a row in A (but if it is related to a row in A it is only related to one row).

The last quality is (according to some) the most important. It is the quality of meaning (semantics). This is important because it is only when data is placed in the context of a meaningful relationship with other data that "Information" is formed.

+--------+....BEGETS....+-------+
| FATHER |-------------<| CHILD |
+--------+..............+-------+

Here we see that this relationship shows which child was sired by which father. This can be completely different than which child is reared by which father. Therefore we can have two relationships between the tables:

+--------+....BEGETS....+-------+
|........|-+----------O<|.......|
| FATHER |..............| CHILD |
|........|-O----------O<|.......|
+--------+ REARS +-------+

So even though the two relationships have the same 'existence dependency' and the same cardinality they do not have the same meaning.

The sad thing is that there are children who are not raised by a parent (the optionality of the REARS relationship) but who are sired by some father who has abandoned them.
keystuckkk is offline   Reply With Quote

Powered by vBulletin® Version 3.7.1