Random file organization
Download
1 / 31

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


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

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

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

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


  • Interactive processing ()

  • 1)

  • 2)


R R(key value)address 3

  • 1. (Direct Mapping)

  • 2. (Dictionary lookup)

  • 3. (Address Calculation)


1. (Direct Mapping)

  • Relative Addressing

  • Relative addressing

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

  • 30 %

  • 10 1-9999999999 2,000


Relative addressing

  • 1. R

  • 2.

  • 1.

  • 2.


2. (Dictionary lookup)

  • Indexed file Index Nonsequential File

  • /


(Dictionary structure)

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

  • 1. key

  • - (binary search)

  • -

  • key

  • -

  • -


  • 2. Nonlinear

  • - Binary search tree

  • - M-way search tree

  • - B tree

  • - Linear

  • -


  • Key value : address


  • 1.

  • 2.

  • 3. reorganization ()


(addressing Calculation)

  • R(key value) address


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

  • (hashing function)


  • 1. Bucket

  • 2. loading factor

  • 3.

  • 4.

  • 5.


Bucket

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

  • bucket overflow bucket Seek time

  • bucket overflow bucket


Home bucket

  • home address bucket Bucket home bucket


  • 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 .70-.80 reorganization 4000 5000 loading factor =.80


  • synonym


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

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


  • 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)

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


3. Mid-square Method

  • 2 Relative address address


4. Folding

  • address

  • = 123456789 4 digit-address


folding


5. Different Radix

  • 123456 11 4

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


  • 1. Open addressing

  • 2. Separate overflow 2 home bucket overflow


Collision ()

  • 1. Linear Probing home bucket home bucket

  • 2. Double Hashing C C home address Collision C


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


  • 1.

  • 2.

  • 3.

  • 4.

  • 1.

  • 2.


  • 1.

  • 2.

  • 3.

  • 4. linear probing , double hashing , synonym chaining

  • 5. folding 139971688 4 digit-address


ad
  • Login