home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / datamage.zip / DOCS.ZIP / BASICS.DOC < prev    next >
Text File  |  1991-08-25  |  18KB  |  338 lines

  1. COMPUTERIZED DATA STORAGE AND RETRIEVAL:
  2.  
  3. Before learning the DATAMAGE data management system you need to know some basic
  4. information,  hence  the  title  of this section  of  the  documentation.   The
  5. facility  offered the DATAMAGE system is the storage and retrieval of data,  be
  6. it  your  customers and their balances, your payables and their  amounts,  etc.
  7. DATAMAGE can be used to store any FORMATTED data.
  8.  
  9. DATABASES:
  10.  
  11. There  are  basically  two  types of  databases:   Those  programs  that  store
  12. unformatted  text  and those that handle formatted data.  DATAMAGE  is  of  the
  13. latter type, which are commonly called DATA MANAGEMENT SYSTEMS.
  14.  
  15. The former type of program might be used to record articles from newspapers  or
  16. periodicals and find the text pertinent to specific needs of the user.
  17. You might be a rocket scientist, and have a need for information about the  Van
  18. Allen  radiation  belts that surround this planet.  With a  TRUE  DATABASE  you
  19. could  scan all information in your database, that might well be about the  sex
  20. habits  of  the Tasmanian devil, and have it spit out all the  articles  making
  21. mention of the radiation belts.
  22.  
  23. DATA MANAGEMENT SYSTEMS:
  24.  
  25. A  data management system lacks the ability to store  unformatted  information,
  26. but  offers a host of other capabilities pertinent to the use and  manipulation
  27. of formatted data.  This kind of program MANAGES data.
  28.  
  29. You  might  be  that same rocket scientist, having shot  one  of  your  rockets
  30. complete  with  instruments of measurement, through the radiation  belts.   The
  31. data  returned  by  the rocket during it's flight might  concern  it's  current
  32. altitude, the intensity and type of radiation encountered there, etc. Your need
  33. would then be to record FORMATTED (that is, predictable) data about the  flight
  34. of  the  rocket, to be able to quickly find the data generated at  three  miles
  35. into the belts, and to compute totals and averages concerning certain  segments
  36. of the experiment.  These are the facilities offered by DATAMAGE.
  37.  
  38. PAPER FILING SYSTEMS VERSUS DATA MANAGEMENT SYSTEMS:
  39.  
  40. An old-fashioned paper filing system consists of ink stains dried on sheets  of
  41. paper,  grouped into files in the drawers of your filing  cabinets.   Computers
  42. store  files  on disk, as 1s and 0s.  These 1s and 0s are grouped  into  BYTES,
  43. which  correspond to an individual ink stain on a piece of paper.  Though  it's
  44. just  a blob of dried ink, you know it's an A.  And, though it's just eight  1s
  45. and 0s, the computer also knows it's an A.
  46.  
  47. Paper files are REALLY inconvenient when they become large.  It takes HOURS  to
  48. search  through  four thousand paper files to select the group with  which  you
  49. need to work.  But to search through four thousand records on a disk drive will
  50. require less than a minute.  The 1s and 0s are a lot smaller, you see.
  51.  
  52. There are differences in paper files versus disk files.  Foremost among them is
  53. uniformity.   All records in a disk file have the same format though  the  data
  54. they  contain will differ.  In a paper file you can keep shoving in  sheets  of
  55. paper until you run out of drawer space to hold it.
  56.  
  57. RECORDS:
  58.  
  59. Here's a graphic representation of a disk record:
  60.  
  61. NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNPPPPPPPPPPPPDDDDDDDDDD
  62.  
  63. The first thirty-five spaces in the record are for a name, the next twelve  for
  64. a phone number, and the last ten for a date.  If you can imagine four  thousand
  65. of  these  strung  together  with no spaces  in  between,  you  can  accurately
  66. conceptualize what you're working with, though we'll use more fields.
  67.  
  68. This  compact  data storage format would hardly be acceptable for  people.   We
  69. prefer  white  space between the data we see, and headings to  identify  it  as
  70. well.   For the computer this is a perfect storage format; the essence  of  the
  71. computer is speed and it needs no white space.
  72.  
  73. You  will  never  see  the data in the compact  storage  format.   When  it  is
  74. displayed  or  printed for your consumption white space and  headings  will  be
  75. added.  There's no reason to record the white space on the disk drive, it would
  76. only waste the space available and slow the computer down by forcing it to deal
  77. with larger records.
  78.  
  79. FIELDS:
  80.  
  81. Disk  files have FIELDS that store data.  Each record in a given file  has  the
  82. same  fields.   These fields have three general purposes:   1>    identify  the
  83. record in which they appear  2>  store data  3>  store transient information.
  84.  
  85. A  field that identifies a record in a disk file stores the name, part  number,
  86. description,  etc.;  the data by which we identify the record.   This  kind  of
  87. field is called a KEY field.
  88.  
  89. A  field  that stores data contains information pertinent to the  record.   The
  90. data can be numeric, dollar, string or date formatted.
  91.  
  92. A field that stores transient data is a field that contains a message; a  state
  93. of  the record.  An example of this could be a field called "STATUS: O  or  P."
  94. If there is an O in this field you know that the record, be it a check, invoice
  95. or whatever, is outstanding.  If it contains a P then you know it's paid.
  96.  
  97. Indeed,  paper files are more flexible than records on disk; they  may  contain
  98. any  piece  of paper you shove in them, including one that belongs  in  another
  99. folder.   But  when  processing many paper files  that  flexibility  slows  the
  100. process  tremendously due to the necessity of looking through different  pieces
  101. of paper that may or may not contain the data you need to see.
  102.  
  103. This  not  to  say that records on disk can not contain  comment  fields  whose
  104. purpose  will differ between records; merely that if such fields  are  included
  105. then  each  record  will have the same number of comment fields,  of  the  same
  106. length.  All records within a given disk file will be identical.
  107.  
  108. CLASSES OF DATA STORAGE - FIELD TYPES:
  109.  
  110. The  primary  goal  of the DATAMAGE system is to  provide  computer-based  data
  111. storage,  retrieval and manipulation to your average clerical employee who  has
  112. not  taken  a  computer  science degree, nor suffered a  night  course,  as  is
  113. required by most of the competing software.  This means keeping things  simple.
  114. In the world of computers, SIMPLICITY IS POWER, and LESS IS MORE!
  115.  
  116. The  fields in the records of DATAMAGE files are different, one  from  another,
  117. depending on the class of data they are designed to hold. Four types of  fields
  118. are  proffered by the system:  STRING (alphanumeric), NUMERIC, NUMERIC  DOLLAR-
  119. FORMATTED, and DATE.
  120.  
  121. Alpha and date fields hold exactly what you type in, in ascii format.  DATAMAGE
  122. supports  numeric  storage of sixteen digits of numeric  precision  with  user-
  123. defined  decimal precision or full floating point.
  124.  
  125. Numeric  and  dollar fields are recorded in the MICROSOFT  binary  format,  and
  126. occupy  eight  bytes regardless of their content.  If you use  a  disk  utility
  127. program to look at a YOURDATA.RAD. file (this is the filename of all  datafiles
  128. produced by DATAMAGE) you will see what looks like disk garbage in the  numeric
  129. fields.
  130.  
  131. This  format is a MEMORY DUMP; the content of the computer's memory is  written
  132. directly  to  disk.   It was chosen due to it's compatibility  with  the  BASIC
  133. interpreter and it's usability by C and BASIC compilers.  Due to the fact  that
  134. no  conversion from the ascii format to the computer's internal storage  format
  135. is necessary the programs can manipulate this data very quickly.
  136.  
  137. FORMATTING YOUR DATA:
  138.  
  139. If  you  are  starting  fresh, having no previous paper  files  to  convert  to
  140. computer  files,  your task will be simple.  If you  have  current  paper-based
  141. filing systems and wish to convert them to computerized files you will need  to
  142. bridge  the gap between the formats and you will need to convert  your  current
  143. data to fit the new requirement of uniformity imposed by the computer.
  144.  
  145. CONVERTING YOUR CURRENT PAPER-BOUND FILES:
  146.  
  147. In many paper files some folders contain more sheets than others.  If a data is
  148. present in only one folder and is foreseen to be available for or pertinent  to
  149. few others, it should not be included in the datafile.
  150.  
  151. To know what information to include in your datafile, you need to know how your
  152. computer  works.  In general, computers are neither intelligent  nor  creative.
  153. But they can perform a great number of the same operation, using different data
  154. for each, at frightening speed.  And, they can store huge amounts of data in  a
  155. very small space.
  156.  
  157. Let's  say  that  you  need to computerize your  employee  file.   The  folders
  158. contain, in addition to the obligatory information on name, scale, tax  status,
  159. credit   union  and  insurance   deductions,  etc,   performance   evaluations,
  160. commendations   and  write-ups   (disciplinary)  for  some  employees.    These
  161. "comment" sections of  the employee records can consist of several pages.
  162.  
  163. In  this  case,  you  would not store any of the  comment  information  in  the
  164. datafile.  You could place fields in the datafile to indicate the presence  and
  165. type of comments for that employee  outside the computer system.  If  you  need
  166. the portability of the comments as well, have a steno  to  record them  all  on
  167. disk with your word processor, which is designed for this job.
  168.  
  169. You  could  place  the filenames of the comment files,  produced  by  the  word
  170. processor,  in  the datafile.  Then, the system could produce a  list  of  all
  171. comment  files on an employee, or a group of employees, made  by  your  sorting
  172. parameters.
  173.  
  174. The  date of the comment may also be considered important enough to be  in  the
  175. datafile.  You could produce lists of all employees, having a comment in  their
  176. files  dated  after a certain date.  The filenames of these comments  could  be
  177. included in the datafile, and the disks containing the comment files could then
  178. be loaded by the word processor and reviewed.
  179.  
  180. INSTALLING YOUR OWN DATAFILE:
  181.  
  182. You  will need to do some planning before you set up your own datafile.   These
  183. instructions  can only offer you some helpful hints because we have no idea  of
  184. the type of data you want to store.
  185.  
  186. In  general, the more time taken to design a datafile, the more useful it  will
  187. be.  You will have a lot of work to do,  entering the records.  You should take
  188. time, now, to maximize the return you will get from your investment.
  189.  
  190. When you are ready, start the DBSEMAKR program.  It is #5 on the menu of the GO
  191. program.   The documentation for this program is included as DBSEMAKR.DOC.   If
  192. you  have  a  floppy-based machine have the target disk ready  to  receive  the
  193. datafile  definition files.  The  datafile  definition  will be written to  the
  194. chosen directory when you finish.   Now, you enter the records by starting  the
  195. BASE program, and loading the new datafile.
  196.  
  197. PLANNING YOUR DISK SPACE:
  198.  
  199. The  raw  materials  available to the DATAMAGE system  vary  from  computer  to
  200. computer.   With a floppy based computer, having 40 track drive(s),  the  gross
  201. storage   available  is around 300 KB.  Contrary to popular belief,  there  are
  202. 1,024  bytes  in  a  K-BYTE.  The file index can occupy  up  to  40K,  and  the
  203. definition files take some room, etc.
  204.  
  205. You should know the approximate number of records your datafile will be  called
  206. upon  to  hold.  Divide 307,200 by this number, and you will  get  the  maximum
  207. allowable record size, in bytes.
  208.  
  209. For  example,  suppose you need to place up to  2000 records on a  forty  track
  210. floppy.  307,200 divided by 2000 is 154.  And, at 154 bytes, the fields must be
  211. small if they are to be many.  Using four string segments length 35 bytes,  and
  212. a  single  numeric  segment (8 bytes) covers 148 bytes  of  disk  space.   Most
  213. datafiles have between twenty and fifty fields.
  214.  
  215. A  DATAMAGE datafile can occupy 320 million bytes on disk.  (32,000  records  X
  216. 10,000 bytes per record), and this does not count the file index or the control
  217. file.  The control file for the monster datafile would occupy 64,000 bytes  and
  218. the file index would occupy 320,000 bytes.
  219.  
  220. A  single datafile can fill ANY hard disk!  No matter what kind of  disk  drive
  221. you are using you should consider the storage it offers as a VALUABLE RESOURCE,
  222. and avoid wasting it.
  223.  
  224. NUMERIC STORAGE CONSIDERATIONS:
  225.  
  226. All  numeric  data stored by the program is double precision, having  16  digit
  227. capacity,  and  full  floating point.  To store this type  of  number  on  disk
  228. requires  8  bytes.  All numeric fields,  whether their class is  numeric,  or
  229. numeric dollar format, reside in eight of their own bytes on disk.
  230.  
  231. Calculations  done  by the program have 16 digits to work with,  and  are  more
  232. precise  than the same calculations done with calculators.  The result  of  all
  233. calculations  done will be rounded to the decimal precision specified  for  the
  234. field in which they are recorded.
  235.  
  236. STRING STORAGE CONSIDERATIONS:
  237.  
  238. STRING  fields  can  store any type of data, including numbers.   You  are  now
  239. reading  STRING  data.   The  name STRING was  originally  coined  by  computer
  240. programmers  as  a  STRING  of  untyped  characters.   It  is  also  known   as
  241. ALPHANUMERIC  data.  If you store numeric data in STRING fields that data  will
  242. not be eligible as the input to or output of calculations.
  243.  
  244. The   maximum  length of a string field is 250 characters, and  each  character
  245. requires  one  byte of disk space.  Using  too many possible  characters  in  a
  246. string  field  causes  wasted disk space, and too few causes  the  data  to  be
  247. difficult to read, due to over-abbreviation, etc.
  248.  
  249. SWITCHES:
  250.  
  251. String fields offer more than the ability to store a name, address or the like.
  252. A  one byte string segment can be declared as a "switch"  This could  be  used,
  253. for  example,  in a sales history datafile, to indicate whether or not  a  sale
  254. was   pre-paid.   The name of the data segment might be:  PREPD?  (Y   or   N).
  255. When entering records, you would enter a "Y" if the sale was prepaid, or a  "N"
  256. if it was not.
  257.  
  258. CODES:
  259.  
  260. An expansion of the switch structure is the code.  A code occupying a two  byte
  261. string on disk could have 416 possible meanings, working with the 26 lower case
  262. letters,  only.  Rising to 2,704 if case is incorporated.  Both the switch  and
  263. the code are ways to save disk space.  A paper record of the possible codes for
  264. each  field should be prepared, and used to interpret the codes stored  in  the
  265. records.
  266.  
  267. An  good  example of the proper use of a code is to identify the  source  of  a
  268. part, as one of 127 possible vendors.  Space on disk is saved, since a  lengthy
  269. field holding a company name is replaced by a one byte segment holding a  code,
  270. but the datafile needs the code sheet to be read.  Of  course,  you could  also
  271. record the record number detailing that vendor in another datafile.
  272.  
  273. GENERAL-PURPOSE FIELDS:
  274.  
  275. While  using the BASE program you may find it  convenient to write the  results
  276. of some computation to disk, for  temporary storage.  You will need unassigned,
  277. general-purpose numeric fields to hold the transient data.
  278.  
  279. COMMENTS:
  280.  
  281. There will probably be many times when you find yourself on the phone,  calling
  282. people  in your datafile to some purpose or another.  You may be attempting  to
  283. sell them something, you may be attempting to collect moneys owed you.
  284.  
  285. This situation, as well as many others, may produce data that won't really  fit
  286. into  any  of  your pre-defined categories, such as:  This guy  is  simply  not
  287. interested, I'm going to have to sue him to collect.
  288.  
  289. This  is the purpose of COMMENT FIELDS.  In the planning of your datafiles  you
  290. should be able to anticipate the need of these fields.  Try not to use too many
  291. as  this will cause undue waste of your available disk space.  But  use  enough
  292. comment space to fill your need.
  293.  
  294. One  way to deal with really unpredictable situations of this nature is to  use
  295. the APPLICATIONS MAKER program to produce a sheet of paper with the  customer's
  296. name and other pertinent information on it.  Then jot down your notes.
  297.  
  298. FLAGS:
  299.  
  300. Another  use  of unassigned fields is for flags.  A flag is a message  that  is
  301. left in the record, to indicate whatever you like.  A valid example of flag use
  302. is  to  identify  newly entered records, so that they can be  sorted  into  the
  303. survivor group after entry, to be processed in some manner.  Provided that  the
  304. numeric format of the entry date of the record to the datafile is not  included
  305. in  the record, (it seldom has any relevancy) there is no way for the  operator
  306. to identify the newly entered records from records entered ten years ago.
  307.  
  308. An   unused field is selected as the flag and, when records are  entered,   the
  309. value   held  in that field is set to a pre-determined value.  After  the   new
  310. records are entered a sort is done to detect the presence of the flag value  in
  311. the  flag field.  Only the flagged records are included in the survivor  group,
  312. for exclusive processing of any type you wish.
  313.  
  314. You  must, of course, reset the flags to the "off" state when you are  finished
  315. processing,  in order to prevent the newly entered records you  have  completed
  316. being  included in the survivor group, the next time the sort for active  flags
  317. is done.
  318.  
  319. If you combine the formats of flag and code, you can leave a very great  number
  320. of   messages,  meaning anything you wish, in a two byte string  field.    But,
  321. with  the  almost infinite flexibility of a program that  allows  user-designed
  322. flagging processes,  you also inherit the responsibility of keeping track of it
  323. all.  We recommend you start simple.
  324.  
  325. WRAP-UP:
  326.  
  327. The DATAMAGE data management system is a very loose, obliging and  co-operative
  328. piece of software.  It is designed to store many types of FORMATTED data.  You,
  329. the user, may specify the format of your datafiles, and manipulate then in  any
  330. manner pertinent to your own purposes.
  331.  
  332. You  may  initialize  and fill with data as many datafiles  as  you  have  disk
  333. storage to accommodate.  Each of these datafiles can exceed the capacity of any
  334. disk  drive that can be connected to a PC computer.  The system WILL NOT  allow
  335. the recording of individual datafiles on multiple disk drives, but will  access
  336. datafiles recorded on any disk drive connected to your machine.
  337.  
  338.