9 Replies Latest reply: Aug 21, 2013 10:11 AM by Vitaliy_V RSS

    Domains usage in SQL Developer data MODELER

    Vitaliy_V

      Hi,

       

      I'm trying to understand how to use Domains in Oracle SQL Developer Data Modeler. We use version 3.1.3 .  before I used Toad Modeler  where domains are just part of your main design.

      Oracle data modeler has some different concept.

       

      let's assume I'm working on 2 designs:  DesignA and DesignB that include relational models.

      DesignA and Design B should use domains but list of domains in design A is very different than in design B.

       

      Default domain file is located on c: drive where SqlModeler is installed. It is obviously unacceptable , so I need to change Default System Type directory in preferences.

      And of course I want to have different domain directories for DESIGN A and DESIGN B.

       

      So when I open design A then I changed   Default System Type directory  let's say to x:\AAA.   Then i close design A and open Design B and change Default System Type directory to x:\BBB

       

      I checked folders AAA and BBB and they  have necessary XML files there:  defaultdomains.xml, defaultRFDBSSites and so on....

       

      Now questions:

      can I rename defaultdomains.xls to something else like AAAdomains.xls?  Domain administration can edit any domain file with any name , but how  can I associate certain domain file with my design?  My wish , when I open my design , then corresponding domain file will be open automatically.  Is it possible?

       

      If I open 2 designs in Sql Modeler and switch between designs  then corresponding domain files should be changed automatically as well.  Currently   I shouldn't forget to change default System Type directory every time when I switch models.  Is it the only way to handle it?

       

      Thanks

      vitaliy

        • 1. Re: Domains usage in SQL Developer data MODELER
          Dimitar Slavov-Oracle

          Hi Vitaliy,

           

          The current production version of DM is 3.3. Also there is 4.0 Early Adopter available for download.

          You might take a look here:

          unable to create new domain file

           

          Regards

          • 2. Re: Domains usage in SQL Developer data MODELER
            Philip Stoyanov-Oracle

            Hi Vitaliy,

             

            We use version 3.1.3

            I recommend always to use the latest version. If you don't want to use beta (DM 4.0 EA is out) you can use DM 3.3.

            Otherwise Oracle SQL Developer Data Modeler supports two types of domains:

            1) DM installation domains - those in file defaultdomains.xml

            2) Design level domains - they are stored in design directories and are visible to particular design only. They can be created in following ways:

            2.1 Manually - there is a property "Domains file" and you id it's not set "defaultdomains" domain will become design level domain and will be stored in file with provided name (without .xml extension)

            You can change later the file for design level domains, however you cannot change file for domain already in defaultdomains.xml.

            2.2 Using types to domains wizard you can generate design level domains

            2.3 Design level domains are created during import of  DDL files (controlled in preferences)

            2.4 You can import domains from specific file with domains using "File>Import>Domains" - you need to rename the source file if it's named defaultdomains.xml otherwise you'll get domains as installation domains

             

            If the list with domains is too long you can define  a list with preferred domains (or/and logical types) in "Preferences>Data Modeler>Model" and you can use shorter list in Table/Entity dialog if check "Preferred" check box next to "Type:" combo box.

            If I open 2 designs in Sql Modeler and switch between designs  then corresponding domain files should be changed automatically as well

            If you open 2 designs in one instance of DM they will use the same file with default domains i.e. you'll lose domains in one of design depending of setting for "system data type directory". You need to go with design level domains.

             

            Philip

            • 3. Re: Domains usage in SQL Developer data MODELER
              Vitaliy_V

              Thanks Philip for your detail explanation.  I definitely need design level domains.

               

              I decided to follow your option 2.4 because I already had about 50 good domain definitions in my defaultdomains.xls

              But I'm still not sure if everything is right.

              What I did:

              I copied my defaultdomain.xls file into c:\temp and remain it as wwdomains.xls.  Then I import this file.

              As result  folder domains was created inside of my design.    the folder has 2 files:

              wwdomains.xml  -  21KB

              wwdomains.xml.xml - 1KB

              The second file includes description of only one domain ( list of values) that I created recently in default domains.

              Is it right import result?

              But after I made correction in domain administartion , then file  wwdomains.xml  is disappeared and file wwdomains.xml.xml changed date modified.

               

              How can I check if my design uses default domains or design level domains?

               

               

              I'm not sure how to use property Domains file in Domain Administration. It is empty now.  If I type ther some name , then what?

               

              Thanks again

              Vitaliy

              • 4. Re: Domains usage in SQL Developer data MODELER
                Philip Stoyanov-Oracle

                Before importing you should delete default domains (or can rename the file with them ) . Probably that is the cause of your problems.

                for property "Domains file" - just type file name there (or you can select one of already existing) - like domain_file1 or file2


                Philip

                • 5. Re: Domains usage in SQL Developer data MODELER
                  Vitaliy_V

                  Sorry Phyllip for delay with answer.   I still don't undertand how domains work in SQL Modeller  although I try many different ways.

                   

                  I did rename defualtdomains.xls and import  domain file.

                   

                  Result is:  I see right list of domains in Domain administartion.  File name is empty. What file does "Domain Administartion" read?  i remind you that defaultdomains.xls in default location ( SQLMODELER) home doesn't exist

                  But ERD diagram and DDL scripts don't see any domains.  What location of domain file does ERD/DDL read?

                   

                  You mentioned property:  "2.1 Manually - there is a property "Domains file". Did you mean Domain adminstartion form where i can see this property?  I don't undertand how to use it?   Could you explain?   can I associate more than one domain file with the same model?

                   

                  If you open deafualtdomains.xls you can see the following tags:

                  <DomainFile class="oracle.dbtools.crest.model.design.DomainFileWrapper" fileName="defaultdomains">   (  The second line)

                  and each Domain has tag:

                           <fileName>defaultdomains</fileName>

                  Does it mean that you can combine references to different domain files in the same file?  Ot they are always should be the same names?

                   

                  When you create new model then "domain" subfolder   doesn't exist in main Model folder. But when you import domain file then domain folder will be created. What should be inside of this folder?

                   

                    Thanks

                  Vitaliy

                  • 6. Re: Domains usage in SQL Developer data MODELER
                    Philip Stoyanov-Oracle

                    Hi Vitaliy,

                     

                    You mentioned property:  "2.1 Manually - there is a property "Domains file". Did you mean Domain adminstartion form where i can see this property?

                    You are using DM 3.1.3. My first sentence was that you should move to DM 3.3 and what I explained is working in version 3.3.

                    That property and functionality around it  was exposed to UI in 3.1.4 so you cannot see it in DM 3.1.3.

                     

                    Philip

                    • 7. Re: Domains usage in SQL Developer data MODELER
                      Vitaliy_V

                      Phillip,

                       

                      I did upgrade SQL loader to 3.3.0.747 immediately after you mentioned it.  OK my previous message shows some frustration about SQL Modeller domain usage.    But could you ask very simple question:  Let's assume you open some model in Sql Modeller. How can you check what domain file is used for this model?

                      • 8. Re: Domains usage in SQL Developer data MODELER
                        Philip Stoyanov-Oracle

                        Hi Vitaliy,

                         

                        the easiest way to see which domain files are used is to go in domain administration,

                        add new domain and then check combo box for "domains file" property - used files will be listed there.

                        Bear in mind that domains in defaultdomains.xml are always part of domains used in design. So that file should be empty (containing only "unknown" domain) if you want to work

                        with design level domains.

                         

                        Philip

                        • 9. Re: Domains usage in SQL Developer data MODELER
                          Vitaliy_V

                          Thanks Phillip for your help.  Now I undertand how to use domains in SQL Modeller. I was sure that design domains and deafultdomains are mutually exclusive but now  I see they always work togeteher.   Hope SQL Modeller will eliminate concept "defaultdomains"  in future  and all domains will be design domains with clear import and export procedures.   So you shouldn't manually manipulate any files in installation folders.

                          thanks again. It was really helpful.