1 person found this helpful
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.
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?
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
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:
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?
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.
I did upgrade SQL loader to 220.127.116.117 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?
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.
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.