logo

NJP

#4 CMDB Data Schema Model in ServiceNow | ServiceNow CMDB Training

Import · Jul 10, 2021 · video

[Music] please subscribe to my channel and click on the bell icon to get the regular updates of my channel and do not forget to like comment and share hello everyone welcome back to sas web service now this is part of servicenow cmdb training in this video you will learn about cmdb data schema model and how cmdb tables are structured in servicenow platform the configuration management database schema model is a series of connected tables that contain all the assets and business services which are controlled by any organization and its configurations cmdb has different tables in service now and these tables store information about desktops laptops which are in the network contracts business services and many others key cmdb tables there are many tables existed in cmdb in service now however three tables are key cmdb tables base configuration item and the backend name is cmdb second one is configuration item that is cmdb underscore ci and the third table is ci relationship which is cmdb underscore rel underscore ci the backend name of ci relationship table mostly all the tables in cmdb are extended from configuration item table that is backend name is cmdb underscore ci now this configuration item table is extended to other tables like computer database and those tables like computer is also extended to other table like server which is further extended to tables like windows server or unix server service now has a lot of different out-of-the-box tables for different types of configuration items and devices now if you want to see all parent and child tables in cmdb then you can use table schema map which shows what tables are extended from other cmdb tables in tree structure now schema map is not limited to cmdb it is a platform feature which is related to tables so any table you have in service now and you want to see the structure that what all other tables are connected to that particular table you can see with the help of schema map which gives you the holistic view of the whole hierarchy of the tables you have in your servicenow instance this is my personal developer instance now let's see these tables and their hierarchy with the schema map in this instance so what i will do i will directly go to configuration which is the application for cmdb so i will go to configuration now in configuration i will directly go to the module services which shows the list of business services you have in your instance for your organization now this is one of the table which is definitely part of cmdb and it is also extended from one of the base or key cmdb table so let's see one thing let's directly open the table details so we will go to table details and we will see from which table this particular table is getting extended so you can see here is the label service so the name of the table is service the backend name the name main name is cmdb underscore ci underscore service and the table which is getting extended like this table is basically getting extended that is configuration item that means this table is extended from configuration item table not base configuration item so if i will show you the hierarchy so if i click here and i click on open record because we will open the details for configuration item table so here is the key configuration item table now you can see this table is extended from base configuration item this one which is the main table of service now but if i talk about from the structure point of view the main tables main table is definitely configuration item but even the configuration item table is extended from base configuration item table but if i talk about other tables we have like software servers hardwares all those tables are extended from configuration item table that is cmdb underscore ci and if i open this one you will see that it is not extended from any table so you can see it extends table no nothing it is it is empty you won't see that particular field available here because it is not extending any other table it is the base table of cmdb in servicenow platform now what we will do we will try to open schema map which is really i would say a great feature of servicenow platform so what i will do i will open uh basically the schema map right here so you will see when you go to the table details and if you go in related links you will find this link which is show schema map you will you will be able to see the details of that table and the tables which are connected to this particular table so if i click on this this will take me to the schema map view which will show me the structure of tables connected tables in tree structure so it is loading now one thing you have to remember that if you will see this schema map directly for configuration item table this will definitely take time to open and the reason is because that table has a lot of data moreover because it is connected to a lot of other tables so that view maybe i think it might open because i'm not opening in this demo but if you would open in your instance it might take long time to open so you have to be a little bit careful so i would always recommend always try to open child tables in this schema map view so now we will go little bit bottom here and you will see this table which you have selected for this schema map view where you can see different details about the structure of tables connected to the service table and as i mentioned this is not specific to cmdb it can show you all those connected tables for other tables as well but if you really want to understand that how cmdb data how cmdb tables are structured i would say this is the best feature you should definitely utilize it for for any details you want to get for any cmdb table even for other tables but as this is just for cmdb so i would definitely recommend this particular schema map if you want to understand that how cmdb tables are structured in servicenow platform because it might happen in a lot of organizations people have uh created custom tables as well so i think this view will definitely help you to understand that structure even you have custom cmdb tables for out of the box definitely you can see that but even for custom as well if you have more custom tables in cmdb so now what you will see here that you have this table it shows you the name then it shows you the columns the first thing you will see what all columns you have first of all unique columns specific to this table like these columns now these columns are just created for this table these columns are not inherited from parent tables like configuration item or base configuration item but what those columns are which are inherited those are here so if you click on this plus icon it will definitely expand that view and you can see all those columns which are part of configuration item and even some are part of base configuration item as well those columns are visible here so you can see what all columns are coming from what table that's how you can understand the whole structure that if i give you example if i open this one let's say we have business contact you would not find this particular field in base configuration item you won't find it in here as well in even in configuration item because we are talking about service so service table should have this type of column this type of information that's the reason there are some specific fields which are specific to that table and you can also see some other columns as well which are inherited from parent tables like configuration item and base configuration items and you can see that from where it is getting extended so it is getting extended from configuration item moreover you can see here it says base configuration item and in the left hand side here in very left you will see what all tables which are connected with service maybe the service is extending another table that that will be visible here and other thing is in whichever table you are using service table as a reference field that means that reference field is referencing to service table data then you would see that in this view as well that's the power of schema maps not only just extended tables if you're referencing that particular table in any other table then only you will be then then also you can see that data in this particular view so like if i give a quick example so you have like offering now offering is basically extends from service table that is service offering so you have columns specific to service offering then you can see here say service configuration items and you have base configuration items and if i go a little bit above you can see we have these different tables like entry point service configuration and association in scope all these different tables like products these are basically not getting extended from service table but they are using one field which is referencing to service table if i expand this let's see this product and you will definitely see that he see here we have service and it says reference to service because it is connected to that particular table if i think you can also click it because i just clicked it and you can see it says service service that's how you can click and check more details about connected tables connected columns available in that particular tables which you are seeing in the view and that's how you can understand the whole structure of tables specifically cmdb tables that how exactly they are structured in your organization or in your servicenow instance let's understand this little bit more with example of another table like computer table so if i go here and you can see maybe this one we will try to open this windows servers so if i click on this windows it will show me the details that means all the data you have for windows server and what i will do i will directly go to table and i will open schema map view because that is something we really want to know but one thing you have to remember you can see here it extends this table that is server table so let's see the hierarchy first and then we will see schema map i think it is not really important because that's something you can see directly from schema map view so here we have windows server the name is you can see here it says cmdb underscore ci underscore win underscore server so what i will do i will click on show schema map and from here i can understand the structure of windows server table so if i come here yeah you can see so here we have the table windows server now it is it is extending server table now the server table is extending computer table this computer see the hierarchy it's a it's a big radical i would say right because it is it is extending from this server that extends from computer computer extends from hardware and then you have configuration item and base configuration item and i have already told you that most of the tables almost all the tables of cmdb are extended from configuration item i don't think there would be any table which is directly extending from base configuration item table i can also show you that maybe we have this base configuration item or i will do one thing i can show you with the help of cmdb underscore ci and then i will do um maybe i can i can open any table i want right i want to open maybe all the cmdb tables that is something i want so in that case i don't have to open this one i will directly go to tables and here we have tables and what i will do i will mention so we have the cmdb and here you have extends table that which table it is extending that's something you can put here so if i put base configuration item so if i put that base configuration item now i can see that what all different tables i have only one table so that's definitely proves that you don't have any other table which is extending from base configuration item except one table that is configuration item table and if i search this one you will definitely get a lot of tables see if i search this one you will see a lot of table all 102 tables extending from configuration item but you have to remember it's a hierarchy so it might happen that we have one table like this table is extending from this but you might have multiple other tables which is extending this table it might happen because that's a hierarchy you have in cmdb so if i go to back to the schema map view for windows server so these are the tables which we have so here's the hierarchy now one more thing we have this windows server is also extending this table that is hyper-v server that means it is also maybe one of the server we have because you can see uh i think it says hyper-v server and if i see the column it is okay that's the reason so it is not extending extending windows server table it is extending server table and there is a column which is called windows host that means which is referencing to windows server that's the reason you can see in this particular view in left hand side and in right hand side you have computer you would also have hardware all those tables from which it is extending from and that's basically available here that's how you can see the hierarchy of cmdb tables in servicenow with the help of schema map view cmdb attributes let's see the attributes of some main classes of cmdb starting with configuration item table cmdb underscore ci is also extended from base cmdb table that is base configuration item table now some fields and attributes are also extended from cmdb base table that is base configuration item table now if you are working in cmdb then you need to make sure that the type of attributes should not be changed in base tables and keep it out of the box only now this is really important to understand so if you are a cmdb architect and you have to design the cmdb in your organization you have to implement cmdb this is very important point that you should not change out of the box attributes sometimes we definitely change in for other tables i think a lot of organization that is also not recommended but a lot of organizations definitely do that but if i talk about specifically for cmdb in service now you should not change type of attribute if if that attribute is maybe getting ip address or some other data which you get in cmdb you should definitely not change that now cmdb ci table has a lot of attributes which are referenced to other service now tables which you can see on this screen like assign to field owned by managed by and supported by all these fields have reference to user table that means this assigned to owned by managed by supported by these attributes these fields are basically part of cmdb ci table however they are referencing to sis user table similarly you have fields like assignment group support group and change control which have reference to group table that is says underscore user underscore group table and then you also have fields like company manufacturer vendor they have reference to core underscore company table now company manufacturer vendor they are part of cmdbci table but all these table these are reference fields and they are referencing to core underscore company table that's how you can see the data because that's how table structure works in service now that you cannot have all the fields just static fields in just one table because you have to refer you have to refer the data all different tables are connected to each other and that's the power of service now i would say as part of the service now ecosystem then you have cost center which is basically referencing to cm cmn underscore cost center table then you also have location location is also one of the attribute of cmdb underscore ci table and it is referencing to cmn underscore location table then you have model id you have basically cmdb underscore model that's a table but you have model id because that's how you provide that model id to the configuration item you have asset you have maintenance schedule which has a different table as well which is connected to the different table reference to the different table that is cmn underscore schedule the next class is hardware class hardware table stores configuration item records of hardware devices this table is extended from configuration item table that is cmdb underscore ci table apart from extended fields from configuration item as i mentioned earlier that if you have parent and child relationship and that's not related to just cmdb it's a part of the platform because that's again related to the database structure that if you have a child table it definitely inherits fields of parent table as well so similarly cmdb underscore ci hardware table also gets the fields from cmdb underscore ci that's the configuration item table however apart from those tables extended fields not tables apart from those extended fields there are some fields which are specific to hardware class as well like hardware underscore status hardware underscore sub status default underscore gateway now these are three different fields there might be some other fields as well and sometimes you can also add some custom fields depend as for the use case you have it is not i shouldn't say recommended but because every organization has different strategy to manage devices but if i talk about out of the box fields you definitely got get enough out of the box fields from servicenow so you should you don't need to create some custom fields on on these cmdb tables the next is computer class which is extended from hardware table and has some fields related to computer class like operating system cpu disk space now all these fields are unique attributes as per computer class related to computer because those are needed so that they can provide details for a computer so if you see the hierarchy like the the hierarchy which we are going on like from base configuration item we have configuration item we have hardware now we have computer class which has some unique attributes as well and the next one is server class which is extended from computer class and again has some fields ready to server class like classification firewall status host name used for because these type of attributes are not required maybe on hardware maybe on computer that's the reason you always have unique attributes as per the type of configuration item or the type of class you have for a particular table and that's how you define those particular unique attributes for those tables now similarly you will find lot of other tables which are extended from configuration item and lot other tables are extended from those tables you will also see tables for virtual servers and cloud servers and cmdb like we saw for hardware computer server you also have for cloud servers and virtual servers as well basically i think service now is keep on extending or adding multiple tables which you will not find maybe in previous versions of servicenow but they are definitely as technology is growing we are getting different types of devices different type of systems in the market servicenow is trying to grow the type of table the type of classes we have in cmdb because that's how they have to go right has as market grow as as we get different type of technologies different type of applications servers devices all those things like because cloud was not there before but they have definitely enhanced different tables extensions what all details we should have for cloud tables as well for cloud for storing cloud details all those tables are also available in cmdb let me show you the all different types of classes we have in my personal developer instance now i would definitely have limited data because this is just a demo personal developer instance but if i talk about your organization or any organization who has servicenow and implemented cmdb then they would definitely have a lot of data in their instance so what i will do to see the data i will just type cmdb underscore ci dot list i will press enter now these are all total records i have in my instance 2784 because it is a demo instance i would not have a lot of data now here is the main field mail column we have that is class very important column for cmdb which basically tells you that what type of class is it is it a application is it a computer is it a server that detail you can find with this particular field and what i will do because i have these 2700 records what i will do i will click on group by class because that's how we can see what all different classes we have in my instance now as i mentioned in your instance maybe you can directly check while watching this video you can definitely check that what all different classes you have in your organization and you will get an idea that what kind of different data you have you might see some custom tables as well that i'm i'm not sure about it but a lot of organizations also create custom tables in configuration item table in cmdb so here you can see starting with configuration item we already know this is the main key table of cmdb then we have aix server we have application class java server cluster cluster node now you can also understand that if you understand i t that you're not just a developer if you also understand or if you have understanding of infrastructure then you must be aware that all these terms which i'm just telling that about the cluster cluster node these are definitely part of the infrastructure which is definitely needed in every organization if you have id if you have robust id you will definitely have these things these configuration item or these types of devices so you have aix servers applications computer room database data center sql catalog oracle catalog disk email server ip router ip switch linux server you definitely get those things in your organization and mass storage devices network gear adapter computer peripheral printer server service all those different classes windows cluster web server windows server all those different classes so that's how you can see that what all different classes you have in your instance and i hope you also understand that why exactly we have all these different classes just to differentiate because if i talk about ups and if i talk about a server ups will definitely have different details a server will definitely have different details both are different type of devices they cannot be same they cannot be put in the same class because if servicenow will do and will keep all the data in just one table that will definitely not make sense because that's the reason class has been introduced in cmdb because that is really important to identify what type of device is it is it an application is it a service is it a hardware server is it a windows server is it a linux server all those details because now i can see how many servers and if i give you a quick example if somebody asks you that hey how many web servers you have in your instance i can directly just group it by and i can just see here that yep i have nine web servers this is about my instance but you can definitely say that that's the reason it is so i'm just i think i'm just telling the very very basic reason or basic benefit but if i talk about cmdb and its classes has definitely a lot of benefits and you will also see in in later sessions that how exactly you can work on cmdb how exactly you can work on classes with the help of cmdb ca class manager that the tool the the basically application which we saw in previous section and you will definitely see those things in details later so this is how cmdb data schema model looks like thank you for watching and have a great day

View original source

https://www.youtube.com/watch?v=0i-6VOHa2dg