Tech

Guides
 

Explore Oracle 10g's updated sample schemas

By John Sheesley, Special to ZDNet Asia
Thursday, June 28, 2007 09:24 AM

Each new release of Oracle database brings with it new features to explore. It can be a challenge to create adequate sample tables to play with a given feature.

Each new release of Oracle database brings with it new features to explore. It can be a challenge to create adequate sample tables to play with a given feature. But since Oracle 9i, Oracle has had a robust set of sample schemas you can use to learn new features. The Oracle Documentation also uses these tables in its examples, so you can often simply cut and paste an example from the documentation to see how it works.

There are five sample schemas in the set. All of the schemas feature some aspect of the Oracle database and use consistent primary keys throughout so that joins between them work easily.

Here is an overview of the five schemas:

  • Human Resources (HR): This is the simplest of the schemas. HR resembles the older SCOTT schema in that it has departments and employees. The seven tables use fundamental datatypes, and are suitable for learning basic features.
  • Order Entry (OE): This is a slightly more complex schema. OE adds customers, products, and orders to the model. These more complex layouts can be used to explore additional data types, including nested tables and additional table options such as Index Organized Tables (IOTs). An object-relational example called Online Catalog (OC) is also stored within this schema for testing Oracle's object-oriented features.
  • Product Media (PM): The focus of this schema is multimedia data types.
  • Information Exchange (IX): This schema is designed to showcase Oracle's inter-process communication features of Advanced Queuing. In fact, in versions before 10g, this schema was called QS for Queued Shipping.
  • Sales History (SH): This schema isn't especially complex. SH contains many more rows of data than the other schemas. It's a great place to try out SQL Analytic Functions, the MODEL clause, etc.

Installation is a bit more complex than just running the demobld.sql script that created the SCOTT user. The easiest way is to select the check box for Sample Schemas during the Database Creation Assistant (DBCA). Starting in Oracle 10g Release 2, DBCA creates sample schemas locked and expired: You'll have to unlock them and reset the passwords to use them.

To run the scripts manually, locate them in $ORACLE_HOME/demo (Oracle 9i) or on the companion CD (Oracle 10g). A master script, mksample.sql, calls multiple other scripts to set up the schemas. You can also use these scripts individually to drop the contents of a particular schema and re-create it.

These sample schemas are much more complex than the historical SCOTT schema's four tables. In fact, the Oracle Documentation even has an entire book called Oracle Database Sample Schemas, which describes how to use the sample schemas.

Bob Watkins (OCP, MCITP, MCDBA, MCT) is a computer professional with 25 years of experience as a technical trainer, consultant, and database administrator. He is a Senior Consultant and Managing Partner at B. Watkins, a database consulting and training firm in the Dallas / Fort Worth area. Visit Bob’s site.


See also:  Databases

WORTHWHILE?

0

0 votes
Blog

Talkback 0 comments

There are currently no comments for this post.

Guest user

Guest user

Level: 
Joined: —
Already a member? Log in »



 

Loading...

Up close and personal with a merger

Blog thumbnail

What can you get for 13.9 billion buckaroos? For Hewlett-Packard, US$13.9 billion would allow you to buy your way into becoming the second biggest IT services company in the industry...... by Eileen Yu

Read more »

Whitepapers / Case Studies

Downloads

Database News

 
Oracle SOA Business Software Centre
Many companies are recognizing the need to adopt standards in their efforts to build service-oriented applications.
Secure the "Next-Gen SOA Infrastructure" & "Bringing SOA Value Patterns to Life" whitepapers here


» Visit the Power Center
Powerful technology that drives your business needs
Increase datacenter efficiency with innovative technology that uses less energy and lowers power costs for your business demands.
» Maximum flexibility with powerful blade technolgy
» Bring new services and applications online faster
» Lower energy use and cost

Tech Jobs Now!

Tags

  1. access
  2. build
  3. command-line
  4. configure
  5. css
  6. develop
  7. device
  8. don’t
  9. java
  10. management
  11. manager
  12. mysql
  13. network
  14. performance
  15. program
  16. project
  17. securely
  18. security
  19. server
  20. service
  21. site
  22. snort
  23. sql
  24. storage
  25. use
  26. via
  27. web
  28. windows
  29. word
  30. xml