Dashboards help organizations visualize data and monitor operations in real time. With Oracle APEX, developers can quickly create interactive and professional dashboards using built-in components such as Cards, Charts, and Reports — without heavy coding.
In this blog, I
will explain how to create a Visitor Management Dashboard in Oracle APEX
step-by-step
This Article Covers
· Design KPI
· SQL performance considerations
· Chart selection best practices
. Dynamic filtering
· Security configuration
· Optimization tips
The DashBoard Overview
The dashboard consists of:
- KPI Cards
(Total Visitors)
- Categorical Summary
(Visitor Types)
- Operational Chart
(Check-In / Check-Out)
- Top Departments Donut Chart
- Interactive Report
- Date Range Filtering
Each component serves a specific
analytical purpose.
1.
Login to Oracle APEX
2.
Click App Builder
3.
Click Create → New Application
5.
Click Create Application
Create
a Blank Page
1.
Click Create Page
2.
Select Blank Page
3.
Name it “Visitor Dashboard”
4. Click Create
Cards are
ideal for KPI metrics because they:
·
Highlight numeric indicators
·
Support responsive layout
·
Improve executive readability
Steps
1.
Create new region
2.
Select Chart
3.
Select Cards
4. In the Property Editor, go to the Source section. Under Location,
select: Local Database Under Type, select: SQL Query
5.
In the SQL Query
box, write your query.
Query
SELECT COUNT(*)
total_visitors
FROM visitor;
This will display total number of visitors.
For large datasets, ensure:
·
Index on visit_date
·
Proper table statistics gathered
·
Avoid unnecessary column
Visitor Type Summary
This provides distribution analysis of visitor categories.
Steps
1.
Create new region
2.
Select Chart
3.
Select Cards
4. In the Property Editor, go to the Source section. Under Location,
select: Local Database Under Type, select: SQL Query
5.
In the SQL Query
box, write your query.

Query
SELECT
visit_type,
COUNT(*) total
FROM visitor GROUP BY visit_type
ORDER BY total DESC;
Now you can see visitor categories (Visitor, Vendor, Contractor, etc.).
Sorting by descending order improves data interpretation by emphasizing dominant categories.
Check In / Check Out Chart (Operation Insight)
Steps
1.
Create another Chart region
2.
Under Identification:
3.
Title Check In/Out
4.
Type
Select Chart
5.
Under Attributes section
6.
Chart Type : Select Bar
7.
Orientation: Vertical Bar
8.
Under Source Section
9. Location : Local
Database
10. Type : Sql Query
11. Input
Sql Query
Query
SELECT 'Time In'
label, COUNT(check_in_time) total
FROM visitor
UNION ALL
SELECT 'Time Out' label, COUNT(check_out_time)
FROM visitor;
UNION ALL is used instead
of UNION
because:
·
It avoids duplicate elimination overhead
·
Improves performance
·
Maintains accurate aggregation
Steps
1.
Create region → Chart
2.
Under Identification:
3.
Title Top 5 Visited Dept.
4.
Type
Select Chart
5. Under Attributes section
6. Chart Type : Donut
- Under
Source Section
- Location
: Local Database
- Type : Sql Query
- Input Sql Query
Query
SELECT employee,
COUNT(*) total
FROM visitor
GROUP BY employee
ORDER BY total DESC
FETCH FIRST 5 ROWS ONLY;
This shows top 5 visited departments.
Why Donut Chart
·
Suitable for proportional representation
·
Clear visual segmentation
·
Effective for executive dashboards
Create Interactive Report ( Detail Insight)
Steps
1.
Create
region
2.
Under
Identification:
3.
Title
: Visitor Details.
4.
Type
: Interactive Report
5.
Under
Source Section
6.
Location
: Local Database
7.
Type
: Sql Query
8.
Input Sql Query
Query
SELECT * FROM visitor ;
Use explicit column selection:
SELECT visitor_name,
visit_type,
employee,
visit_date,
check_in_time,
check_out_time
FROM visitor;
Avoid SELECT * due to below reasons:
·
Performance
efficiency
· Reduced network load
Create two page items: P1_FROM_DATE and P1_TO_DATE
Modify queries:
WHERE visit_date BETWEEN
:P1_FROM_DATE AND :P1_TO_DATE
Add Dynamic Action to refresh regions.
Now the dashboard becomes dynamic.
Dash Board
- Total
Visitors KPI
- Visitor
Type Chart
- Check
In / Out Chart
- Top
5 Department Donut Chart
- Detailed
Interactive Report
- Optional Date Filtering
Security
Considerations
·
Enable Authorization Schemes
·
Configure Session State Protection
·
Use page access protection with checksum validation
Performance Optimization Tips
·
Gather table statistics regularly
·
Use bind variables
·
Avoid full table scans when possible
·
Monitor SQL using APEX Activity Monitor
·
Review execution plans for heavy queries
Conclusion: This implementation show how Oracle APEX can be used to build a Apex Dashbaord, secure, and performance-optimized dashboard.
















Comments
Post a Comment