home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / database / 6630 < prev    next >
Encoding:
Text File  |  1992-09-09  |  2.6 KB  |  79 lines

  1. Newsgroups: comp.databases
  2. Path: sparky!uunet!gatech!darwin.sura.net!spool.mu.edu!umn.edu!sys12.ortta.umn.edu!durai
  3. From: durai@ORTTA (Appadurai V.)
  4. Subject: Re: dbf format
  5. Message-ID: <durai.31@ORTTA>
  6. Sender: news@news2.cis.umn.edu (Usenet News Administration)
  7. Nntp-Posting-Host: sys12.ortta.umn.edu
  8. Organization: U of Mn
  9. References: <PPOH.92Aug28171027@amethyst.tcs.tufts.edu>
  10. Date: Wed, 9 Sep 1992 17:11:17 GMT
  11. Lines: 66
  12.  
  13. There was a request for dbf and index formats:
  14.  
  15. The following information is from Foxpro Developers Guide (Fox Software):
  16. (Appendix B)
  17.  
  18.  
  19. .dbf structure
  20.  
  21. A database file is made up of a header record and data records.  The header 
  22. record defines the structure of a database and contains any other 
  23. information related to the database.  It starts at file position zero.
  24.  
  25. The data records* follow the header, in consecutive bytes, and contain the 
  26. actual text of the fields.  The length of a record, in bytes, is determined 
  27. by summing the defined lengths of all fields.  Numbers in this file are 
  28. represented in reverse bytes.
  29.  
  30. Data File Header Record:
  31.  
  32. Bytes   Description
  33. 00    Foxbase+/dbase III+, without memo:  0x03
  34.                          with memo   :  0x83
  35.     Foxpro/dbase IV, without memo    :  0x03
  36.     Foxpro, with memo                :  0xF5
  37.     dbase IV, with memo         :  0x8B
  38. 01-03   Last update (yymmdd)
  39. 04-07    Number of records in file     
  40. 08-09   Position of first data record
  41. 10-11    Length of one data record (including delete flag)
  42. 12-31    Reserved
  43. 32-n    Field subrecords**
  44. n+1    Header record terminator (0x0D)
  45.  
  46. Field Subrecords***
  47.  
  48. Bytes    Description
  49. 00-10    Field Name (max 10 chrs - if less than 10, padded with null
  50.             chr (0x00))
  51. 11    Data Type (C: Chr, N: Num, L: Logical, M: Memo, D: Date)
  52. 12-15    Displacement of field in record
  53. 16    Length of field (in bytes)
  54. 17    Number of decimal places
  55. 18-32    Reserved
  56.  
  57. Notes
  58. * The data in the data file starts at the position indicated in bytes 08-09 
  59. of the header record.  Data records begin with a delete flag byte.  If this 
  60. byte is an ASCII space (0x20) the record is not deleted; if the first byte 
  61. is an asterisk (0x2A) the record is deleted.  The data from the fields named 
  62. in the field subrecords follows the delete flag.
  63.  
  64. ** The number of fields determines the number of field subrecords.  
  65.  
  66. *** Limitations on characters per record, max fields, etc are defined in the 
  67. System Capacities section of the appendix.
  68.  
  69.  
  70. .idx format
  71.  
  72. The manual deals quite comprehensively the different index formats.  Please 
  73. refer to the book for the discussion.  < i might be violating copyright 
  74. privileges here, if i reproduced the entire text, and secondly, its too 
  75. lengthy a discussion. >
  76.  
  77.  
  78.  
  79.