[Back to the c-list]  [Back to the c MAIN page]  [Back to the BASICS-technology PAGE] 

pns: c source code: DB.C

- a low-impact DBMS (Data Base Management System) Source code files (as raw text) - (no code ... yet) On this page: {Intro} {} {} {} {} {} {} {} {References} {Links}

db.c

The purpose of db.c is to provide a low-impact (fast, not a lot of overhead) DBMS (Data Base Mangement System) for small (eg, micro-controllers) or stand-alone apps. Tentatively..... We start with a .dsc (descriptor) file describes record types # this-file: mailist.dsc # (just an example) RECORD personal_info.desc # Key is optional "#" denotes a comment # we expect data files like math01.dbd ! a DATA file .dbd (see below) str name str addr1 str addr2 str city from us_city.dat ! external DATA file str state ! determines RANGE of values str zip END record NOTE we explicitly write personal_info.DESC - to indicate the descriptor. Try NOT to have files named xyz.dsc and then either inside it or somewhere else a RECORD DESCRIPTOR called xyz.desc (the same thing) A "db" data file .dbd might look like this: # math01.dbd load mailist.dsc # a command just in case format personal_info.desc data csv ";" - comma separated values use ";" for field separator Jones, Jughead ; 123 Merrydale Lane ; ; Riverdale ; IN ; 47408-1521 ^ note null (empty) string value for "addr2" ...etc. end data

Refs


Links