Oracle reverse engineering

Discussions about database modeling product Cameo Data Modeler functionalities

Moderator: Moderators

Oracle reverse engineering

Postby tsf_ssg » Mon Oct 08, 2018 10:27 am

Hello,

I open this post because I have some problems when I use Cameo Data Modeler plugin to reverse from my Oracle database (DB).

Firstly, I created an Oracle DDL engineering set.
Then, I configured it to reverse data from my DB.
After that, I made a right-click on the created element and "reverse".
At the end of the process, I have my model with all my tables/views/functions.

Problem no1:
The members of primary/unique keys and index are unknown.
Indeed, Magicdraw knows that, for a table, there is a primary/unique key or an index but it doesn't know which column is member of that.

Exemple:
I have a table "ALARMES".
This table has a PK "PK_ALARMES".
When I open the properties of this PK, I find out that the property "Members" is empty. So I don't know what columns are affected by this constraint in my generated model.

However, when I reverse from a DDL file, the property "Members" for the same PK is not empty. It contains the reference of all columns which are part of the PK.

Problem no2:
At the end of the reversing process, I discovered that all the apostrophes " ' " were missing from the description of all my tables/columns.

For example:
In DB, I have this comment on a column: "C'est une alarme" (comments are in french)
In MD, after reversing, the same comment becomes: "Cest une alarme". The character " ' " disappear.

This problem occurs even if I reverse from DDL files.


I tried to change the driver class and driver files but it's not better.
I also tried to change the default encoding in project options but it hasn't no consequences on my problems.
So I'm not in the right way..

Please, can anyone help me by giving me some hints to find out the origin of these problems.

Thanks.
tsf_ssg
Forum Newbie
Forum Newbie
 
Posts: 1
Posts Rating:0
Joined: Mon Oct 08, 2018 9:37 am

Re: Oracle reverse engineering

Postby gedkvi » Tue Oct 09, 2018 2:28 am

Hello,

What is the version of MD that you are using?

I think that both of the issues are connected and they are related to quotes or double quotes interpretation.
1) Is it possible that the members contain quotes in their names? There was a fix in MD 19.0 that would deal with problems like in the example below. Although that was also visible in reversing from DDL.
Code: Select all
CREATE TABLE "TBL"."TEST" (     
   "zzz" NUMBER,
   CONSTRAINT "TEST_PK" PRIMARY KEY ("zzz") ENABLE
);

CREATE INDEX "TBL"."TEST_IDX" ON "ABR"."TEST" ("zzz");


2) As for the second issue, comments are currently stripped of all quotes, double quotes etc. in order to reverse them correctly. I don't really see how you were able to reverse the comment "C'est une alarme" using DDL without any warnings. Could you please attach this sample DDL?(it can contain only a few lines)

Sincerely,
No Magic Customer Support
gedkvi
Customer Support
Customer Support
 
Posts: 53
Posts Rating:7
Joined: Wed Sep 16, 2015 11:25 am

Re: Oracle reverse engineering

Postby telmo.santana@soprasteria.com » Tue Oct 09, 2018 3:45 am

Hello,
Thank you for your reply.
In my company, we are currently using MagicDraw and Cameo Data Modeler v18.4.

1) That is an example of what I have when I generate a DDL file for one table (with a PK) from Oracle SQL Developer before importing it into MagicDraw:
Code: Select all
CREATE TABLE owner.lst_msg (
    id_msg    NUMBER NOT NULL,
    message   VARCHAR2(500 BYTE) NOT NULL
)

CREATE UNIQUE INDEX owner.lst_msg_pk ON
    owner.lst_msg ( id_msg ASC );

ALTER TABLE owner.lst_msg
    ADD CONSTRAINT lst_msg_pk PRIMARY KEY ( id_msg )
        USING INDEX owner.lst_msg_pk;


In that case, I have all informations about members of indexes and PKs in the model generated by MagicDraw.

But when I reverse directly from database and not by using a DDL file generated by Oracle SQL Developer, I haven't informations about these members.

In the DDL code generated by Oracle SQL Developer there are no quotes in object's name.
So maybe it can be related to quotes like you say.


2)
In fact, like I say, I cannot reverse correctly a comment with an apostrophe ('). It's because, like you say, they are removed during the reversing process.
And I can't not only reverse correctly from the database but also from DDL files generated by another software like Oracle SQL Developer. In all cases this character is removed.

This is an extract of DDL generated by Oracle SQL Developer for a table which contains comments with an apostrophe:
Code: Select all
CREATE TABLE owner.day_alim_status (
    day_to_feed   DATE NOT NULL,
    status        NUMBER(*,0) DEFAULT 0 NOT NULL
)

COMMENT ON COLUMN owner.day_alim_status.day_to_feed IS
    'Journée concernée par l''alimentation';

COMMENT ON COLUMN owner.day_alim_status.status IS
    'Statut d''alimentation pour ce jour'
;


So when Oracle SQL Developer detects a comment with an apostrophe in DB, it adds a second apostrophe in the DDL file to indicate that it's not a quote.

Thank you in avance for your reply
telmo.santana@soprasteria.com
Forum Newbie
Forum Newbie
 
Posts: 1
Posts Rating:0
Joined: Tue Oct 09, 2018 2:56 am

Re: Oracle reverse engineering

Postby gedkvi » Thu Oct 11, 2018 8:39 am

Hello,

Could we please continue with these issues in our support system? Following steps may require sensitive information
Please write an email to support@nomagic.com and a ticket will be automatically created.

This way both of the issues can be investigated more deeply.

Sincerely,
No Magic Customer Support
gedkvi
Customer Support
Customer Support
 
Posts: 53
Posts Rating:7
Joined: Wed Sep 16, 2015 11:25 am


Return to Cameo Data Modeler

Who is online

Users browsing this forum: No registered users and 0 guests

cron