PDB (Palm OS)
   HOME

TheInfoList



OR:

PDB is a container format for record
database In computing, a database is an organized collection of data stored and accessed electronically. Small databases can be stored on a file system, while large databases are hosted on computer clusters or cloud storage. The design of databases sp ...
s in
Palm OS Palm OS (also known as Garnet OS) was a mobile operating system initially developed by Palm, Inc., for personal digital assistants (PDAs) in 1996. Palm OS was designed for ease of use with a touchscreen-based graphical user interface. It is provi ...
,
Garnet OS Palm OS (also known as Garnet OS) was a mobile operating system initially developed by Palm, Inc., for personal digital assistants (PDAs) in 1996. Palm OS was designed for ease of use with a touchscreen-based graphical user interface. It is provi ...
and
Access Linux Platform The Access Linux Platform (ALP) is a discontinued open-source software based operating system, once referred to as a "next-generation version of the Palm OS," for mobile devices developed and marketed by Access Co., of Tokyo, Japan. The platform ...
. Its structure is similar to
PRC China, officially the People's Republic of China (PRC), is a country in East Asia. It is the world's most populous country, with a population exceeding 1.4 billion, slightly ahead of India. China spans the equivalent of five time zones and ...
resource databases.N. Rhodes, J. McKeehan. Palm OS Programming, Second Edition, O'Reilly, 2001, The PalmDOC
eBook An ebook (short for electronic book), also known as an e-book or eBook, is a book publication made available in digital form, consisting of text, images, or both, readable on the flat-panel display of computers or other electronic devices. Alt ...
format is a special version of the PDB format.MobileRead Wiki
Specification of the PalmDOC format
/ref>


Structure of PDB file

A PDB file contains a PDB header, PDB record headers and
records A record, recording or records may refer to: An item or collection of data Computing * Record (computer science), a data structure ** Record, or row (database), a set of fields in a database related to one entity ** Boot sector or boot record, ...
.Paul J. Lucas (1998
PDB (Pilot Database) file format.
Accessed on 20090308
Microfirst Software

Accessed on 20090308


PDB Header

The PDB header is located at the beginning of the file and contains meta-information on the file:


PDB Record Header

For every record, there is an eight byte record header, containing:


PDB Records

Now the records themselves follow. The usual order is AppInfoArea, SortInfoArea and records, sequentially.


PDB Datetimes

Many PDB format files used times counting in seconds from 1904-01-01T00:00:00. This is the base time used by the original Macintosh (up to Mac OS 9). It may be noted that there were close links between Palm OS and Mac OS during early development. Using an unsigned 32-bit integer and the 1904 epoch, integer overflow will overflow will occur sometime in 2040. Others may be observed to be counting from 1970-01-01T00:00:00 (the Unix epoch base time), and uses a signed 32-bit integer which will overflow sometime in 2038.
Palm OS Protein C/C++ Compiler Language & Library Reference, Copyright 2004 Palm Source
calls the dates calculated from 1904 "old Palm epoch", and the dates calculated from 1970 "UNIX epoch". Protein C also provides functions (palm_seconds_to_time_t(), and time_t_to_palm_seconds() ) for converting between the two.
Some sources
even suggest some very old files may use times counting from 1900 (which would be consistent with the Excel epoch). This conflict between old Palm (Mac OS 9) epoch and UNIX epoch is unfortunate, the following heuristic may be useful when examining a file copied from a Palm OS device: * If the time has the top bit set, it's an unsigned 32-bit number counting from 1st Jan 1904 * If the time has the top bit clear, it's a signed 32-bit number counting from 1st Jan 1970. This is based on the idea that, otherwise the time would be before 1972 or before 1970 (depending on the interpretation) and the PDB format wasn't around then. Th
palmdump
utility and other software uses this rule-of-thumb when reading files.


See also

* PRC format


References

{{reflist Computer file formats Palm OS