what is database view?

Sanem
Tera Contributor

how to create database view?and what are the beast practices to use database view

6 REPLIES 6

Ahmed Drar
Tera Guru
Tera Guru

Hi Saneem, Think about Database view as a database query that joins one or more table and create an object containing data from one or more table including all of the columns specified. you can use for reporting purposes. database view can't be edited

 here is how you can create a Database view

https://docs.servicenow.com/bundle/sandiego-platform-administration/page/use/reporting/task/c_Creati...

 

Please mark my answer as ✅ Correct / Helpful based on the Impact.

Hey there Ahmed! 

 

A quick question  - is database view in ServiceNow dynamic? My client needs a table where it can visualize all tasks associated with the ritm and related approvals and assignment group. if I join 3 tables - sysapproval, req item and sc task - could i use this table as a dynamic view? 

 

thanks in advance!

Hi There! Yes. You could use this as a dynamic view.

Anshu_Anand_
Kilo Sage
Kilo Sage

A database view is not treated like a custom table. Its just like DBMS database view.

A database view is a subset of a database and is based on a query that runs on one or more database tables. Database views are saved in the database as named queries and can be used to save frequently used, complex queries. There are two types of database views: dynamic views and static views.

In simple terms, if you want to create a view where fields from different table can come at a place ,so that you can create a report on that.

For example, a database view can join the Incident table to the Metric Definition and Metric Instance tables. This view can be used to report on incident metrics and may include fields from any of these three tables.

A simple diagram

 

Another one

Database View related docs

https://docs.servicenow.com/bundle/sandiego-platform-administration/page/use/reporting/concept/c_Dat...

Detail explanation and how to create

https://www.youtube.com/watch?v=vk1MYBxTSxY

 

If its helpful, mark answer as correct

Regards,
Anshu