DBF format is a very old, database format originally introduced by dBase II, recycled by FoxPro and used as a database component by ESRI shapefiles. In addition to the ubiquitous use of DBF within shapefiles, popular for many years within ESRI products and open source such as QGIS, surprisingly many data sets have been published using DBF format. We suppose the authors found that slightly better than using cuneiform marks on clay tablets.
Most applications use libraries like JET or others to read DBF. Manifold uses a specialized DBF driver written by Manifold, originally developed to automatically handle the many variations of DBF encountered within shapefiles. Manifold, therefore, can read or link DBF files either from 64-bit Manifold or 32-bit Manifold.
Manifold can import from DBF, link read/write to DBF, and export tables to DBF.
Important: When importing a DBF file the tables and queries that appear in the Manifold project are Manifold components with no further connection to the DBF file from which they were imported.
Choose File-Import from the main menu.
In the Import dialog browse to the folder containing the .dbf file.
Double-click the .dbf file desired.
Everything found in that .dbf database will be imported into the project.
Double-clicking on the desired .dbf file in the Import dialog as seen above will import into our project everything found in that .dbf database.
This particular .dbf database contains a single table.
The world table contains the locations for various towns and airports, including their latitude and longitude locations. DBF is an extremely old and limited database format, with a very poor set data types. Manifold will capture whatever there is in the DBF. When importing a DBF, text field values that are all spaces are imported as NULLs.
The Manifold DBF driver automatically adds an mfd_id field and mfd_id_x index to the table's schema, so the resulting tables are fully editable and selectable.
Important: When linking a DBF file the tables and queries that appear in that data source in the Manifold project stay resident in the DBF file. They are DBF components even though they may appear in many respects, for the convenience of the user, to be Manifold components. DBF files linked into a Manifold project are fully read/write.
To link a DBF format file:
Choose File-Link from the main menu.
In the Link dialog browse to the folder containing the .dbf file.
Click the .dbf file desired.
Check or uncheck the Save cache box as desired.
Press Link. A linked data source will appear in the project.
Press the + icon next to the data source to expand the data source to see the tables and queries it contains.
The Save cache button allows setting cache options. Most often when linking to a format like DBF, we will ensure the Save cached box is not checked. Working with a linked DBF database will be faster if we check the box, but if we are going to cache data within the project we may as well simply import the DBF and use full Manifold speed. We uncheck the box and then we press Link.
That creates a data source called world that contains all of the tables and any other contents of the .dbf file's database. We can click on the + icon by the data source cylinder to expand the world hierarchy.
Opening the world table we see it is the same table that was imported earlier in this topic. Since it is linked the table is now resident in the .dbf file.
Import - Because DBF is such a limited format it is not a great idea to leave data in a DBF file unless we are forced to do that, for example, to allow continued interchange with older applications that insist upon using DBF. If all we want to do is to harvest data from a DBF it is a better idea to import data from the DBF and to save that data in a Manifold .map format file.
Export - DBF files cannot store text fields longer than about 250 characters. When Manifold exports a DBF file (including as part of a shapefile ensemble) the system computes the maximum length of each text field, increases that computed length value to the nearest multiple of 8 to accommodate for future edits, and uses that as the DBF field length.
File - Create - New Data Source
DBMS Data Sources - Notes