Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your profile (name, country/region, and company) is displayed to the public and will accompany any content you post. You may update your IBM account at any time.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Informix Dynamic Server 11.50 Fundamentals Exam 555 certification preparation, Part 4: Examining database objects

Tables, constraints, views, indexes, triggers, sequences, and synonyms

Jeffrey S. Bohm (jbohm@us.ibm.com), Advisory Software Engineer, IBM
Jeff Bohm

Jeff has been working with Relational Database Management Systems (RDBMS) products for over 16 years. He has experienced databases from every angle: as a customer, a consultant, an instructor, and a developer. He was hired on at Informix Software in 1994 and has been working with it ever since. His jobs at Informix included advanced technical support, performance tuning and troubleshooting consultant, and customer education specialist. He currently holds a Software Engineer position with the IBM Informix Dynamic Server Stress QA team.

Jeff has worked with hundreds of IDS clients, from the smallest of businesses to the largest, including multiple large retail, grocery, and telco companies. He has helped them get the most out of their IDS installs, addressing the most basic SQL needs to the most demanding performance and feature rich implementations.

Jeff was involved in writing the IDS 9 Certification exams and currently holds Certifications for IDS 5, 7, 9, 10, and 11.

Jeff also helped author several classes that are being taught in IBM's IDS and RDBMS curriculum.

Summary:  This tutorial continues your journey into IBM® Informix® Dynamic Server by discussing many of the objects that can be created and used inside of a database. Some of these objects include tables, indexes, triggers, and views. This tutorial discusses what they are, how they are used, and how to create them.

View more content in this series

Date:  03 Sep 2009
Level:  Introductory PDF:  A4 and Letter (98 KB | 38 pages)Get Adobe® Reader®

Activity:  20208 views
Comments:  

Synonyms

A synonym is an alternative name for an existing table, view, or sequence object. Synonyms can be created to reference tables or views in other databases, on the same database server, or on another database server.

This allows the user to write SQL that can reference a remote table without having to know the remote table syntax.


Listing 32. Example synonym

CREATE SYNONYM orders_syns for southsales@dallas:informix.orders;
CREATE SYNONYM orders_synw for westsales@sanfran:informix.orders;
		  		 

The first synonym in Listing 32 points to the orders table in the southsales database on the dallas database server. The second synonym in Listing 32 points to the orders table in the westsales database on the sanfran database server.

As a user, you can join these two tables as if they were local tables in your database:

SELECT * from orders_syns, orders_synw WHERE …		  

Note: Although synonyms allow ease of writing SQL code for developers, they also hide the fact that the tables being used are remote and might need more time to access, causing a slowdown in performance of the SQL statement.

9 of 14 | Previous | Next

Comments



static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Information Management
ArticleID=425286
TutorialTitle=Informix Dynamic Server 11.50 Fundamentals Exam 555 certification preparation, Part 4: Examining database objects
publish-date=09032009
author1-email=jbohm@us.ibm.com
author1-email-cc=