What notation is used for the ER Diagram in Sybase Central?

asked 20 May '12, 15:32

Gatz's gravatar image

Gatz
16112
accept rate: 0%


It is simply a "Relational Schema Diagram", and I don't think there are any competing notations with fancy names... it is not Not NOT an ER diagram. See http://myweb.lmu.edu/dondi/share/db/relational1.pdf

Sybase Central's use of the term "entity-relationship diagram" is a complete exaggeration because the only information Sybase Central has to go on is the physical relational database... so it can't draw an ER diagram.

In particular, each physical table is represented by an "entity" box in the diagram. For example, the ml_passthrough table implements a many-to-many relationship between the ml_database and the ml_passthrough_script entities, but all three are shown as entities in the diagram.

-- DBA.ml_passthrough (table_id 752) in SQL Anywhere 12 Demo - May 22 2012 1:08:08PM - Print - Foxhound © 2011 RisingRoad

CREATE TABLE DBA.ml_passthrough ( -- empty
   remote_id       /* PK FK     */ VARCHAR ( 128 ) NOT NULL,
   run_order       /* PK        */ INTEGER NOT NULL,
   script_id       /*    FK     */ INTEGER NOT NULL,
   last_modified                   TIMESTAMP NOT NULL DEFAULT current timestamp,
   CONSTRAINT ASA134 PRIMARY KEY (
      remote_id,
      run_order )
 );
-- Parents of DBA.ml_passthrough
-- DBA.ml_database 
-- DBA.ml_passthrough_script
-- Children
-- none --
ALTER TABLE DBA.ml_passthrough ADD CONSTRAINT ml_database NOT NULL FOREIGN KEY (
      remote_id )
   REFERENCES DBA.ml_database (
      remote_id )
   ON UPDATE RESTRICT ON DELETE RESTRICT;
ALTER TABLE DBA.ml_passthrough ADD CONSTRAINT ml_passthrough_script NOT NULL FOREIGN KEY (
      script_id )
   REFERENCES DBA.ml_passthrough_script (
      script_id )
   ON UPDATE RESTRICT ON DELETE RESTRICT;

In a serious entity-relationship diagram, it is possible to tell entities apart from relationships; e.g., boxes versus diamonds:

http://wofford-ecs.org/dataandvisualization/ermodel/material.htm

alt text

Also, the lines in an entity-relationship diagram show cardinality, whereas all the lines in a relational database diagram represent foreign key relationships which are pretty much all 1-to-many. A "foreign key relationship" is NOT the same as a relationship in an entity-relationship diagram (and to confuse matters further "relation" means "table" in the relational model).

When a logical entity-relationship diagram is implemented as a real-world relational database, a lot of information in the diagram is lost; i.e., it is not recorded in the system tables which define the database. Therefore, it is impossible for Sybase Central, or any computer program, or any human being for that matter, to reconstruct the entity relationship diagram from the physical database... more information is required.

...well, in theory, one could write code in check constraints and triggers that would implement the missing features from the entity-relationship diagram, but nobody does that... they do it in application code, if they do it at all.

permanent link

answered 22 May '12, 13:20

Breck%20Carter's gravatar image

Breck Carter
32.5k5417261050
accept rate: 20%

edited 23 May '12, 08:35

Have you got an example of something you don't understand from an ER diagram - you might get an answer if you can clarify the question a bit.

permanent link

answered 22 May '12, 05:37

Justin%20Willey's gravatar image

Justin Willey
7.6k137179249
accept rate: 20%

It's not that I have a problem with anything. I just need to know what notation its using since I'm writing a paper about a database that I created in SQL Anywhere.

(22 May '12, 12:21) Gatz
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×2

question asked: 20 May '12, 15:32

question was seen: 7,806 times

last updated: 07 Jul '14, 08:02