Relational Models Sequence Order

Is there any way to amend the display order of relational models that are listed under the 'Relational Models' node? - a sequence attribute would be nice.

a sequence attribute would be niceMay be order by name will be enough.
Philip

Similar Messages

  • Engineering from relational model to logical model duplicated views

    Hi all,
    Several times, also in different projects, when I engineer from relational model to the logical model, the comparator tool show me de differences.
    In these differences there are no view differences, but when I finish the process everything goes right except that in the logical model under views, I see all the views duplicated with [view_name]v1.
    I've tried not selecting the view checkbox, in the compare dialog,but I get duplicated views also.
    I don't know fir sue if this happens with table also.
    What can I do to solve this problem? Is this a bug?
    Edited by: morfeo8marc on 04-abr-2012 2:02

    The problem is fixed in DM 3.1.1.703 and it's published. You can run following script and save design in order to get mappings for views recovered.
    Philip
    lmodel = model.getDesign().getLogicalDesign();
    rmodels = model.getDesign().getRelationalDesigns().toArray();
    for (var i = 0; i < rmodels.length; i++) {
    rm = rmodels;
    eviews = lmodel.getEntityViewSet().toArray();
    for (var k = 0; k < eviews.length; k++) {
    ev = eviews[k];
    tv = rm.getTableViewSet().getObjectByID(ev.getGeneratorID());
    if(tv == null){
    tv = rm.getTableViewSet().getObjectGeneratedBy(ev);
    if(tv != null){
    rm.getRMExtendedMap().createMapping(ev,tv);

  • Engineer to Relational Model: deleted attributes / undeleted columns

    Hello,
    I am using Datamodeler 3.3.0.744.
    I'm modifying an existing logical model: I'm deleting one or more attributes in an Entity.
    Then I'm executing "Engineer to Relational Model" in oder to get an up to date Relational Model (it existed already).
    The corresponding columns are not deleted in the Relational Model, even though attributes don't exist anymore at the logical level.
    I can't find any option available in order to do that...
    In the previous release (3.1), it worked fine, I could choose the behavior related to the deleted attributes (deleting or not deleting corresponding columns).
    Edited by: user4995029 on 27 mai 2013 02:43

    When your forward engineer for a 2nd time you should see a dialog that has the logical on the left and the relational on the right. Entities that are new or changes have an exclamation point next to them. If you open that you will eventually drill down to see the attribute/columns. Where your dropped an attribute it will say "To drop". The check box is unchecked by default. If you check it then when you forward engineer those should get dropped from the associated table.
    Is it not working that way in 3.3?

  • Problem when engineering to relational model

    I have modeled everything in Logical model and then engineered it to the relational model. Now I have to make some changes, and I'm doing them in Logical model. When I'm engineering it to Relational, although I just altered one single item, I see that it's also bringing some other entities as altered. Inpecting these I see that all of them relate to identifying foreign keys with more than one column. For examplo, I have an entity with 2 columns as primary key, and a second entity with an identifying foreign key to the first, and a third column, based on a sequence, which, all three of them, are the second tables primary key. Everything is OK, I haven't changed anything on any of these entities, but when I'm engineering to relational, it creates a duplicate of one of the columns on the relational model, and alters it's name appendig a number 1 after it. If I try engineering again, it is going to create another column appending a number 2 and so on.... I think this is a bug.... am I right?
    My alternate solution is to drop the foreign key on the relational model, thus dropping both columns, and then engineering from Logical again. Everything keeps working fine, until I close my model. When I open it again, the same problem reappears....

    Philip,
    Sorry for my too late reply, as I forgot to flag this discussion to notify me via e-mail. Thanks for your response, but I was actually using DM 4.0.1.836 and this issue still persisted.
    I just downloaded DM 4.0.2.840, and the issue still persists. I just opened my original model and, without making any changes, tried to forward engineer from logical to relational, and it brings up differences on exactly the same tables.
    Wolf
    P.S.: I've gone through the motions of dropping the FKs on the relational model, dropping any orphaned columns (from these FKs) and re-engineering. Afterwards, I saved and closed all models, closed the application, opened it again and opened my model and the issue persists.
    I also created a new model, with some tables using the same principles, and no error occurred, although in this new model I didn't create a physical model.
    Is it possible that something is wrong with my original model?

  • Sharing tables between relational models

    Can I share (not copy) table between two relational models in SQL Developer Data Modeler? Something like sharing tables between application systems in Oracle Designer. I have one database schema for reusable kernel of many applications and I want to have one relational model for it. And I need to use tables from kertnel in other applications (database schemas). I need for example to make FK between application and kernel table. How can I do it?

    Hi,
    you can use drag&drop from browser to diagram of target model in order to do that. Table becomes read-only in target model. You can use "Synchronize remote objects" to get actual status of such "remote" table
    Philip

  • External table to relational model

    Hi,
    During a data dictionary import, tables, views, mat views and sequences are "propagated" up to the relational model level, but external tables do not. I think it would be useful if external tables could also be "brought up" to the relational level since an external table is only a different kind of physical structure.
    Regards,
    Gellért

    I am seconding the request to be able to use External tables in the same manner that tables can be used within the Data Modeler. they can be imported into the Physical model, but not in the relational models.

  • Working with Object Relational model and Eclipse

    Hello,
    I have mad some types and typed tables in a schema on oracle 10g.
    My database respects the Object Relational model, in which I work with VARRAY, TYPES, NESTED TABLES, PL/SQL,...
    I have already install Enterprise Pack for Eclipse, and also have the Weblogic server, And I can generate tables. But the problem is that it gives to me this tables with wrong types, until they contains in fact other tables as Objet column, and also the types are not supported.
    Please need a help !
    Thank's in advance :)

    nhauge wrote:
    Hi,
    I want to make sure I understand the problem but will try to give you some information as well. So you have an Oracle 10g database in which you are using the object-relational database model with VARRAY's, etc. You say you are also trying to generate tables, but the generation is not working correctly. Are you using the "Generate tables from entities..." functionality? What is the source of the generated tables? I assume you generating from some type of JPA entity? Could you give a small example of the source you are generating from?
    In order to generate proper tables of this type, you would need to be using special TopLink/EclipseLink annotations such as @Array so the persistence provider would know that they are "special" and not just regular entities that would create standard relational tables.
    Neil
    Thank you for your replay,
    well I'm generating that with "Generate tables from entities" of eclipse link.
    this is an example of what I have in the database:
    [DB-SCRIPT|http://www.mediafire.com/view/?n3knwz1o4ggk50n]
    and this is what is generated(eclipselink-orm.xml):
    <?xml version="1.0" encoding="UTF-8"?>
    <entity-mappings version="1.2" xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eclipse.org/eclipselink/xsds/persistence/orm http://www.eclipse.org/eclipselink/xsds/eclipselink_orm_1_2.xsd">
         <entity class="model.Chefterritoire" access="VIRTUAL">
              <attributes>
                   <id name="idChef" attribute-type="long">
                        <column name="ID_CHEF"/>
                   </id>
                   <basic name="lesterritoires" attribute-type="Object">
                   </basic>
                   <basic name="nomChef" attribute-type="String">
                        <column name="NOM_CHEF"/>
                   </basic>
                   <basic name="tel" attribute-type="java.math.BigDecimal">
                   </basic>
              </attributes>
         </entity>
         <entity class="model.Client" access="VIRTUAL">
              <attributes>
                   <id name="idClient" attribute-type="long">
                        <column name="ID_CLIENT"/>
                   </id>
                   <basic name="adresseClient" attribute-type="String">
                        <column name="ADRESSE_CLIENT"/>
                   </basic>
                   <basic name="dateP" attribute-type="java.util.Date">
                        <column name="DATE_P"/>
                        <temporal>DATE</temporal>
                   </basic>
                   <basic name="lescommandes" attribute-type="Object">
                   </basic>
                   <basic name="nomClient" attribute-type="String">
                        <column name="NOM_CLIENT"/>
                   </basic>
                   <basic name="profession" attribute-type="String">
                   </basic>
                   <basic name="refrepresentant" attribute-type="Object">
                   </basic>
                   <basic name="telClient" attribute-type="java.math.BigDecimal">
                        <column name="TEL_CLIENT"/>
                   </basic>
              </attributes>
         </entity>
         <entity class="model.Commande" access="VIRTUAL">
              <attributes>
                   <id name="idCommande" attribute-type="long">
                        <column name="ID_COMMANDE"/>
                   </id>
                   <basic name="dateCommande" attribute-type="java.util.Date">
                        <column name="DATE_COMMANDE"/>
                        <temporal>DATE</temporal>
                   </basic>
                   <basic name="dateLivraison" attribute-type="java.util.Date">
                        <column name="DATE_LIVRAISON"/>
                        <temporal>DATE</temporal>
                   </basic>
                   <basic name="refreleve" attribute-type="Object">
                   </basic>
                   <basic name="refrepresentant" attribute-type="Object">
                   </basic>
                   <basic name="refvehicule" attribute-type="Object">
                   </basic>
                   <basic name="reprise" attribute-type="String">
                   </basic>
              </attributes>
         </entity>
         <entity class="model.Constructeur" access="VIRTUAL">
              <attributes>
                   <id name="idConstructeur" attribute-type="long">
                        <column name="ID_CONSTRUCTEUR"/>
                   </id>
                   <basic name="adresseConstructeur" attribute-type="String">
                        <column name="ADRESSE_CONSTRUCTEUR"/>
                   </basic>
                   <basic name="lesreleves" attribute-type="Object">
                   </basic>
                   <basic name="nomConstructeur" attribute-type="String">
                        <column name="NOM_CONSTRUCTEUR"/>
                   </basic>
                   <basic name="refvehucule" attribute-type="Object">
                   </basic>
              </attributes>
         </entity>
         <entity class="model.LesccommandesN" access="VIRTUAL">
              <table name="LESCCOMMANDES_N"/>
              <attributes>
              </attributes>
         </entity>
         <entity class="model.LescommandessN" access="VIRTUAL">
              <table name="LESCOMMANDESS_N"/>
              <attributes>
              </attributes>
         </entity>
         <entity class="model.LescommandesN" access="VIRTUAL">
              <table name="LESCOMMANDES_N"/>
              <attributes>
              </attributes>
         </entity>
         <entity class="model.LesoptionsN" access="VIRTUAL">
              <table name="LESOPTIONS_N"/>
              <attributes>
              </attributes>
         </entity>
         <entity class="model.LesrepresentantsN" access="VIRTUAL">
              <table name="LESREPRESENTANTS_N"/>
              <attributes>
              </attributes>
         </entity>
         <entity class="model.LessclientsN" access="VIRTUAL">
              <table name="LESSCLIENTS_N"/>
              <attributes>
              </attributes>
         </entity>
         <entity class="model.LesscommandesN" access="VIRTUAL">
              <table name="LESSCOMMANDES_N"/>
              <attributes>
              </attributes>
         </entity>
         <entity class="model.LesterritoiresN" access="VIRTUAL">
              <table name="LESTERRITOIRES_N"/>
              <attributes>
              </attributes>
         </entity>
         <entity class="model.LesvehiculesN" access="VIRTUAL">
              <table name="LESVEHICULES_N"/>
              <attributes>
              </attributes>
         </entity>
         <entity class="model.Modele" access="VIRTUAL">
              <attributes>
                   <id name="idModele" attribute-type="long">
                        <column name="ID_MODELE"/>
                   </id>
                   <basic name="couleurExterieure" attribute-type="String">
                        <column name="COULEUR_EXTERIEURE"/>
                   </basic>
                   <basic name="couleurInterieure" attribute-type="String">
                        <column name="COULEUR_INTERIEURE"/>
                   </basic>
                   <basic name="lesoptions" attribute-type="Object">
                   </basic>
                   <basic name="lesvehicules" attribute-type="Object">
                   </basic>
                   <basic name="prix" attribute-type="double">
                   </basic>
              </attributes>
         </entity>
         <entity class="model.Option" access="VIRTUAL">
              <table name="OPTIONS"/>
              <attributes>
                   <id name="idOption" attribute-type="long">
                        <column name="ID_OPTION"/>
                   </id>
                   <basic name="nomOption" attribute-type="String">
                        <column name="NOM_OPTION"/>
                   </basic>
                   <basic name="refmodele" attribute-type="Object">
                   </basic>
              </attributes>
         </entity>
         <entity class="model.Rapportvisite" access="VIRTUAL">
              <attributes>
                   <id name="idRapport" attribute-type="long">
                        <column name="ID_RAPPORT"/>
                   </id>
                   <basic name="dateVisite" attribute-type="java.util.Date">
                        <column name="DATE_VISITE"/>
                        <temporal>DATE</temporal>
                   </basic>
                   <basic name="frais" attribute-type="double">
                   </basic>
                   <basic name="refclient" attribute-type="Object">
                   </basic>
                   <basic name="refrepresentant" attribute-type="Object">
                   </basic>
                   <basic name="resultat" attribute-type="String">
                   </basic>
              </attributes>
         </entity>
         <entity class="model.Releve" access="VIRTUAL">
              <attributes>
                   <id name="idReleve" attribute-type="long">
                        <column name="ID_RELEVE"/>
                   </id>
                   <basic name="dateDebut" attribute-type="java.util.Date">
                        <column name="DATE_DEBUT"/>
                        <temporal>DATE</temporal>
                   </basic>
                   <basic name="dateFin" attribute-type="java.util.Date">
                        <column name="DATE_FIN"/>
                        <temporal>DATE</temporal>
                   </basic>
                   <basic name="lescommandes" attribute-type="Object">
                   </basic>
                   <basic name="refconst" attribute-type="Object">
                   </basic>
              </attributes>
         </entity>
         <entity class="model.RelevesN" access="VIRTUAL">
              <table name="RELEVES_N"/>
              <attributes>
              </attributes>
         </entity>
         <entity class="model.Remise" access="VIRTUAL">
              <attributes>
                   <id name="idRemise" attribute-type="long">
                        <column name="ID_REMISE"/>
                   </id>
                   <basic name="remise" attribute-type="double">
                   </basic>
              </attributes>
         </entity>
         <entity class="model.Representant" access="VIRTUAL">
              <attributes>
                   <id name="idRepresentant" attribute-type="long">
                        <column name="ID_REPRESENTANT"/>
                   </id>
                   <basic name="lesclients" attribute-type="Object">
                   </basic>
                   <basic name="lescommandes" attribute-type="Object">
                   </basic>
                   <basic name="nomRepresentant" attribute-type="String">
                        <column name="NOM_REPRESENTANT"/>
                   </basic>
                   <basic name="refterritoire" attribute-type="Object">
                   </basic>
                   <basic name="typeRep" attribute-type="String">
                        <column name="TYPE_REP"/>
                   </basic>
              </attributes>
         </entity>
         <entity class="model.Territoire" access="VIRTUAL">
              <attributes>
                   <id name="idTerritoire" attribute-type="long">
                        <column name="ID_TERRITOIRE"/>
                   </id>
                   <basic name="lesrepresentants" attribute-type="Object">
                   </basic>
                   <basic name="nomTerritoire" attribute-type="String">
                        <column name="NOM_TERRITOIRE"/>
                   </basic>
                   <basic name="refchef" attribute-type="Object">
                   </basic>
              </attributes>
         </entity>
         <entity class="model.Vehicule" access="VIRTUAL">
              <attributes>
                   <id name="idVehicule" attribute-type="long">
                        <column name="ID_VEHICULE"/>
                   </id>
                   <basic name="lescommandes" attribute-type="Object">
                   </basic>
                   <basic name="nomVehicule" attribute-type="String">
                        <column name="NOM_VEHICULE"/>
                   </basic>
                   <basic name="refavoir" attribute-type="Object">
                   </basic>
                   <basic name="refmodele" attribute-type="Object">
                   </basic>
              </attributes>
         </entity>
         <entity class="model.Visiteav" access="VIRTUAL">
              <attributes>
                   <id name="idVisiteav" attribute-type="long">
                        <column name="ID_VISITEAV"/>
                   </id>
                   <basic name="dateDebut" attribute-type="java.util.Date">
                        <column name="DATE_DEBUT"/>
                        <temporal>DATE</temporal>
                   </basic>
                   <basic name="dateFin" attribute-type="java.util.Date">
                        <column name="DATE_FIN"/>
                        <temporal>DATE</temporal>
                   </basic>
                   <basic name="refclient" attribute-type="Object">
                   </basic>
                   <basic name="refrepresentant" attribute-type="Object">
                   </basic>
              </attributes>
         </entity>
    </entity-mappings>

  • Renaming Foreign Keys in the Relational Model

    Hi,
    I'm new to Data Modeler, we are using v 3.0.0.66.5 and Oracle 11g, and I'm trying to build a Logical and Relational model for a new application.
    We always name our Primary Keys as ID, this is causing me a problem with my Foreign Keys names in the Relational Model, as they are showing as ID#. Is there a way to add the abbr. of the table to the Foreign Key?
    Thanks in Advance
    Sue

    I always do that job using Naming Standard Templates. This sequence renames ALL FK COLUMNS for ALL TABLES only in RELATIONAL MODEL:
    -Preferences > Data Modeler > Naming Standards > templates
    -into the box "Column Foreign Key"
    -Put something like that: {ref table}_{ref column}
    -Then, go into your modeler tree, select the relational model, right click and use "Apply Naming Standards to Keys and Constraints"
    -deselect all
    -select the last option "Column Foreign Key"
    -Go.
    What if the names still collide? What if you want to do the job for some--but-not-ALL tables? forget the method above. A transformation script will do that.
    You'll need some of these building blocks:
    - table.getFKAssociations()
    - keys.getRemoteTable().getAbbreviation()
    - column.setName()
    I'm novice to script coding, sorry I can't assemble a scripted solution right now.
    Edited by: T. on May 31, 2011 8:50 AM

  • Select schemas from relational model on import from data dictionary option

    Hi All,
    I have one relational model with 3 diferent schemas,
    I want to compare one of my schemas with the data dictionary I have in a database,
    I select the import option in the general file menu, select from data dictionary option,
    select the connection from my database,swap target model checked,select a physical model and select the objects i want to compare from the database,
    My problem is that the result is the comparison between all the objects in my model and the objects in the database that I have selected,
    what I really want is to compare a list of objects in my model to a list of objects in my database,
    this could be possible? or always need to compare all the objects of the model?
    Thanks in advance

    Hi jbellver,
    there is no any development in DM 3.1.0.691 on that problem. In production release you'll be able to compare objects in subview with database or just to select several objects and compare them with database. And of course "generate in DDl" filtering still can be used - it works at "Compare dialog" level.
    Philip

  • Tables related to PM order for actual and commitment items

    Hello Experts,
    I need help in finding the tables related to PM order for actual and commitment items.
    I need develop a report which can show the actual and commitment items for each order and Operation/component under that each ITEM wise and its related documents.
    For the component we can find the table RESB.
    But i am getting the difficult to find the data related to Operation (services)
    In my client we can able to see PM orders with activity types and SKF
    How can build the logic to find the values for each operation item and its commitments (PO, PR) and actual that is FI documents
    Please guide me the   TABLES and fields or else give me the hints, how can find the tables
    Thanks and Regards,
    Narendra

    Hi,
    The tables are COEP (actuals) and COOI (commitments); that is if you mean the financial figures.
    Regards,
    Eli

  • How can i import tables from a different schema into the existing relational model... to add these tables in the existing model? plss help

    how can i import tables from a different schema into the existing relational model... to add these tables in the existing relational/logical model? plss help
    note; I already have the relational/logical model ready from one schema... and I need to add few more tables to this relational/logical model
    can I import the same way as I did previously??
    but even if I do the same how can I add it in the model?? as the logical model has already been engineered..
    please help ...
    thanks

    Hi,
    Before you start, you should probably take a backup copy of your design (the .dmd file and associated folder), in case the update does not work out as you had hoped.
    You need to use Import > Data Dictionary again, to start the Data Dictionary Import Wizard.
    In step 1 use a suitable database connection that can access the relevant table definitions.
    In step 2 select the schema (or schemas) to import.  The "Import to" field in the lower left part of the main panel allows you to select which existing Relational Model to import into (or to specify that a new Relational Model is to be created).
    In step 3 select the tables to import.  (Note that if there are an Foreign Key constraints between the new tables and any tables you had previously imported, you should also include the previous tables, otherwise the Foreign Key constraints will not be imported.)
    After the import itself has completed, the "Compare Models" dialog is displayed.  This shows the differences between the model being imported and the previous state of the model, and allows you to select which changes are to be applied.
    Just selecting the Merge button should apply all the additions and changes in the new import.
    Having updated your Relational Model, you can then update your Logical Model.  To do this you repeat the "Engineer to Logical Model".  This displays the "Engineer to Logical Model" dialog, which shows the changes which will be applied to the Logical Model, and allows you to select which changes are to be applied.
    Just selecting the Engineer button should apply all the additions and changes.
    I hope this helps you achieve what you want.
    David

  • How to find the level of each child table in a relational model?

    Earthlings,
    I need your help and I know that, 'yes, we can change'. Change this thread to a answered question.
    So: How to find the level of each child table in a relational model?
    I have a relacional database (9.2), all right?!
         O /* This is a child who makes N references to each of the follow N parent tables (here: three), and so on. */
        /↑\ Fks
       O"O O" <-- level 2 for first table (circle)
      /↑\ Fks
    "o"o"o" <-- level 1 for middle table (circle)
       ↑ Fk
      "º"Tips:
    - each circle represents a table;
    - red tables no have foreign key
    - the table in first line of tree, for example, has level 3, but when 3 becomes N? How much is N? This's the question.
    I started thinking about the following:
    First I have to know how to take the children:
    select distinct child.table_name child
      from all_cons_columns father
      join all_cons_columns child
    using (owner, position)
      join (select child.owner,
                   child.constraint_name fk,
                   child.table_name child,
                   child.r_constraint_name pk,
                   father.table_name father
              from all_constraints father, all_constraints child
             where child.r_owner = father.owner
               and child.r_constraint_name = father.constraint_name
               and father.constraint_type in ('P', 'U')
               and child.constraint_type = 'R'
               and child.owner = 'OWNER') aux
    using (owner)
    where child.constraint_name = aux.fk
       and child.table_name = aux.child
       and father.constraint_name = aux.pk
       and father.table_name = aux.father;Thinking...
    Let's Share!
    My thanks in advance,
    Philips
    Edited by: BluShadow on 01-Apr-2011 15:08
    formatted the code and the hierarchy for readbility

    Justin,
    Understood.
    Nocycle not work in 9.2 and, even that would work, would not be appropriate.
    With your help, I decided a much simpler way (but there is still a small problem, <font color=red>IN RED</font>):
    -- 1
    declare
      type udt_roles is table of varchar2(30) index by pls_integer;
      cRoles udt_roles;
    begin
      execute immediate 'create user philips
        identified by philips';
      select granted_role bulk collect
        into cRoles
        from user_role_privs
       where username = user;
      for i in cRoles.first .. cRoles.count loop
        execute immediate 'grant ' || cRoles(i) || ' to philips';
      end loop;
    end;
    -- 2
    create table philips.root1(root1_id number,
                               constraint root1_id_pk primary key(root1_id)
                               enable);
    grant all on philips.root1 to philips;
    create or replace trigger philips.tgr_root1
       before delete or insert or update on philips.root1
       begin
         null;
       end;
    create table philips.root2(root2_id number,
                               constraint root2_id_pk primary key(root2_id)
                               enable);
    grant all on philips.root2 to philips;
    create or replace trigger philips.tgr_root2
       before delete or insert or update on philips.root2
       begin
         null;
       end;
    create table philips.node1(node1_id number,
                               root1_id number,
                               node2_id number,
                               node4_id number,
                               constraint node1_id_pk primary key(node1_id)
                               enable,
                               constraint n1_r1_id_fk foreign key(root1_id)
                               references philips.root1(root1_id) enable,
                               constraint n1_n2_id_fk foreign key(node2_id)
                               references philips.node2(node2_id) enable,
                               constraint n1_n4_id_fk foreign key(node4_id)
                               references philips.node4(node4_id) enable);
    grant all on philips.node1 to philips;
    create or replace trigger philips.tgr_node1
       before delete or insert or update on philips.node1
       begin
         null;
       end;
    create table philips.node2(node2_id number,
                               root1_id number,
                               node3_id number,
                               constraint node2_id_pk primary key(node2_id)
                               enable,
                               constraint n2_r1_id_fk foreign key(root1_id)
                               references philips.root1(root1_id) enable,
                               constraint n2_n3_id_fk foreign key(node3_id)
                               references philips.node3(node3_id) enable);
    grant all on philips.node2 to philips;
    create or replace trigger philips.tgr_node2
       before delete or insert or update on philips.node2
       begin
         null;
       end;                          
    create table philips.node3(node3_id number,
                               root2_id number,
                               constraint node3_id_pk primary key(node3_id)
                               enable,
                               constraint n3_r2_id_fk foreign key(root2_id)
                               references philips.root2(root2_id) enable);
    grant all on philips.node3 to philips;
    create or replace trigger philips.tgr_node3
       before delete or insert or update on philips.node3
       begin
         null;
       end;                          
    create table philips.node4(node4_id number,
                               node2_id number,
                               constraint node4_id_pk primary key(node4_id)
                               enable,
                               constraint n4_n2_id_fk foreign key(node2_id)
                               references philips.node2(node2_id) enable);
    grant all on philips.node4 to philips;
    create or replace trigger philips.tgr_node4
       before delete or insert or update on philips.node4
       begin
         null;
       end;                          
    -- out of the relational model
    create table philips.node5(node5_id number,
                               constraint node5_id_pk primary key(node5_id)
                               enable);
    grant all on philips.node5 to philips;
    create or replace trigger philips.tgr_node5
       before delete or insert or update on philips.node5
       begin
         null;
       end;
    -- 3
    create table philips.dictionary(table_name varchar2(30));
    insert into philips.dictionary values ('ROOT1');
    insert into philips.dictionary values ('ROOT2');
    insert into philips.dictionary values ('NODE1');
    insert into philips.dictionary values ('NODE2');
    insert into philips.dictionary values ('NODE3');
    insert into philips.dictionary values ('NODE4');
    insert into philips.dictionary values ('NODE5');
    --4
    create or replace package body philips.pck_restore_philips as
      procedure sp_select_tables is
        aExportTablesPhilips     utl_file.file_type := null; -- file to write DDL of tables   
        aExportReferencesPhilips utl_file.file_type := null; -- file to write DDL of references
        aExportIndexesPhilips    utl_file.file_type := null; -- file to write DDL of indexes
        aExportGrantsPhilips     utl_file.file_type := null; -- file to write DDL of grants
        aExportTriggersPhilips   utl_file.file_type := null; -- file to write DDL of triggers
        sDirectory               varchar2(100) := '/app/oracle/admin/tace/utlfile'; -- directory \\bmduhom01or02 
        cTables                  udt_tables; -- collection to store table names for the relational depth
      begin
        -- omits all referential constraints:
        dbms_metadata.set_transform_param(dbms_metadata.session_transform, 'REF_CONSTRAINTS', false);
        -- omits segment attributes (physical attributes, storage attributes, tablespace, logging):
        dbms_metadata.set_transform_param(dbms_metadata.session_transform, 'SEGMENT_ATTRIBUTES', false);
        -- append a SQL terminator (; or /) to each DDL statement:
        dbms_metadata.set_transform_param(dbms_metadata.session_transform, 'SQLTERMINATOR', true);
        -- create/open files for export DDL:
        aExportTablesPhilips := utl_file.fopen(sDirectory, 'DDLTablesPhilips.pdc', 'w', 32767);
        aExportReferencesPhilips := utl_file.fopen(sDirectory, 'DDLReferencesPhilips.pdc', 'w', 32767);
        aExportIndexesPhilips := utl_file.fopen(sDirectory, 'DDLIndexesPhilips.pdc', 'w', 32767);
        aExportGrantsPhilips := utl_file.fopen(sDirectory, 'DDLGrantsPhilips.pdc', 'w', 32767);
        aExportTriggersPhilips := utl_file.fopen(sDirectory, 'DDLTriggersPhilips.pdc', 'w', 32767);
        select d.table_name bulk collect
          into cTables -- collection with the names of tables in the schema philips
          from all_tables t, philips.dictionary d
         where owner = 'PHILIPS'
           and t.table_name = d.table_name;
        -- execution
        sp_seeks_ddl(aExportTablesPhilips,
                     aExportReferencesPhilips,
                     aExportIndexesPhilips,
                     aExportGrantsPhilips,
                     aExportTriggersPhilips,
                     cTables);
        -- closes all files
        utl_file.fclose_all;
      end sp_select_tables;
      procedure sp_seeks_ddl(aExportTablesPhilips     in utl_file.file_type,
                             aExportReferencesPhilips in utl_file.file_type,
                             aExportIndexesPhilips    in utl_file.file_type,
                             aExportGrantsPhilips     in utl_file.file_type,
                             aExportTriggersPhilips   in utl_file.file_type,
                             cTables                  in out nocopy udt_tables) is
        cDDL       clob := null; -- colletion to save DDL
        plIndex    pls_integer := null;
        sTableName varchar(30) := null;
      begin
        for i in cTables.first .. cTables.count loop
          plIndex    := i;
          sTableName := cTables(plIndex);
           * Retrieves the DDL and the dependent DDL into cDDL clob       *      
          * for the selected table in the collection, and writes to file.*
          begin
            cDDL := dbms_metadata.get_ddl('TABLE', sTableName, 'PHILIPS');
            sp_writes_ddl(aExportTablesPHILIPS, cDDL);
          exception
            when dbms_metadata.object_not_found then
              null;
          end;
          begin
            cDDL := dbms_metadata.get_dependent_ddl('REF_CONSTRAINT', sTableName, 'PHILIPS');
            sp_writes_ddl(aExportReferencesPhilips, cDDL);
          exception
            when dbms_metadata.object_not_found2 then
              null;
          end;
          begin
            cDDL := dbms_metadata.get_dependent_ddl('INDEX', sTableName, 'PHILIPS');
            sp_writes_ddl(aExportIndexesPhilips, cDDL);
          exception
            when dbms_metadata.object_not_found2 then
              null;
          end;
          begin
            cDDL := dbms_metadata.get_dependent_ddl('OBJECT_GRANT', sTableName, 'PHILIPS');
            sp_writes_ddl(aExportGrantsPhilips, cDDL);
          exception
            when dbms_metadata.object_not_found2 then
              null;
          end;
          begin
            cDDL := dbms_metadata.get_dependent_ddl('TRIGGER', sTableName, 'PHILIPS');
            sp_writes_ddl(aExportTriggersPhilips, cDDL);
          exception
            when dbms_metadata.object_not_found2 then
              null;
          end;
        end loop;
      end sp_seeks_ddl;
      procedure sp_writes_ddl(aExport in utl_file.file_type,
                              cDDL    in out nocopy clob) is
        pLengthDDL  pls_integer := length(cDDL);
        plQuotient  pls_integer := null;
        plRemainder pls_integer := null;
      begin
          * Register variables to control the amount of lines needed   *
         * for each DDL and the remaining characters to the last row. *
        select trunc(pLengthDDL / 32766), mod(pLengthDDL, 32766)
          into plQuotient, plRemainder
          from dual;
          * Join DDL in the export file.                            *
         * ps. 32766 characters + 1 character for each line break. *
        -- if the size of the DDL is greater than or equal to limit the line ...
        if plQuotient >= 1 then
          -- loops for substring (lines of 32766 characters + 1 break character):
          for i in 1 .. plQuotient loop
            utl_file.put_line(aExport, substr(cDDL, 1, 32766));
            -- removes the last line, of clob, recorded in the buffer:
            cDDL := substr(cDDL, 32767, length(cDDL) - 32766);
          end loop;
        end if;
          * If any remains or the number of characters is less than the threshold (quotient = 0), *
         * no need to substring.                                                                 *
        if plRemainder > 0 then
          utl_file.put_line(aExport, cDDL);
        end if;
        -- record DDL buffered in the export file:
        utl_file.fflush(aExport);
      end sp_writes_ddl;
    begin
      -- executes main procedure:
      sp_select_tables;
    end pck_restore_philips;<font color="red">The problem is that I still have ...
    When creating the primary key index is created and this is repeated in the file indexes.
    How to avoid?</font>

  • Need to show data related to Process order request , BOM in a smart form

    Hi,
    I need to show data related to
    •     Process order request
    •     BoM
    Now in selection screen we are entering the followings.
    Manufacturing  Plant ,MRP Controller, Production scheduler, Order type , Order , Material, Sales order, WBS Element,Release,Scheduled start, Scheduled finish ,Selection profile.
    how to get 1> Process Order number,Produced Material,Material Description,Print date,Narcotics indicator , Quantity produced , Phase number , Phase description ,Resource description,Standard value  to show in a request form.
      2> Item category ,Component code,Component description , Component quantity ,Component Unit of measure ,BoM base quantity.
    Please help me how to get those values , what should be the aaproach , how to write the select quiry.
    Thanks

    Hi
    To get BOM details, do the following:
    1. Use the material number and goto Article to BOM link table (MAST) to get STLNR (BOM).
    2. With this STLNR, goto STPO table (where STLNR is the key field).  Here you will get all the BOM details like components (IDNRK), UoM (MEINS) etc....
    Hope this helps.
    THanks
    Vijay
    <b>PLZ REWARD POINTS IF HELPFUL</b>

  • Sql datamodeler: Engineer to relational model: General Options

    Hello
    When you engineer your logical model to a relational model you get a wizard. In lower part of this wizard byou have several tabs, one of the tabs is called general.
    On this general tab you have check box: Apply Name Translation
    The corresponding help text:
    Apply Name Translation: Controls whether formal names are translated to abbreviated names when the logical model is forward engineered to a relational model, and whether abbreviated names are translated to format names when a relational model is reverse engineered to the logical model. Name translation is applied only for valid names. In addition, translations between the words entity/attribute/key and table/column/index are performed.
    Does anybody have a clue what is meant here?
    Regards Erik

    Erik,
    you have to create glossary (tools>Glossary editor) with words permitted for usage in names in logical model. For each word you can define abbreviation that will be used in transformation process.
    Example:
    Employee - EMP
    Salary - SAL
    Attribute "Employee Salary" will be transformed to column "EMP_SAL".
    You can define preferred abbreviation for entities and attributes and it can be used instead of glossary definitions.
    You also have to set your glossary in "Tools>General Options>Naming standards>Glossary"
    Best regards,
    Philip

  • Logical model fwd engineer to relational model.  Missing FK relationships

    We are experiencing missing relationships in the relational model when engineering from logical model to the relational model. The logical model objects have properly defined primary keys defined. We are using SQL Data Modeler v3.1.700. Any suggestions on how to engineering these relationships without deleting the objects from the relational model.
    Thanks,
    Ed

    Hi Ed,
    I presume you had some relationships in the Logical Model that you were expecting to be engineered to Foreign Key relationships in the Relational Model.
    Please can you provide more detail to help resolve your problem. For example:
    Was the problem on an initial engineer from the logical model? Or on a re-engineer?
    Are you using Entity subtyping in your Logical Model?
    Are there any relevant error messages in the log file? (This is normally file datamodeler.log in folder datamodeler\datamodeler\log.)
    David

Maybe you are looking for