relationship between those tables called a 
table hierarchy
. The table 
hierarchy is made up of a single root table, supertables, and subtables.
It can be created as shown in Example 5 9.
Example 5 9   Usage of typed/hierarchy table
db2>create table itsotypedtable1 of itsotype(ref is Oid user generated)
db2>create table itsosubtable1 of itsotype2 under itsotypedtable1
    inherit select privileges
db2>create table itsosubtable2 of itsotype2 under itsotypedtable1
    inherit select privileges
Views
Views are the named specification of a result table. This specification is a 
select statement that is run whenever the view is referenced in an SQL 
statement. It can be used just like a base table.
A simple view can be created by create statement as shown in Example 5 10.
Example 5 10   View example
db2>create table itsotable1(col1 int, col2 int,
                            col3 char(20),col4 float, col5 char(30))
db2>create table itsotable2(col6 int, col7 int, col8 char(20),
                            col9 float, col10 char(30))
db2>create view itsoview(col1,sum1,col4,col10) as 
    select col1,col1+col6,col4,col10
    from itsotable1,itsotable2
    where col1<10 and col6>10
5.2.3  Index manipulation
An index is an object in the database system, which uses indexing techniques for 
faster retrieval of the data from tables. It is an ordered set of pointers to rows of a 
base table managed by the database manager directly.
MySQL supports both single column indexes and multi column indexes. MySQL 
can have three types of indexes:
Primary key
Unique
Index
106 
MySQL to DB2 UDB Conversion Guide






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

san diego web hosting

 

Our partners: PHP: Hypertext Preprocessor Cheap Web Hosting JSP Web Hosting Ontario Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Java Hosting Cheapest Hosting

Visionwebhosting.net Business web hosting division of Vision Web Hosting Inc.. All rights reserved