How to make a field unique across all the CMDB?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-13-2014 10:31 AM
I understand that name is not unique and apparently out-of-the-box serial number is not unique. Is it recommended to have a unique identifier apart of the SysID? this is to restrict the possibility to duplicate a CI.
- Labels:
-
Service Mapping

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-13-2014 10:38 AM
we do have 'name' field as unique on some of our tables related to cmdb ..... an alternative would be to use a before insert business rule which would check if the CI name already exists or not....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-13-2014 10:54 AM
Hi Jesus,
This has been a demand for ever now. But I have seen issues with making one field unique CMDB. There have issues earlier where some manufacturers had duplicated the serial numbers of products. So if you add uniqueness on serial number field then you would have only one CI even though in actual there should be multiple entires.
I have always suggested using a combination of certain field values. Like model number, manufacturer etc. The logic of implementing the uniqueness can be done in multiple ways. Have a Biz Rule on CMDB to avoid duplicates via manual creation or integrations. But for discovered devices its better to handle during identification itself.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-14-2014 08:59 AM
Jesus,
We run into this issue any time we create a new table. To resolve it, we lean on our processes more so than any code/automation. Start with one table. Decide if the data coming from a feed is unique, or whether the manual process you have defined creates a unique entry. If not, then you have to change your process and document the solution. For example, in our Computer table, where we store our Desktop information, we know Discovery should populate the table with unique entries. If we need to manually enter in info for a desktop, then we could have the system pre-fill the name of the computer on the form as "Computer.Desktop.Serial="... then once the user fills out the Serial Number field and saves the form, you can have the system append the serial number to that name. Once saved, you will have a name for the CI that's unique to the entire CMDB - because, you have specified the table/class of the CI and the serial number (which should be unique to at least that table). Now, you can do the same for Databases - DBName@hostname.
Basically, if you're using any manual processes - help the users fill out the name according to your standards with Client Scripts and then document the procedure and convention on the wiki. If you're using a feed to populate the table, then modify the associated Transform Map and onInsert Business Rules to follow a naming convention that ensures a unique CI name across tables. This is all part of the data design aspect of a successful CMDB.
Please feel free to reach out to me for more examples or about any questions.