Docsity

Storage and Indexes-Introduction to Databases-Tutorial 16-Computer Science, Study Guides, Projects, Research of Introduction to Database Management Systems

Toggle sidebar
bg1
Announcements
• Program 1 on web site: due next Friday
• Today: buffer replacement, record and block
formats
• Next Time: file organizations, start Chapter 14
(indexes)
• Office hours change:
– Old office hours Mon 10-11, Thur 1:30-2:30
– New office hours Mon 10-11, Thur 2-3
• Opportunity to replace lowest HW (not program)
– Create PPT slides of worked examples
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12

Partial preview of the text

Download Storage and Indexes-Introduction to Databases-Tutorial 16-Computer Science and more Study Guides, Projects, Research Introduction to Database Management Systems in PDF only on Docsity!

Announcements

•^

Program 1 on web site: due next Friday

-^

Today: buffer replacement, record and blockformats

-^

Next Time: file organizations, start Chapter 14(indexes)

-^

Office hours change:– Old office hours Mon 10-11, Thur 1:30-2:30– New office hours Mon 10-11, Thur 2-

-^

Opportunity to replace lowest HW (not program)– Create PPT slides of worked examples

Open questions from last time

•^

When to write dirty pages?– Dirty pages may be kept in buffer pool without being

written to disk immediately but,

  • At conclusion of

transaction

the DBMS

log

(aka

journal

) is forced to disk (see Chapter 17)

•^

How much does OS need to be concerned withhard drive architecture?– I am not certain but I would think not much

-^

Why does pin count for a frame exceed 1?– See email

Buffer Replacement Example

Sequential Flooding

Records and Files

Records and Files

Query OptimizationRelational Operators Disk Space Management

Buffer Management Files and Access Methods

So far we have reading andwriting whole blocks.Now we will discuss how anRDBMS organizes datawithin a block

File

•^

A

file

is a collection of records that (in general)

spans multiple blocks

record 1

record 2

record 3

record 4

record 5

record 6

record N-

record N

block 1 of fileblock 2 of fileblock M of file

file withM blocks

We are primarily concerned with how these organizations

Some Issues With Records and Filesimpact the performance of various file operations

•^

Record format– fixed length Vs variable length

-^

Record organization within a block– Packed, unpacked

-^

Record organization within file– ordered Vs unordered

Record Format

Fixed length record format Variable length record formats

Reasons for variable length records

•^

Variable length fields (most common)

-^

Repeating groups

-^

Optional fields

-^

Mixed record types

File Organizations (overview)

•^

Heap Files– Unordered random sequence of records

-^

Ordered Files– Records are ordered by some field (or combination of

fields)

•^

Hashed Files– A hash function used to quickly find records on some

key.

Record Format

Spanned record organization is a more efficient use of space, butaccessing a record may require multiple I/O operation (may beunavoidable for large records).