home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.databases.theory:415 comp.databases:6396
- Newsgroups: comp.databases.theory,comp.databases
- Path: sparky!uunet!usc!sol.ctr.columbia.edu!ira.uka.de!chx400!bernina!neptune!apelc8.inf.ethz.ch!rys
- From: rys@apelc8.inf.ethz.ch (Michael Rys)
- Subject: Re: Different representation of entity-relation diagrams
- Message-ID: <1992Aug28.090536.16369@neptune.inf.ethz.ch>
- Sender: news@neptune.inf.ethz.ch (Mr News)
- Nntp-Posting-Host: apelc8.inf.ethz.ch
- Organization: Dept. Informatik, Swiss Federal Institute of Technology (ETH), Zurich, CH
- References: <1992Aug27.154114.23295@eng.umd.edu>
- Distribution: usa
- Date: Fri, 28 Aug 1992 09:05:36 GMT
- Lines: 60
-
- There is also this notation:
-
- |> One-to-One:
- |> +----------+ /----------\ +----------+
- |> | Entity_1 | <------- | Relation | -------> | Entity_2 |
- |> +----------+ \----------/ +----------+
-
- +----------+ (a,1) /----------\ (a,1) +----------+
- | Entity_1 | --------- | Relation | --------- | Entity_2 |
- +----------+ \----------/ +----------+
-
- |> One-to-Many:
- |> +----------+ /----------\ +----------+
- |> | Entity_1 | <------- | Relation | ------>> | Entity_2 |
- |> +----------+ \----------/ +----------+
-
- +----------+ (a,1) /----------\ (b,n) +----------+
- | Entity_1 | --------- | Relation | --------- | Entity_2 |
- +----------+ \----------/ +----------+
-
- |> Many-to-One:
-
- viceversa.
-
- where:
-
- a = 0 or 1.
- b = 0, 1 or n.
- n > 1 or *.
-
- The type of the above relation can be represented as:
-
- RelT = <Ent1T, Ent2T>
-
- To express the cardinality, we use:
-
- card(RelT) = < (x1,y1), (x2,y2) > where xi, yi = b.
-
- The first number xi of the tuple gives the required minimal number of the
- Entity_i in that relation, yi the required maximal number.
-
- This information belongs to the integrity constraints of the data model.
-
- For example:
-
- Works_ForT = <EmpT, ChefT>
- card(Work_ForT) = < (1,1), (1,*) >
-
- means
-
- Every employee has exactly one chef, each chef has at least one employee.
- Thus, this is a strict hierarchical relation.
-
- Hope this helps
- Michael
- --
- Michael Rys Institute for Informationsystems/Databases ETH Zuerich
- Voice: priv. +41 1 242 35 87 bus. +41 1 254 72 57 Fax: +41 1 262 39 73
- -- Wovon man nicht sprechen kann, darueber muss man schweigen. --
- Ludwig Wittgenstein, Tractatus logico-philosophicus
-