slide1 n.
Download
Skip this Video
Download Presentation
Overview

Loading in 2 Seconds...

play fullscreen
1 / 10

Overview - PowerPoint PPT Presentation


  • 99 Views
  • Uploaded on

Database systems the complete book 13.8. record modification By Ahmad Yazdankhah ( ID 219) CS 257 P rof.: T. Y. Lin San José State University SPRING 2011. Overview. What problems we would have during: Insertion Deletion Update. 13.8.1 . Insertion. What would we do for record insertion?

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Overview' - gregory-pallas


Download Now An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
slide1

Database systemsthe complete book13.8. record modificationByAhmad Yazdankhah(ID 219)CS 257Prof.: T. Y. LinSan José State UniversitySPRING 2011

overview
Overview

What problems we would have during:

  • Insertion
  • Deletion
  • Update
13 8 1 insertion
13.8.1. Insertion
  • What would we do for record insertion?
    • Find a block with enough empty space
    • Get a new block
  • But what would happen if we should insert the record in a specific block?
13 8 1 insertion cont d
13.8.1. Insertion (cont’d)
  • There are two possibilities:
    • There is enough room in the target block
    • There is not enough room in the target block
  • In the 1st case, insert and update the offset table
  • In the 2nd case, there are two approaches:
    • Find space on a nearby block and slide the records
    • Create an overflow block
13 8 1 insertion cont d1
13.8.1. Insertion (cont’d)
  • What is an overflow block?
    • It is another block in which we put the records that theoretically belong to this block.
    • In block’s header, there is a pointer to an overflow.
13 8 2 deletion
13.8.2. Deletion
  • The usual technique is to put a tombstone in place of the record.
  • This is not the case that we delete the record physically.
  • This is a permanent tombstone until the database is reconstructed.
13 8 2 deletion cont d
13.8.2. Deletion (cont’d)
  • Where to put the sign of deletion?
    • If using offset table in the block header, put null in the pointer’s place
    • If using a map table, put null in physical address
13 8 3 update
13.8.3. Update
  • No problem if fixed length records
  • The problems arise for variable length records
  • We have all problems mentioned for insertion and deletion
13 8 3 update cont d
13.8.3. Update (cont’d)
  • If the new record is shorter:
    • Slide down the records to consolidate the free spaces
  • If the new record is longer:
    • Slide down the records to make room
    • Create an overflow block