Data Modeller DML Generator messed up

Hi.
I've been workling with Oracle Data Modelle5r 3.0.0.665 and I found that the DML Generator adds objects that have not been requested to generate as well as omits objects that are requiere to generate. The DML in the Physical Model Generator and the DML Generator in the Relational Model are inconsisten between each other.
Are these reported bugs?
Thanks

Much lighter.
The capture design captures very quickly in comparison.
Data Modeler does cubes where Designer does not.
Designer does API generate where Data Modeler does not.
so there are some trade off's. However Designer will be desupported at the end of this year.

Similar Messages

  • SQL Dev Data Modeller:  Auto-generate Surrogate PKs in the Physical Model ?

    How can I have the logical modeller allow the user to design with logical PKs, but then have surrogate primary keys be auto-generated off sequences by the modeller when it comes to create the physical model - as in conventional application design?
    Without this facility, this tool is useless, IMO.
    I want:
    i). sequences to become the physical PKs by default, and that what were the logical PKs in the logical model, to become a unique key in the physical model.
    ii). I want this set by default when generating the physical model....
    iii). ....with an option to turn this off on a entity-by-entity basis (as not all tables will necessarily require such a surrogate PK; so the logical PK may remain the physical PK).

    It is common practice that physical PKs in Oracle tables are defined from sequences (surrogate PKs), and that the logical PK from the entity becomes a unique key in the table.
    This may not always be the case in every application out there, and some people may disagree, but it is nonetheless a needed feature.
    My new Feature Request is therefore:
    I would like to see the following additions to the product.
    1. In the Preferences -> Data Modeler -> Model -> Logical, a flag that by default indicates whether the designer wishes to opt to enable this feature (ie; have all logical PKs converted to unique keys, and replaced by sequence nos. in the physical model). This flags needs to be there since in real life, albeit erroneously IMO, some people will choose not to opt to use this functionality.
    2. On every entity created in the model, there needs to be a flag that allows to override this default option, as not every table will require a surrogate PK to be generated. Being able to (re)set a flag located on the entity properties (perhaps under 'Engineer To'), will accomplish this.
    3. When Forward Engineering to the physical model from the logical, the following should happen.
    ENTITY  1 ---------->TABLE 1
    ---------------------> P * Surrogate PK
    * Attribute 1 -----> U * Column 1
    * Attribute 2 -----> U * Column 2
    o Attribute 3 ----------> Column 3
    Here you can see,
    - Attributes 1 & 2 (the logical PK) of the entity become a unique key in the table (columns 1 & 2),
    - optional Attribute 3 becomes NULLable column 3,
    - and a physical surrogate PK column is added (type unbounded INTEGER, PRIMARY KEY constraint added).
    From entity DEPT as:   (Examples based on SCOTT schema)
    DEPTNO NUMBER(2) NOT NULL <-- Logical primary key on entity
    DNAME VARCHAR2(14)
    LOC VARCHAR2(13)
    CREATE TABLE DEPT
    (PK_DEPT INTEGER, -- New column becomes surrogate physical PK, driven from sequence defined later
    DEPTNO NUMBER(2) NOT NULL, -- Former logical PK becomes a UK
    DNAME VARCHAR2(14),
    LOC VARCHAR2(13))
    ALTER TABLE DEPT
    ADD CONSTRAINT PK_DEPT PRIMARY KEY (PK_DEPT) USING INDEX PCTFREE 0
    ALTER TABLE DEPT
    ADD CONSTRAINT UKLPK_DEPTNO UNIQUE (DEPTNO) USING INDEX PCTFREE 0 -- Former logical PK becomes a UK (constraint name reflects this)
    CREATE SEQUENCE PK_DEPT_SEQ
    CREATE TRIGGER PK_DEPT_SEQ_TRG
    BEFORE INSERT ON DEPT
    FOR EACH ROW
    WHEN (new.PK_DEPT IS NULL)
    BEGIN
    SELECT PK_DEPT_SEQ.NEXTVAL
    INTO :new.PK_DEPT
    FROM DUAL;
    -- Or from 11g onwards, simply,
    :new.PK_DEPT := PK_DEPT_SEQ.NEXTVAL;
    END;
    From entity EMP as:
    EMPNO NUMBER(4) NOT NULL -- Logical primary key on entity
    ENAME VARCHAR2(10)
    JOB VARCHAR2(9)
    MGR NUMBER(4)
    HIREDATE DATE
    SAL NUMBER(7,2)
    COMM NUMBER(7,2)
    DEPTNO NUMBER(2)
    CREATE TABLE EMP
    (PK_EMP INTEGER, -- New column becomes surrogate physical PK, driven from sequence defined later
    FK_DEPT INTEGER, -- New FK to surrogate PK in DEPT table (maybe NOT NULL depending on relationship with parent)
    EMPNO NUMBER(4) NOT NULL, -- Former logical PK becomes a UK
    ENAME VARCHAR2(10),
    JOB VARCHAR2(9),
    MGR NUMBER(4),
    HIREDATE DATE,
    SAL NUMBER(7,2),
    COMM NUMBER(7,2),
    DEPTNO NUMBER(2))
    ALTER TABLE EMP
    ADD CONSTRAINT PK_EMP PRIMARY KEY (PK_EMP) USING INDEX PCTFREE 0
    ALTER TABLE EMP
    ADD CONSTRAINT FK_DEPT FOREIGN KEY (FK_DEPT) REFERENCES DEPT (PK_DEPT)
    ALTER TABLE EMP
    ADD CONSTRAINT UKLPK_EMPNO UNIQUE (EMPNO) USING INDEX PCTFREE 0 -- Former logical PK becomes a UK (constraint name reflects this)
    CREATE SEQUENCE PK_EMP_SEQ
    CREATE TRIGGER PK_EMP_SEQ_TRG
    BEFORE INSERT ON EMP
    FOR EACH ROW
    WHEN (new.PK_EMP IS NULL)
    BEGIN
    SELECT PK_EMP_SEQ.NEXTVAL
    INTO :new.PK_EMP
    FROM DUAL;
    -- Or from 11g onwards, simply,
    :new.PK_EMP := PK_EMP_SEQ.NEXTVAL;
    END;
    [NOTE:   I use PCTFREE 0 to define the index attributes for the primary & unique keys since the assumption is that they will in general not get updated, thereby allowing for the denser packing of entries in the indexes and the (albeit minor) advantages that go with it.
    This is certainly always true of a sequence-driven primary key (as it is by its very nature immutable), but if the unique key is likely to be frequently updated, then this PCTFREE option could be user-configurable on a per table basis (perhaps under Table Properties -> unique Constraints).
    For non-sequence-driven primary keys, this storage option could also appear under Table Properties -> Primary Key.
    I notice no storage options exist in general for objects, so you may like to consider adding this functionality overall].
    Associated Issues :
    - Preferences, 'Naming Standard: Templates' should be updated to allow for the unique key/constraint to be called something different, thus highlighting that it comes from the logical PK. I've used 'UKLPK' in this example.
    - Mark the physical PK as being generated from a sequence; perhaps a flag under Table Properties -> Primary Key.
    - When Forward Engineering, if an entity exists without a logical PK, the forward engineering process should halt with a fatal error.
    !!! MODERATOR PLEASE DELETE ME !!!

  • Sqldeveloper data modeler -  DDL generatation

    The generation use text with ^M for new lines.
    I am running on windows.
    The generation of DDL for a sequence :-
    CREATE SEQUENCE SIDDWSLTOTOEVENT_TEAM_DT
    There are ^M.
    The blank line between the end of the DDL and its closing ';' causes it to be ignored in sqlplus.
    Is there a switch that can change the newline usage xODxOA from^M?
    These scripts may have to run on Unix or windows.

    Generating the DDL with Include Comments selected generates empty lines before each CREATE table statement and just before the comment - even inside a statement. sqlplus does not like that.
    checkbox Include Comments not selected:
    ALTER TABLE SCAN_POLICY_REL
        ADD CONSTRAINT SCAN_POLICY_REL_PK PRIMARY KEY ( SCAN_ID, POLICYID ) ;
    CREATE TABLE SCAN_RUN
         SCAN_RUN_ID NUMBER  NOT NULL ,
         START_TIME TIMESTAMP (0) ,
         END_TIME TIMESTAMP (0) ,
         SCAN_RUN_STATE CHAR DEFAULT 'N'  NOT NULL CHECK ( SCAN_RUN_STATE IN ('N', 'P', 'R', 'T')) ,
         SCAN_ID NUMBER  NOT NULL
    ;checkbox Include Comments selected (Observe: one line more before the CREATE, and one blank line before the comment)
    ALTER TABLE SCAN_POLICY_REL
        ADD CONSTRAINT SCAN_POLICY_REL_PK PRIMARY KEY ( SCAN_ID, POLICYID ) ;
    CREATE TABLE SCAN_RUN
         SCAN_RUN_ID NUMBER  NOT NULL ,
         START_TIME TIMESTAMP (0) ,
         END_TIME TIMESTAMP (0) ,
    --  {New, Running, Paused, Terminated}
    SCAN_RUN_STATE CHAR DEFAULT 'N'  NOT NULL CHECK ( SCAN_RUN_STATE IN ('N', 'P', 'R', 'T')) ,
         SCAN_ID NUMBER  NOT NULL
    ;

  • Generate ER Diagram from Sql Data Modeler

    Hi,
    I want to use the Oracle Sql Developer Data Modeler to generate ER diagram for my schema. There are huge number of tables in this schema, so I would like to identify only those tables which need to be selected for generating my ER diagram.
    Basically, I want only those table which are having relationship with other tables here. The reason being, if I select all tables in the schema then I would get those tables in the ER diagram which don't have any relationship with other tables.
    Can someone please suggest writing queries which yield this from data dictionary?
    Thanks.

    Well, your requirement is based on the the database schemas having been designed with proper primary key and foreign key constraints in place.  If they're not there then the database doesn't know about the relationships between tables, and such relationships are just theoretical (and as such usually controlled by the application that uses them).
    Of course there are also tables that are used by applications for lookups and other reasons, so they're part of the application and should be included on ER diagrams, even if they have no direct relationship to any one table (or they could have relationships to many tables).
    So, rather than try and write queries to figure out what tables are required, why not let the Data Modeller tool generate an ER diagram from the information that IS known about on the database, and then you can see if the relationships exist, or if they're missing and need manually putting on the diagram (or applying to the database).

  • SQL Data Modeler 3.0 EA1 trying to create primary key on OT

    Hi,
    I'm trying to modify a primary key of an object table that was reversed (imported) from an Oracle 11.2.x RDBMS and am getting the error message "Incomplete Index definition". It is showing in the window "Index Columns Assignment". I get to the 'Primary Key Properties' window by pressing the 'Properties' button on the 'Table Properties' -> 'Primary Key'. If I try to edit the expression and then press the Ok or Apply buttons I get the error. With this be fixed in the production version? Will we be able to create a model in SQL Developer Data Modeler that generates a SQL statement similar to the following:
    ALTER TABLE x_flags
    ADD (CONSTRAINT x_flags_pk PRIMARY KEY (flags.id))
    Thanks,
    Scott K

    Hi Scott,
    I'm trying to modify a primary key of an object table that was reversed (imported) from an Oracle 11.2.x RDBMS and am getting the error message "Incomplete Index definition"... With this be fixed in the production version?yes
    Will we be able to create a model in SQL Developer Data Modeler that generates a SQL statement similar to the following:
    ALTER TABLE x_flags
    ADD (CONSTRAINT x_flags_pk PRIMARY KEY (flags.id))I assume "flags" is column of object type and "id" is attribute of that type. I logged bug for that, so there will be support however not for 3.0.
    Philip

  • Data Model Extension

    Hi Techies,
    Could you please look at the below scenario and provide your valuable inputs.
    Scenario: I am trying to load the Cost Centers from ECC to MDG via MDMGX t code. The CR is not being created and data is not being loaded to the MDG Cost center tables and it shows the error message (Message type MDG_COST_CENTERS: error in XML transformation) from the logs.
    Root cause identified:  The issue was coming because of ZZWERKS field in extracted file from CSKS table. Import program is not able to map this
    field since it doesn’t exist in MDG data model.
    Confirmation: Tried loading a single cost center without having ZZWERKS field from XML and the data got loaded to MDG tables via MDMGX
    olution: Extended the data 0G with a new field ZZ_PLANT and activated the data model. Generated the respective structures for Cost centers.
    Issue: EVenthough extended the data model, when I try to laod the CC data, It shows the same error message as 'Error in XML Transformation' but this time the CR gets created and a very minimal amount of data(not all the data from ECC) is being loaded to MDG tables.
    And also im checking to map the new fields using SMT Tool, I couldnt create the mapping between source and target structures. Because, the target structure doesnt show this newly added ZZWERKS field to map with. where as the extended field zz_plant in 0G model could be seen in the source structures.
    Could you please help if I am missing any thing here
    Thanks,
    Anusha

    Hi Shankar,
    Thanks for your response.
    In my scenario, my target structure is MDGF_COST_CTR_RPLCTN_REQ_COST. In Ecc, already the the fields ZZWERKS  is added. So, the target structure wouldnt be inheriting the ECC structure while mappping. Do we have to add it separately. This target structure has Proxy generated internal structures for the Cost center data. Could you please check and advise.
    Thanks,
    Anusha

  • BIP Trial 11.1.1..6: Error while generating XML data in Data Model

    Hello,
    I have created a Data Model with a single query. After saving the DM and clicking on the XML icon to generate sample data, I get the following error:
    The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
    End tag 'span' does not match the start tag 'img'. Error processing resource 'http://localhost:7001/xmlpserver/servlet/xdo'...
    *<table style='background=color: #d9e5ef; margin-top: 10px;' width='100%' cellspacing='0' cellpadding='0' border='0' summa...*
    I have verified that the SQL runs without errors in SQL Developer using the same connection parameters as whats used in the DM.
    There are no html tags/key-words etc being used in the sql our it's output.
    Is there a a way to debug this? This is extremely frustrating. Especially since the same sql works without any issues in Oracle Reports.
    Thanks,
    Manish

    ya i can understand we wont do the sql logic at the data model part as some time performance issue may come when comparaed to sql run in package and sql running in data model . so i have mostly done using package and i will just do select * from table in the data set of data model so i didn't face any issue's like this .
    once check this tutorial may be you already
    i use to create parameters like this i didn't face any issue
    SELECT * from TEST where ID=:p_id
    http://st-curriculum.oracle.com/obe/fmw/bi/bip/bip11g/gettingstarted/gettingstarted.htm

  • How to generate the java code of a table's data model by parsing it's FXML?

    I have know how to create FXML file that describes a table. Meanwhile, according to [Oracle Tutorial|http://docs.oracle.com/javafx/2/fxml_get_started/fxml_tutorial_intermediate.htm#CACFEHBI], it is a best practice to implement a class that defines the data model and provides methods and fields to further work with the table.
    However, It's rather cumbersome and time consuming to typing the code. So, is there any tools that can generate the java code of a table's data model by parsing it's FXML describe file?
    Regards, Qinn
    Edited by: 854675 on Oct 7, 2012 11:02 PM

    I have know how to create FXML file that describes a table. Meanwhile, according to [Oracle Tutorial|http://docs.oracle.com/javafx/2/fxml_get_started/fxml_tutorial_intermediate.htm#CACFEHBI], it is a best practice to implement a class that defines the data model and provides methods and fields to further work with the table.
    However, It's rather cumbersome and time consuming to typing the code. So, is there any tools that can generate the java code of a table's data model by parsing it's FXML describe file?
    Regards, Qinn
    Edited by: 854675 on Oct 7, 2012 11:02 PM

  • SQL DEVELOPER DATA MODELER GENERATE DOCUMENTATION

    Hi,
    Simple question. Is it possible to generate database documentation, based on data table field notes, that we write in DATA MODELER? THX

    Hi Marcus,
    there is no build-in reports in current release that can be used to generate such documentation.
    You can use export "to reporting schema" in order to get meta data in Oracle database and can build own reports.
    There will be reports coming with next release.
    Philip

  • Data Modeler can't generate a FK?

    I have a table with 3 FK constraints. Import if from the DB into data modeler and one FK constraint is gone.
    Trying to generate it in the model (using it only for documentation anyway) and "New FK Relation" button doesn't do a thing but annoy me with a message: "Incomplete FK definition". However, it doesn't tell me what exactly is incomplete and I suppose clicking on one table and the other should provide enough information to process FK generation, especially since the first table has a PK and the second table has non-PK column with the same data type as first table's PK.
    Is this a bug or is there some sense behind the erratic behavior?

    First - are the PK column and the target FK column the same size? Having the same datatype is not enough for SDDM, they must be the same size as well. Once you draw the FK line between the source and target tables you should be seeing a FK properties dialog. In that there is a set of options on the left pane that includes a link for selecting the columns in the FK. Once you see that there is a drop down list for to select the target FK column. If your column is not in that list, there is something off in the column definition such that it does not match the source PK. In that case you will need to modify the target column definition before the tool will let you use it in the FK.

  • [Data Modeler] FK aren't generated

    Hello !
    When I export my model to DDL PK and Unique constraint are exported correctly, but Data Modeler generate only indexes on FK and don't generate FK constraints itself.
    But i've the last version of Oracle SQL Data Modeler, i'v checked the checkbox to generate FK, and I can't get theses constraints in DDL export.
    Have you an idea for solving this problem ?
    Benjamin Regnier

    In the Preferences there is an option to to not create indexes on FK.

  • How to generate data model summary report

    Hi,sir,
    How can I generate a summary report when I create a server data model in designer 9i as some software did.
    I know CA Erwin or Sybase powerdesigner have a good report builder.
    It is easy to use. How about designer 9i?
    Any tutorial?

    Hi,
    It's look like you are assuming that an organizational model can be created from external data input via a report. If so, then your assumption is wrong. There is no standard way to create a org. model from external input.
    As a standard practice SAP provided a report as mentioned in the previous reply. Using this report you can download ECC/R3 org. model into SAP CRM. This is the easy and best proven way of generating org. model in SAP CRM.
    Please let me know, if you need any further clarification
    Do not forget to reward if it helps
    Regards,
    Paul Kondaveeti

  • Generate Data model from Class model

    I am using JDeveloper uml features for a first time, so I am interested if there is a option that I can generate class model to the data model.
    If I have class model and than when right-click select Generate , there is a option to generate data model from it.
    But it is dimmed. Is there any precondition to achieve before this option become possible.
    Thanks in advance .

    The link you mentioned has the Prerequisites,
    Do include all the jar in you path.
    It will resolve all your issues.

  • Data Modeler : Generate direct to a schema / Reverse engineering

    Hi everybody,
    I searched for informations in the help but I didn't found any interesting information.
    I would like to know :
    - If it's possible to generate the relation model directly to a schema? If yes, where can I found documentation?
    - Is it possible to create some scripts with reverse engineering (as Designer)?
    Thanks in advance!

    Hi Cedric,
    If it's possible to generate the relation model directly to a schema?no
    Is it possible to create some scripts with reverse engineeringYou can generate DDL script for objects in relational and physical model - press "Generate DDL" icon when you are in relational model or use "File>Export>DDL File".
    You also can generate "alter statements" when you compare relational model to database, DDL files or another design.
    You can look at available demonstrations http://www.oracle.com/technetwork/developer-tools/datamodeler/overview/index.html
    Philip

  • Data Modeler - Naming Conventions

    I was using Oracle Designer for several year.
    This product could drive you crazy because sometimes, but the strength was in my opinion the datamodelling part.
    It saved you a lot of time because you kept stuck to the logical model generated your relational model and had all scripts satisfying all naming conventions you needed.
    In Data Modeler i really miss the naming conventions and can't understand some parts, sometimes somebody here can help me if i have overseen something or it is just not implemented.
    Naming conventions as example:
    We work with surrogate keys.
    Two well known tables - Employees (abbreviation EMP), Departments (abbreviation DEP)
    They have one relation 1:N one department has many employees
    In Designer i would define the EMPLOYEE entity, would set the table-abbreviation, the attributes and the primary key.
    The same with DEPARTMENT. I would design it WITHOUT any column for the foreign key constraint.
    Then i would create a relation between this two tables.
    Last step is to generate the relational model.
    a) Designer automatically adds ID as surrogate key on every table (you could configure that, it was dependent on a domain)
    b) it automatically adds the table abbreviation as prefix on every column (even here it's configurable)
    c) it automatically adds the a foreign key column in the child table with the prefix of the master table (f.e. EMP_DEP_ID or DEP_ID if you prefer not to prefix every column... what i do)
    It was really easy to get your scripts.
    Things i don't understand in Data Modeler:
    In a logical model you should design entities, attributes and relations and don't mess around with FK-columns.
    Is there any support for surrogate keys? I don't wanna add an ID manually with every table.
    In Data Modeler an additional COLUMN(!) is added with every Foreign key relation, i could live with that, but there is no way to tell
    Data Modeler to prefix it automatically. The name can just be changed in the Relational View afterward.
    P.S.
    Surrogate Keys.... There are some pros and cons for/against this out there. I have seen a lot of Oracle Projects and in all except one i always had a surrogate key column. It really makes life
    easier. In the one no-surrogate-key-project we began to add surrogate keys after a while...

    COLUMN(!) is added with every Foreign key relation, i could live with that, but there is no way to tell
    Data Modeler to prefix it automaticallyLook at "General options>Naming Standard>templates" - you can define template for FK columns/attributes and then apply them for whole relational/logical model using "Apply Naming .." functionality from pop-up menu in the browser. For Logical model (FK attributes) - you also need to clear related setting at "General options>Logical>Keep as the name of originating attribute".
    Templates are also used when objects are created, thus when new FK is created, then templates are used to generate name for foreign key and FK columns. Well you have to define table and column abbreviation in order to get them used in generated names - Re: Data Modeler: Naming
    There is no support for surrogate keys in current release.
    Philip

Maybe you are looking for