Re: CASE Survey

From: Gert de Boer <deboer_at_wsl34>
Date: 31 Jan 1994 11:03:12 GMT
Message-ID: <2iiohg$qif_at_elna.ethz.ch>


Richard D Holowczak (holowcza_at_andromeda.rutgers.edu) wrote: : dagmar_at_indian.mitre.org (Dagmar A. Bogan) writes:

: >* Not a clear one-to-one relationship between Dictionary contents and generated code  

:         I still have not experienced this.  Can someone give me
:         an example ?   CASE pulls information out of the dictionary
:         in some strange ways but once one is aware of how Dictionary
:         and Generator share information, it becomes, at least, predictable.
:       It seems most of the disparaging remarks mirror those posted by
:       a novice CASE user a few weeks ago.  I agree that Oracle CASE has
:       some problems however, after using the beta of CASE 5.1, it
:       is clear that Oracle has addressed many of the shortcomings
:       of CASE 5.0.

Well, I am this novice, still after working about 4 months with CASE, which at least says something about the learning curve.

The one to one relationship between dictionary and what it produces: of course it may be that something is not quite clear to me, but you referenced your self that it is not always simple to see what CASE does with your definitions. Is that in favour of CASE? However, her is my case with CASE. (I made the CASE reports a bit smaller, but they are still a little wide). I created three entities, one central entity, and two 'Code' entities, as a kind of lookup, and integrity check. EXP1 with its unique id, and PROPERTY1 and PROPERTY2 with both their unique id's:

                                EXP1 KEY

				PROPERTY1	CODE
						TEXT
				
				PROPERTY2	CODE
						TEXT

With their relations. I do not want column-prefixes, so I delete them from the table definitions. That may be the reason that it goes wrong, but I think it is a normal demand not to have those prefixes. (It makes trigger-writing awful.)

So, here the report:

Table / Column Entity / Attribute Comment

-------------------- -------------------- --------------------------------------
EXP2                 EXP2                 This is a source entity for this ORACLE table
                     - KEY                Attribute is part of the primary unique identifier


- KEY Format : NUMBER(2,0) NOT NULL - Primary key column added
PROPERTY1 Related entity is : PROPERTY1
- PROPERTY1_CODE - CODE *WARNING : Precision not defined hence default used
EACH EXP2 MUST BEO-Datenbank described by ONE AND ONLY ONE PROPERTY1 Format : NUMBER(1,0) NOT NULL - Foreign key column added No relationships known from PROPERTY1, so no foreign key PROPERTY2 Related entity is : PROPERTY2
- PROPERTY2_CODE - CODE EACH EXP2 MUST BEO-Datenbank described by ONE AND ONLY ONE PROPERTY2
Format : NUMBER(1,0) NOT NULL - Foreign key column added No relationships known from PROPERTY2, so no foreign key PROPERTY1 PROPERTY1 This is a source entity for this ORACLE table - CODE Attribute is part of the primary unique identifier - TEXT Attribute of current entity
- CODE - CODE *WARNING : Precision not defined hence default used
Format : NUMBER(1,0) NOT NULL - Primary key column added
- TEXT - TEXT Format : CHAR(10) NOT NULL - Attribute column added
No relationships known from PROPERTY1, so no foreign key PROPERTY2 PROPERTY2 This is a source entity for this ORACLE table - CODE Attribute is part of the primary unique identifier - TEXT Attribute of current entity
- CODE - CODE Format : NUMBER(1,0) NOT NULL - Primary key column added
- TEXT - TEXT Format : CHAR(10) NOT NULL - Attribute column added
No relationships known from PROPERTY2, so no foreign key

This one is okay.

Then, e.g. I realize I made some mistake, and I drop the table EXP2 with 'delete elements'.

When I am ready (e.g. added some other attributes or so), I create it again. The report:

Table / Column Entity / Attribute Comment

-------------------- -------------------- ---------------------------------------------------------------
EXP2                 EXP2                 This is a source entity for this ORACLE table
                     - KEY                Attribute is part of the primary unique identifier


- KEY Format : NUMBER(2,0) NOT NULL - Primary key column added
PROPERTY1 Related entity is : PROPERTY1 Related table has a primary key : creating foreign key as copy
- CODE EACH EXP2 MUST BEO-Datenbank described by ONE AND ONLY ONE PROPERTY1
Format : NUMBER(1,0) NOT NULL - Foreign key column added PROPERTY2 Related entity is : PROPERTY2 Related table has a primary key : creating foreign key as copy
- CODE EACH EXP2 MUST BEO-Datenbank described by ONE AND ONLY ONE PROPERTY2
Format : NUMBER(1,0) NOT NULL - Foreign key column added ^

   ^
   ^

In the first place, CASE creates someting different, so what you get depends on the history of your dictionary, and there is not a one to one relationship between entities and tables. In the second place it is totally wrong. CASE generates, without hesitation, a DDL-script with two columns with the same name in the same table. At least I would expect an error-message somewhere. Why, e.g. is the name of the column not part of a unique key in the dictionary?

Can you explain why this happens?

(Using CASE 5.0.22.0.0)



Gert de Boer
Swiss federal institute for forest, snow and landscape research (WSL)
Zurcherstrasse 111
8903 Birmensdorf
Switzerland
phone: +4117392577
fax: +4117392215
e-mail:deboer_at_wsl.ethz.ch
Received on Mon Jan 31 1994 - 12:03:12 CET

Original text of this message