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 developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

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]

The Informix Detective Game

Pat Moffatt (pmoffatt@ca.ibm.com), WW Education Offering Manager, IBM
Photo of Pat Moffatt
Pat Moffatt is the World Wide Information Management Education Offering Manager. She is a project manager in the IM Education team. She uses games like this to give students hands-on experience using databases.
Damian Ali (damiana@ca.ibm.com), IM Education Enablement and Support, IBM
Photo of author Damian Ali
Damian Ali is an education developer and tester for the IBM Canada Software Group. He is an intern currently studying Computer Programming and Analysis at Seneca College.

Summary:  Here's a fun way to learn about IBM Informix! Learn or teach the basics of Informix and relational databases with an interactive game called the Informix Detective Game (the game's theme is a crime investigation). The game teaches relational database concepts and shows how technology can be applied to solving real-life problems. The Informix Detective Game is based on the DB2 Detective Game created by Joanna Kubasta and Joanne Moore.

This tutorial has been updated for recent versions of Informix.

Date:  14 Apr 2011 (Published 17 Apr 2008)
Level:  Introductory PDF:  A4 and Letter (862 KB | 23 pages)Get Adobe® Reader®

Activity:  16088 views
Comments:  

Before you start

About this tutorial

Develop skills on this topic

This content is part of a progressive knowledge path for advancing your skills. See Introduction to IBM Informix database software

This tutorial introduces new users of IBM Informix 11 to relational database concepts through a fun and interactive game called The Informix Detective Game. The recommended audience is small business owners, students, teachers and professors, or anyone wanting to gain an understanding of data management.


Objectives

This tutorial assumes that you have no prior knowledge of relational databases or SQL. By completing this tutorial, you will:

  • Gain an understanding of database concepts such as tables, rows (records), columns (fields), and values.
  • Learn about relational databases, data models, unique keys, primary keys, foreign keys, and table joins.
  • Gain a working knowledge of the primary SQL statements: select, update, insert, and delete.
  • Use the Informix command window to import a database.
  • Use dbaccess to create and execute SQL code.

We have included the solution set in a PDF, which you can download from this tutorial.


System requirements

This tutorial was written assuming you are using Informix Developers Edition running on MS Windows. To play this game, you should have IBM Informix installed, the InformixGame database loaded, and the clue file running.


Download Informix

  1. If you do not already have Informix 11 installed on your PC, download Informix from the product download Web site.
  2. Sign in with your IBM ID. Select Informix Developer Edition Windows 32 Version 11.70 xxxDE and click Continue.
  3. Provide the information requested and indicate your agreement with the license agreement. Click I confirm to continue.
  4. Verify that Informix Developer Edition Windows 32 is selected and that the file version number is 11.70. Click Download Now.

    Note: If Informix is already installed, there is no need to install another copy of the software. Proceed to the "Install the Informix Detective Game database" section of this tutorial.

Install Informix

  1. Once the download is complete, navigate to the folder containing the downloaded file.
  2. Unzip the file. Choose the option to unzip and install the file.
  3. If the unzip does not give the option to install, from the unzipped folder find and click ids_install.exe.
  4. The install wizard will walk you through the software installation process.
  5. In order to complete the install successfully, click Accept for each license agreement. Also, select Typical for each setup type, and make note of all the user Informix and passwords you are requested to create.

Install the Informix Detective Game database

  1. Ensure Informix is installed.
  2. Download the Informix Detective Game database file from the Downloads section of this tutorial.
  3. Create a directory called informixgame in drive C.
  4. Unzip the InformixDetectiveFile.zip file to that directory.
  5. From the Windows Start menu, choose All Programs > IBM Informix 11.70 > ol_informix1170. A command prompt window will pop up.
  6. From the command prompt, type cd\informixgame to get to the informixgame directory. In order to create the database, you need to type dbaccess sysmaster createtables.sql. You should see the message Database created and Database closed.
  7. On the next line, type SET DBDATE=y4md- to set the date format.
  8. Then type dbaccess informixgame loadtables.sql to create the tables in the detective database. The tables are successfully created if you see four messages indicating rows were loaded. The rows loaded messages should reflect 151, 140, 10, and 140 rows loaded.
  9. Close the command prompt window.

Run the Informix Detective Game

In order to run the game's clue file (INFORMIXGAME.JAR), it has to be set up to open with Java Virtual Machine (JVM) software, for example: JAVAW.EXE. To set this up:

  1. Right-click the INFORMIXGAME.JAR file.
  2. Click Properties.
  3. Click the General tab.
  4. Specify Type of file to be Executable Jar File.
  5. The Opens with window should reflect a JVM that you have locally installed on your machine. If this is not the case, click Change.
  6. From the Open With pop-up window, locate and select your JVM software, for example JAVAW.EXE.
  7. Click OK.
  8. Click Apply.
  9. Click OK again.

You can now launch the INFORMIXGAME.JAR file. To do so, double-click the icon, or you can create a shortcut to the file for easier access.


To execute SQL commands

  1. From the Windows start menu, choose All Programs > IBM Informix 11.70 > ol_informix1170.
  2. From the command prompt window, type dbaccess. A DBAccess window will open.
  3. From the main menu at the top of the interface, select Query-language.
  4. Select informixgame@ol_informix1170 from the list of databases.
  5. Select New from the Query-language menu.
  6. Type an SQL statement.
  7. Press the Esc key to exit the editor.
  8. Select Run to run the SQL statement.

Create a shortcut to the Informix Detective Game

To create a shortcut to the INFORMIXGAME.JAR file on your desktop:

  1. Right-click anywhere on the desktop.
  2. Select New > Shortcut.
  3. In the Type the location of the item field, type C:\informixgame\informixgame.jar.
  4. Click Next.
  5. In the field called Type a name for this shortcut, type informixgame (it should already appear by default).
  6. Click Finish.

Tips for using Informix

  1. To execute SQL statements, use dbaccess:
    • From the Windows start menu, choose All Programs > IBM Informix 11.70 > ol_informix1170. A command prompt window will pop up.
    • From the command prompt window, type dbaccess.
    • From the dbaccess main menu, select Query-language.
    • Select informixgame@ol_informix1170 from the list of databases.
    • Click New from the Query-language menu.
    • Type an SQL statement.
    • Press the Esc key to exit the editor.
    • Click Run to run the SQL statement.
  2. To modify your previous SQL statement:
    • From the Display menu, click Exit.
    • From the SQL menu, click Modify.
    • Edit your prior SQL statement.
    • Press the Esc key when done editing.
    • Click Run.
  3. If the width of the fields to be displayed is less than 80 characters wide, the results are displayed in a table format.
  4. If the width of the fields to be displayed is greater than 80 characters wide, the results for each record is displayed over multiple lines, as defined by the fields in the table.
  5. To see the count of the number of records for an SQL statement, click Next until the number of rows retrieved is displayed.

You are now ready to play the game!

1 of 8 | Next

Comments



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Information Management
ArticleID=301738
TutorialTitle=The Informix Detective Game
publish-date=04142011
author1-email=pmoffatt@ca.ibm.com
author1-email-cc=
author2-email=damiana@ca.ibm.com
author2-email-cc=

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Try IBM PureSystems. No charge.