{"id":923,"date":"2026-03-26T07:48:16","date_gmt":"2026-03-26T07:48:16","guid":{"rendered":"https:\/\/forgefuse.wasmer.app\/?p=923"},"modified":"2026-03-26T07:48:16","modified_gmt":"2026-03-26T07:48:16","slug":"oracle-sql-certification-1z0-071-course-section-17-synonyms","status":"publish","type":"post","link":"https:\/\/www.forgefuse.hr\/index.php\/oracle-sql-certification-1z0-071-course-section-17-synonyms\/","title":{"rendered":"Oracle SQL Certification 1Z0-071 Course | Section 17: Synonyms"},"content":{"rendered":"\n<p>Instead of repeatedly typing long schema-qualified names, you can create a <strong>short, meaningful alias<\/strong> and use it just like the original object.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Lesson 1: Synonyms Overview<\/h4>\n\n\n\n<p>A <strong>synonym<\/strong> is an alternative name (alias) for another database object.<\/p>\n\n\n\n<p>It can reference:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Tables<\/li>\n\n\n\n<li>Views<\/li>\n\n\n\n<li>Sequences<\/li>\n\n\n\n<li>Other database objects<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h5 class=\"wp-block-heading\">Why Use Synonyms?<\/h5>\n\n\n\n<p>Synonyms are extremely useful for:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Simplifying long object names<\/li>\n\n\n\n<li>Hiding schema ownership details<\/li>\n\n\n\n<li>Providing abstraction for database objects<\/li>\n\n\n\n<li>Supporting backward compatibility<\/li>\n\n\n\n<li>Enabling cross-schema access<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h5 class=\"wp-block-heading\">Example Without Synonym<\/h5>\n\n\n\n<pre class=\"wp-block-preformatted\">SELECT * FROM hr.employees;<\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">Example With Synonym<\/h5>\n\n\n\n<pre class=\"wp-block-preformatted\">SELECT * FROM employees;<\/pre>\n\n\n\n<p>Here, <code>employees<\/code> is a synonym pointing to <code>hr.employees<\/code>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h5 class=\"wp-block-heading\">Key Benefits<\/h5>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Cleaner and more readable SQL<\/li>\n\n\n\n<li>Easier maintenance when object names change<\/li>\n\n\n\n<li>Flexibility when working across schemas<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Synonyms Overview - Oracle SQL Certification (1Z0-071) | Section 17, Video 1\" width=\"1290\" height=\"726\" src=\"https:\/\/www.youtube.com\/embed\/_i_lKyA9B5g?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Lesson 2: Creating and Managing Synonyms<\/h2>\n\n\n\n<p>Oracle allows you to create synonyms using the <code>CREATE SYNONYM<\/code> statement.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h5 class=\"wp-block-heading\">Creating a Private Synonym<\/h5>\n\n\n\n<p>A <strong>private synonym<\/strong> is available only within your schema:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">CREATE SYNONYM emp FOR hr.employees;<\/pre>\n\n\n\n<p>Now you can query:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">SELECT * FROM emp;<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h5 class=\"wp-block-heading\">Creating a Public Synonym<\/h5>\n\n\n\n<p>A <strong>public synonym<\/strong> is accessible to all users:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">CREATE PUBLIC SYNONYM emp FOR hr.employees;<\/pre>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>Note: Creating public synonyms typically requires special privileges.<\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h5 class=\"wp-block-heading\">Using OR REPLACE<\/h5>\n\n\n\n<p>To redefine an existing synonym:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">CREATE OR REPLACE SYNONYM emp FOR hr.new_employees;<\/pre>\n\n\n\n<p>This updates the synonym without dropping it first.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h5 class=\"wp-block-heading\">Using Synonyms in DML<\/h5>\n\n\n\n<p>You can use synonyms just like the original object:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">INSERT INTO emp (employee_id, name)<br>VALUES (101, 'John Doe');<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h5 class=\"wp-block-heading\">Dropping Synonyms<\/h5>\n\n\n\n<p>Private synonym:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">DROP SYNONYM emp;<\/pre>\n\n\n\n<p>Public synonym:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">DROP PUBLIC SYNONYM emp;<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h5 class=\"wp-block-heading\">Public vs Private Synonyms<\/h5>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Feature<\/th><th>Private Synonym<\/th><th>Public Synonym<\/th><\/tr><\/thead><tbody><tr><td>Scope<\/td><td>Single schema<\/td><td>Entire database<\/td><\/tr><tr><td>Accessibility<\/td><td>Limited<\/td><td>Global<\/td><\/tr><tr><td>Privileges<\/td><td>Standard<\/td><td>Requires elevated rights<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Synonyms Creation - Oracle SQL Certification (1Z0-071) | Section 17, Video 2\" width=\"1290\" height=\"726\" src=\"https:\/\/www.youtube.com\/embed\/x7YnmGL1p60?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">Final Thoughts<\/h4>\n\n\n\n<p>Synonyms are a lightweight but powerful feature that improves:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Readability<\/strong> \u2192 shorter, cleaner queries<\/li>\n\n\n\n<li><strong>Flexibility<\/strong> \u2192 easy object replacement<\/li>\n\n\n\n<li><strong>Security abstraction<\/strong> \u2192 hide schema details<\/li>\n\n\n\n<li><strong>Cross-schema usability<\/strong> \u2192 seamless access<\/li>\n<\/ul>\n\n\n\n<p>For the <strong>Oracle 1Z0-071 exam<\/strong>, understanding synonyms is important, especially the difference between <strong>public and private synonyms<\/strong>, and how they behave.<\/p>\n\n\n\n<p>In real-world databases, synonyms are widely used to create a <strong>clean abstraction layer<\/strong>, making systems easier to maintain and scale.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Synonyms are a simple yet powerful feature in Oracle that help you simplify object names, improve accessibility, and enhance flexibility when working with database objects.<\/p>\n","protected":false},"author":1,"featured_media":924,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":5,"footnotes":""},"categories":[11,4],"tags":[7,13,15,12],"class_list":["post-923","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oracle-1z0-071-sql-course","category-videoandarticle","tag-1z0-071","tag-certification","tag-oracle","tag-sql"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/www.forgefuse.hr\/index.php\/wp-json\/wp\/v2\/posts\/923","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.forgefuse.hr\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.forgefuse.hr\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.forgefuse.hr\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.forgefuse.hr\/index.php\/wp-json\/wp\/v2\/comments?post=923"}],"version-history":[{"count":0,"href":"https:\/\/www.forgefuse.hr\/index.php\/wp-json\/wp\/v2\/posts\/923\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.forgefuse.hr\/index.php\/wp-json\/wp\/v2\/media\/924"}],"wp:attachment":[{"href":"https:\/\/www.forgefuse.hr\/index.php\/wp-json\/wp\/v2\/media?parent=923"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.forgefuse.hr\/index.php\/wp-json\/wp\/v2\/categories?post=923"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.forgefuse.hr\/index.php\/wp-json\/wp\/v2\/tags?post=923"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}