# APEX Dictionary Views: You Didn't Know You Needed!

Dictionary views in APEX are similar to dictionary views in Oracle Database. They provide a way to access metadata about the application without having to query the underlying tables directly. Dictionary views are read-only views that can be used by developers, administrators, and other users to gather information about the application.

There are several types of dictionary views in APEX, including:

1. APEX\_APPLICATION\_PAGE\_REGIONS: Ccontains information about the regions on a page. It includes details about the region type, region name, and region position.
    
2. APEX\_APPLICATION\_PAGES: Contains information about the pages in an application. It includes details about the page name, page ID, and page type.
    
3. APEX\_APPLICATION\_ITEMS: Contains information about the items on a page. It includes details about the item type, item name, and item position.
    
4. APEX\_APPLICATION\_LOVS: Contains information about the list of values (LOV) used in an application. It includes details about the LOV name, LOV type, and LOV source.
    
5. APEX\_APPLICATION\_TABS: Contains information about the tabs used in an application. It includes details about the tab name, tab position, and tab set ID.
    

To get a list of all available views we can perform the query below.

```sql
select * 
  from apex_dictionary 
 where column_id = 0;
```

The example below shows all pages without no page access protection in the app 100 and workspace MY\_WORKSPACE.

```sql
select * 
  from APEX_APPLICATION_PAGES 
 where page_access_protection = 'Unrestricted' 
   and application_id = 100
   and workspace = 'MY_WORKSPACE';
```

The query below will return a nice view of the dictionary views grouped by hierarchy

```sql
select LPAD (' ', (LEVEL - 1) * 2) ||  apex_view_name s, comments
from (
  select 'ROOT' as apex_view_name, null as comments, null as parent_view
  from dual
  UNION
  select apex_view_name, comments, nvl(parent_view,'ROOT') as parent_view
  from apex_dictionary
  where column_id = 0
) 
  connect by prior apex_view_name = parent_view
  start with parent_view is null
order SIBLINGS by apex_view_name DESC;
```

In Addition,  inside the APEX builder utilities, there is an interactive report listing all the views and a tree view showing the dictionary views like the query above

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1683019142116/6a0bf72e-f570-4fb9-8d83-08c0402b4114.png align="center")

In conclusion, Oracle APEX dictionary views provide a way to access metadata about the application without having to query the underlying tables directly. Developers can quickly gather information about the application's structure, saving time and effort.
