I have two classes, each with a column that is an ip address. I would like to create an association between these classes, on those two column, but I can't find a simple description on how to do it. It seems it has to do with domains, but I'm not clear on how to set up the domain, whether I need to set up the domain first, if there's anything special I need to do to set up the columns, etc.
In
CMDBuild the
associations (“domains”) can be
created between two “classes”, not between
two “attributes” (as
the foreign keys in a relational database)
.
Then, if the domain
cardinality is 1:N, in the
second class (the one on the "N" side) you can create an "attribute" based on that "domain" (an "attribute" with type "reference")
.
If the cardinality
is N:N, relations
can be viewed and managed only using
the Relations
TAB.
Example
------------
Class 1: Supplier
- Code (string)
- Name (string)
- Type (lookup)
- Address (string)
- Email (string)
- etc
Class 2: SupplierContact
- Surname (string)
- Name (string)
- Supplier (reference, this attribute must be
created after creating the "SupplierToSupplierContact" domain
)
- Phone (string)
Domain SupplierToSupplierContact (must be created after creating
the
classes "Supplier" and
"SupplierContact")
- Origin: Supplier
- Destination: SupplierContact
- Description direct: has contacts
- Description inverse: belongs to supplier
- Cardinality: 1:N
So, to sum up:
1) create "Supplier" class
2) create "SupplierContact" class (without the attribute "Supplier")
3) create the domain "SupplierToSupplierContact"
4) add attribute "Supplier" to the "SupplierContact" using the "SupplierToSupplierContact" domain
Please note that, starting from the
latest 1.4 version, CMDBuild can also create and manage
specific domain attributes
.
For more
informations take a look at the manuals (administration and user manuals)
Since the domain is 1:N, you might create a reference attribute in Server over the domain with the server class. The result would be to have in the Server form a combo box with all operating systems (the Description attribute). Every time you change a reference attribute, the relation is changed accordingly and vice versa.
If you don't need the OS to be a class (e.g. you just want to use it as an attribute of Server and maybe other classes), you can use a simple lookup attribute (multilevel lookups come in handy to specify OS / Version using two combo boxes).
In both ways you can use the import CSV to fill the information. Please note that references are looked up by the Code attribute while importing.
Sorry I do not understand how to create a reference attribute.
I want to import a long listing detailed of server ( including serverName, OSName,OSVersion,Exploit, IPAdress,IPSave ....)
I want to view relation 1:N from OSName:Server and relation 1:N from Exploit:Server.
To do this, I create a list of unique OSName as a class and a list of unique Exploit as a class.
And now ???
Previously Tecnoteca wrote:
Since the domain is 1:N, you might create a reference attribute in Server over the domain with the server class. The result would be to have in the Server form a combo box with all operating systems (the Description attribute). Every time you change a reference attribute, the relation is changed accordingly and vice versa.
If you don't need the OS to be a class (e.g. you just want to use it as an attribute of Server and maybe other classes), you can use a simple lookup attribute (multilevel lookups come in handy to specify OS / Version using two combo boxes).
In both ways you can use the import CSV to fill the information. Please note that references are looked up by the Code attribute while importing.
Or you could take a look at the demo database. There are several reference attributes defined, in Server as well as in other classes.
I want to import a long listing detailed of server ( including serverName, OSName,OSVersion,Exploit, IPAdress,IPSave ....)
This is a totally different matter altogether. You have to use the CSV import or setup a connector, that will sync CMDBuild with other sources (relational DBs, an LDAP directories, etc.).