MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

sample db2 test tables needed

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
shekar123
Advanced


Joined: 22 Jul 2005
Posts: 528
Topics: 90
Location: Bangalore India

PostPosted: Fri Oct 21, 2005 7:53 am    Post subject: sample db2 test tables needed Reply with quote

Hi all,

I am basically trying to set up a DB2 sample database for testing my application to run some queries.Can anyone provide me the links to sample tables descriptive with all keys declared where in i can feed data with all key contraints so that my testing of queries is done ?
Back to top
View user's profile Send private message
haqshaik
Beginner


Joined: 11 May 2005
Posts: 49
Topics: 19

PostPosted: Fri Oct 21, 2005 9:50 am    Post subject: Reply with quote

Shekar,
Run the query against the system catalog tables and you will get the definitions of the default tables. Once you get the table names, You can play around with them.

Hope this will be helpful.

Regards,
Salauddin
Back to top
View user's profile Send private message
shekar123
Advanced


Joined: 22 Jul 2005
Posts: 528
Topics: 90
Location: Bangalore India

PostPosted: Fri Oct 21, 2005 12:50 pm    Post subject: sample db2 test tables needed Reply with quote

haqshaik,

Thanks for your reply.Basically i am looking out to start from the scratch to create tables ,indexes,primary keys,foreign keys ,inserting values views,synonyms,allias and then with queries to play around.I need the link to create sample tables from the scratch and test data to insert which will be helpful for me.

Thanks
Shekar123
Back to top
View user's profile Send private message
haqshaik
Beginner


Joined: 11 May 2005
Posts: 49
Topics: 19

PostPosted: Fri Oct 21, 2005 1:46 pm    Post subject: Reply with quote

Shekar,
The following steps needs to be done.
1) Creaion of a data base
2) Creation of a schema to logically group the tables.
3) Creation of a table space.
As you are authorised to create the tables, your id will be associated to a group and that group will become your shcema or if you do not know set the sqlid to your userid. What ever the tables you create will have the owner as your userid.

SET CURRENT SQLID = 'xxxxxx' --> Schema Name

CREATE
TABLESPACE XXXXXX ---> Table Sapce name
IN YYYYYY ----> Database name
USING STOGROUP zzzzzzzz --> Stogroup Name
PRIQTY aa ---> Space unit in KB
SECQTY 720 --> Space unit in KB
PCTFREE 0
LOCKSIZE ANY
BUFFERPOOL BP3
SEGSIZE 32
COMPRESS YES
CLOSE NO;

COMMIT;

5) Create table statement
CREATE TABLE table name(
col1 datatyp
PRIMARY KEY (coloumn name)
)
IN database.tablespace;
6) Creation of Index
CREATE UNIQUE INDEX index name ON table name
(
col1 ASC/DSC
)
USING STOGROUP zzzzzzz
PRIQTY aa
SECQTY bb
PCTFREE 0
CLUSTER
DEFER YES
BUFFERPOOL BP3
CLOSE NO ;
COMMIT;
if you search for stogrouo creation and database creation you can get the same from IBM manuals.

Hope this will be helpful.

Regards,
Salauddin
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Sat Oct 22, 2005 7:44 am    Post subject: Reply with quote

haqshaik,

Shekhar does not have authority to create tables. He was inquiring if he can use some trial software to create tables and play around with them.

Shekhar123,

Try DB2 UDB Personal Edition . It is free and can be downloaded. Click the "trails and betas" link on the left in the below link

http://www-306.ibm.com/software/data/db2/udb/edition-pe.html

Hope this helps...

Cheers

kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
shekar123
Advanced


Joined: 22 Jul 2005
Posts: 528
Topics: 90
Location: Bangalore India

PostPosted: Sat Oct 22, 2005 12:05 pm    Post subject: db2 sample database needed Reply with quote

Thanks Kolusu,

I am able to download the sample database and i am finding it really helpful for my practise purpose.The contents of the database are described very clearly and it is very useful and informative.Thanks once again .


Shekar123
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group