Random file organization
This presentation is the property of its rightful owner.
Sponsored Links
1 / 31

การจัดระเบียบแฟ้มแบบสุ่ม Random file organization PowerPoint PPT Presentation


  • 50 Views
  • Uploaded on
  • Presentation posted in: General

การจัดระเบียบแฟ้มแบบสุ่ม Random file organization. โดยนายบุญค้ำ จุลเจือ วิทยาลัยชุมชนตราด. นิยามและการประยุกต์. วิธีการจัดระเบียบแฟ้มเป็นแบบเข้าถึงระเบียนโดยตรง เราเรียกว่า การจัดระเบียบแฟ้มแบบสุ่ม Random file organization.

Download Presentation

การจัดระเบียบแฟ้มแบบสุ่ม Random file organization

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


Random file organization

Random file organization


Random file organization

  • Random file organization


Random file organization

  • Interactive processing ()

  • 1)

  • 2)


R r key value address 3

R R(key value)address 3

  • 1. (Direct Mapping)

  • 2. (Dictionary lookup)

  • 3. (Address Calculation)


1 direct mapping

1. (Direct Mapping)

  • Relative Addressing

  • Relative addressing

  • 0-9999 10,000 10,000 0-9999

  • 30 %

  • 10 1-9999999999 2,000


Relative addressing

Relative addressing

  • 1. R

  • 2.

  • 1.

  • 2.


2 dictionary lookup

2. (Dictionary lookup)

  • Indexed file Index Nonsequential File

  • /


Dictionary structure

(Dictionary structure)

  • 2 entries key address (linear/table) (nonlinear)

  • 1. key

  • - (binary search)

  • -

  • key

  • -

  • -


Random file organization

  • 2. Nonlinear

  • - Binary search tree

  • - M-way search tree

  • - B tree

  • - Linear

  • -


Random file organization

  • Key value : address


Random file organization

  • 1.

  • 2.

  • 3. reorganization ()


Addressing calculation

(addressing Calculation)

  • R(key value) address


Random file organization

  • R(k1)=R(k2) k1#k2 k1,k2 2 Collision () k1,k2 Synonyms (home address) (overflow record)

  • (hashing function)


Random file organization

  • 1. Bucket

  • 2. loading factor

  • 3.

  • 4.

  • 5.


Bucket

Bucket

  • bucket bucket 1 1 bucket (bucket capacity) home bucket

  • bucket overflow bucket Seek time

  • bucket overflow bucket


Home bucket

Home bucket

  • home address bucket Bucket home bucket


Random file organization

  • home address

  • bucket Bucket home bucket

  • bucket Overflow bucket

  • Loading factor (available) loading factor = #records in filemax.#of records file can contain

  • Loading factor


Loading factor overflow

Loading factor Overflow

  • loading factor .70-.80 reorganization 4000 5000 loading factor =.80


Random file organization

  • synonym


Random file organization

  • 1. (The Division Remainder Method) home bucket (prime number) bucket

  • F(KV) = Mod(KV/N)Rem = KV= N= largest prime number home bucket


Random file organization

  • 10,000 0000000-9999999 12000 overflow 00000-11999 prime number 11999 11987

  • home bucket =0235671

  • 0235671 11987 19 7918 7918 home bucket 0235671


2 digit analysis method

2. (Digit Analysis Method)

  • 0-9 (Uniform distribution) 2,3,5


3 mid square method

3. Mid-square Method

  • 2 Relative address address


4 folding

4. Folding

  • address

  • = 123456789 4 digit-address


Folding

folding


5 different radix

5. Different Radix

  • 123456 11 4

  • (1*115)+(2*114)+(3*113)+(4*112)+(5*111)+6=194871 4971


Random file organization

  • 1. Open addressing

  • 2. Separate overflow 2 home bucket overflow


Collision

Collision ()

  • 1. Linear Probing home bucket home bucket

  • 2. Double Hashing C C home address Collision C


Random file organization

  • 3. Synonym Chaining link field home bucket overflow bucket link field synonym


Random file organization

  • 1.

  • 2.

  • 3.

  • 4.

  • 1.

  • 2.


Random file organization

  • 1.

  • 2.

  • 3.

  • 4. linear probing , double hashing , synonym chaining

  • 5. folding 139971688 4 digit-address


  • Login