Synonyms
A synonym is an alias for an object. It hides the owner name, so applications do not need to say shop.orders.
GRANT SELECT on the real table.
Database Links
A database link lets you query a table in another Oracle database as if it were local.
| Tip | Why |
|---|---|
| Use a dedicated read-only user for the link | Limits damage if the link is abused |
| Avoid joining a huge remote table to a huge local table | All data crosses the network |
Check links regularly with SELECT * FROM dba_db_links | Old links are a security risk |
Materialized Views
A normal view runs its query every time. A materialized view (MV) stores the result like a real table and refreshes it when you say. Great for slow reports and summaries.
Refresh Methods
| Method | What happens |
|---|---|
COMPLETE | Rebuilds the whole result. Simple, can be slow. |
FAST | Applies only the changes since the last refresh. Needs a materialized view log. |
FORCE | FAST if possible, otherwise COMPLETE |
| Timing | Meaning |
|---|---|
ON DEMAND | You refresh it when needed (or on a schedule) |
ON COMMIT | Refreshes after each commit on the base tables |
Fast Refresh Example
Refresh It
START WITH SYSDATE NEXT SYSDATE + 1/24 to refresh hourly.
Check Your MVs
Conclusion
Synonyms shorten names, database links reach other databases and materialized views store results for speed. Pick the refresh method that matches how fresh the data must be.

