By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,589 Members | 2,255 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,589 IT Pros & Developers. It's quick & easy.

How many extents are allocated when a table is created

P: n/a
Hi group,
I am going through some exercises regarding DB2 Administration and I
found the below:
How many extents are allocated when the following Employee table is
created in the DMS tablespace TBS03?

create table employee
( ID smallint not null,
name varchar(9),
DEPT smallint check (dept between 10 and 100),
job char(5) check (job in ('Sales', 'Mgr', 'Clerk')),
hiredate date,
salary decimal(7,2),
Comm decimal (7,2),
Notes long varchar,
resume blob,
constraint yearsal check (year(hiredate) 1986 or salary 40500)
) in TBS03;
create unique index inx_u_emp on employee (id);
create index inx_emp_01 on employee (name);

The answer is 10 but I did not understand how can somebody calculcate
this?
Is it one extend for each column of the table?
Many thanks in advance
Demetris

Sep 11 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi
I found the following url which describes the different types of
extents that can be created:
http://publib.boulder.ibm.com/infoce...n/c0004935.htm

Briefly:
1. A data object. This is where the regular column data is stored.
2. An index object. This is where all indexes defined on the table are
stored.
3. A long field object. This is where long field data, if your table
has one or more LONG columns, is stored.
4. Two LOB objects. If your table has one or more LOB columns, they
are stored in these two table objects:
o One table object for the LOB data
o A second table object for metadata describing the LOB
data.
6. A block map object for multidimensional tables.
7. Each table object is stored separately, and each object allocates
new extents as needed.
8. Each DMS table object is also paired with a metadata object called
an extent map, which describes all of the extents in the table space
that belong to the table object.
9-10. Two more extents are needed for the 2 indexes (ndex inx_u_emp,
inx_emp_01)

Please advice if the above syllogism is correct.
Thanks

Sep 11 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.