118 lines
9.1 KiB
HTML
118 lines
9.1 KiB
HTML
|
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
<!DOCTYPE html
|
||
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<html lang="en-us" xml:lang="en-us">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
|
<meta name="security" content="public" />
|
||
|
<meta name="Robots" content="index,follow" />
|
||
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
||
|
<meta name="DC.Type" content="reference" />
|
||
|
<meta name="DC.Title" content="DB2 UDB for iSeries sample tables" />
|
||
|
<meta name="abstract" content="This topic contains the sample tables referred to and used in this topic and the SQL Reference topic collection." />
|
||
|
<meta name="description" content="This topic contains the sample tables referred to and used in this topic and the SQL Reference topic collection." />
|
||
|
<meta name="DC.subject" content="sample table, UDB for, DB2, iSeries, sample tables, table, sample, examples, sample table" />
|
||
|
<meta name="keywords" content="sample table, UDB for, DB2, iSeries, sample tables, table, sample, examples, sample table" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafyreference.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafystdept.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafyemployee.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafyemployeephoto.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafyempresume.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafystprac.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafystproj.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafystprojact.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafyactivity.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafyclasssched.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafyintray.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafyorgtable.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafystafftbl.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafysalestbl.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafykickoff.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafyrefinteg.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafydeleterules.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafymultifetch2.htm" />
|
||
|
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
|
||
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
|
||
|
<meta name="DC.Format" content="XHTML" />
|
||
|
<meta name="DC.Identifier" content="rbafysamptblx" />
|
||
|
<meta name="DC.Language" content="en-us" />
|
||
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
||
|
<!-- US Government Users Restricted Rights -->
|
||
|
<!-- Use, duplication or disclosure restricted by -->
|
||
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
||
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
||
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
||
|
<title>DB2 UDB for iSeries sample tables</title>
|
||
|
</head>
|
||
|
<body id="rbafysamptblx"><a name="rbafysamptblx"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1"><span class="keyword">DB2 UDB for iSeries</span> sample tables</h1>
|
||
|
<div><p>This topic contains the sample tables referred to and used in this
|
||
|
topic and the SQL Reference topic collection.</p>
|
||
|
<div class="section"><p>Along with the tables are the SQL statements for creating the
|
||
|
tables.</p>
|
||
|
</div>
|
||
|
<div class="section"><p>As a group, the tables include information that describes employees,
|
||
|
departments, projects, and activities. This information makes up a sample
|
||
|
application demonstrating some of the features of the <span class="keyword">DB2<sup>®</sup> UDB Query Manager and SQL Development Kit</span> licensed
|
||
|
program. All examples assume the tables are in a schema named CORPDATA (for
|
||
|
corporate data).</p>
|
||
|
</div>
|
||
|
<div class="section"><div class="p">A stored procedure is shipped as part of the system that contains
|
||
|
the DDL statements to create all of these tables, and the INSERT statements
|
||
|
to populate them. The procedure will create the schema specified on the call
|
||
|
to the procedure. Since this is an SQL external stored procedure, it can be
|
||
|
called from any SQL interface, including interactive SQL and iSeries™ Navigator.
|
||
|
To call the procedure where <em>SAMPLE</em> is the schema you want to create,
|
||
|
issue the following statement: <pre><strong>CALL</strong> QSYS.CREATE_SQL_SAMPLE ('SAMPLE')</pre>
|
||
|
The
|
||
|
schema name must be specified in uppercase. The schema must not already exist.</div>
|
||
|
</div>
|
||
|
<div class="section"><div class="note"><span class="notetitle">Note:</span> In these sample tables, a question mark (?)
|
||
|
indicates a null value.</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div>
|
||
|
<ul class="ullinks">
|
||
|
<li class="ulchildlink"><strong><a href="rbafystdept.htm">Department table (DEPARTMENT)</a></strong><br />
|
||
|
The department table describes each department in the enterprise and identifies its manager and the department it reports to.</li>
|
||
|
<li class="ulchildlink"><strong><a href="rbafyemployee.htm">Employee table (EMPLOYEE)</a></strong><br />
|
||
|
The employee table identifies all employees by an employee number and lists basic personnel information.</li>
|
||
|
<li class="ulchildlink"><strong><a href="rbafyemployeephoto.htm">Employee photo table (EMP_PHOTO)</a></strong><br />
|
||
|
The employee photo table contains a photo for employees stored by employee number.</li>
|
||
|
<li class="ulchildlink"><strong><a href="rbafyempresume.htm">Employee resume table (EMP_RESUME)</a></strong><br />
|
||
|
The employee photo table contains employee resumes and is stored by employee number.</li>
|
||
|
<li class="ulchildlink"><strong><a href="rbafystprac.htm">Employee to project activity table (EMPPROJACT)</a></strong><br />
|
||
|
The employee to project activity table identifies the employee who performs each activity listed for each project. The employee's level of involvement (full-time or part-time) and schedule for activity are also in the table.</li>
|
||
|
<li class="ulchildlink"><strong><a href="rbafystproj.htm">Project table (PROJECT)</a></strong><br />
|
||
|
The project table describes each project that the business is currently undertaking. Data contained in each row include the project number, name, person responsible, and schedule dates.</li>
|
||
|
<li class="ulchildlink"><strong><a href="rbafystprojact.htm">Project activity table (PROJACT)</a></strong><br />
|
||
|
The project activity table describes each project that the business is currently undertaking. Data contained in each row include the project number, activity number, and schedule dates.</li>
|
||
|
<li class="ulchildlink"><strong><a href="rbafyactivity.htm">Activity table (ACT)</a></strong><br />
|
||
|
The activity table describes each activity.</li>
|
||
|
<li class="ulchildlink"><strong><a href="rbafyclasssched.htm">Class schedule table (CL_SCHED)</a></strong><br />
|
||
|
The class schedule table describes: each class, the start time for the class, the end time for the class, and the class code.</li>
|
||
|
<li class="ulchildlink"><strong><a href="rbafyintray.htm">In tray table (IN_TRAY)</a></strong><br />
|
||
|
The in tray table describes an electronic in-basket containing a timestamp from when the message was received, the user ID of the person sending the message, and the message itself.</li>
|
||
|
<li class="ulchildlink"><strong><a href="rbafyorgtable.htm">Organization table (ORG)</a></strong><br />
|
||
|
The organization table describes the organization of the corporation.</li>
|
||
|
<li class="ulchildlink"><strong><a href="rbafystafftbl.htm">Staff table (STAFF)</a></strong><br />
|
||
|
The staff table describes the background information of employees.</li>
|
||
|
<li class="ulchildlink"><strong><a href="rbafysalestbl.htm">Sales table (SALES)</a></strong><br />
|
||
|
The sales table describes the information of each sale for each sales person.</li>
|
||
|
</ul>
|
||
|
|
||
|
<div class="familylinks">
|
||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafyreference.htm" title="Reference information for SQL programming includes sample tables and CL commands.">Reference information</a></div>
|
||
|
</div>
|
||
|
<div class="relconcepts"><strong>Related concepts</strong><br />
|
||
|
<div><a href="rbafykickoff.htm" title="These topics describe the iSeries server implementation of the Structured Query Language (SQL) using DB2 UDB for iSeries and the DB2 UDB Query Manager and SQL Development Kit Version 5 licensed program.">SQL programming</a></div>
|
||
|
</div>
|
||
|
<div class="relref"><strong>Related reference</strong><br />
|
||
|
<div><a href="rbafyrefinteg.htm" title="Referential integrity is the condition of a set of tables in a database in which all references from one table to another are valid.">Referential integrity and tables</a></div>
|
||
|
<div><a href="rbafydeleterules.htm">Example: DELETE cascade rule</a></div>
|
||
|
<div><a href="rbafymultifetch2.htm" title="The application must define a row storage area and an associated description area before the application can use a multiple-row FETCH with a row storage area. The row storage area is a host variable defined in the application program.">Multiple-row FETCH using a row storage area</a></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|