ebmDevMag.com home
ebm Developer's Magazine
links

developer's mag
main page

sections
part 1
part 2
part 3
part 4
part 5
part 6
part 7
part 8
part 9


5 - Database

5.01 - How do I use the database functions?
5.02 - It seems complicated - what if my needs are simple?
5.03 - How does it compare to other database APIs?
5.04 - What are the database limits?
5.05 - Can the database hold binary data?



5.01 - How do I use the database functions?
Consult the Database Manager Reference Manager for the functions. An excellent way to learn how they are used is to pour over the source listing for test.cpp, found in the SDK\samples\gui\test directory.

5.02 - It seems complicated - what if my needs are simple?
Depends on what you want to do. It's geared for data in the table format (fields/records), so if you simply need a repository of data, like a sequential file, skip the database API, and use the file mapping functions directly.

5.03 - How does it compare to other database APIs?
If you've worked with database programs like dBase or Paradox, you'll understand the layout. The advantage of the Franklin API over other databases is the packing. In a typical database, all records are the same size, which causes problems if you have a lot of variety in data length (for example, making the field large enough for all conceivable surnames). The Franklin API sets aside only the needed space for each field entry, resulting in huge space savings for large uneven databases.

5.04 - What are the database limits?
Official answers on that: Capacity is about 4 billion records, with potentially a 4 billion char acter record, unlimited record sizes, a field size up to 64K. Obviously, these limits aren't a ceiling we have to worry about with a maximum of 16 meg memory, but it's good to have the flexibility.

5.05 - Can the database hold binary data?
Yes and no. The database should hold any binary data except the null character (0x00). If you use a scheme to guarantee no nulls appear (or are converted somehow), it should work. On the other hand, as someone who has seen the results of hacking a database to put binary data in (and who had the job of maintaining and repairing it), I recommend converting the data into ASCII codes, such as into hex digits.



Previous Section
Next Section

Copyright © 2001-2006 ebmDevMag.com - Legal Notice