10/9 Class Flashcards
difference between datawarehouse and database
the way the data is organized
step 1
decide on the data format:
data type
length
null or not null
char(size)
size is the number of characteristics to store
varchar(size)
size is the number of characters to store, between variable length string
integer
stores ranges of integer values
decimal(p,s)
P is the precision and s is the scale
ex: deimal (7,2) is a number that has 5 digits before the decimal and 2 digits after the decimal
Step 2
decide index attributes
date time
stores year, month, day, hours, minutes, and seconds
disk
is the slowest part of our index
logical unit of transfer data(block)
4k bytes, 0.01 seconds
index table
only has two attributes
key: unique key, pointer: shows which block it is in
B+ tree index
where there are multiple indexes in our records
height of the tree
log2n the two is based on a two block table
time process structure
4min non index
12s simple index
.21 s b+ tree
oracle command for creating B+tree index
create index pidindex ON product(product_key)