More CE database Q&A

Posting some questions I received from my blog.

1. You mentioned the that the maximum size of an object store is 256MB. Which versions of Windows CE does this apply, Windows Mobile 2003, Pocket PC 2002?

It applies to all versions of Windows CE.

2. Do the limitations of database in the object store apply to databases created in the filesystem?

Databases in the object store cannot exceed CEDB_MAXNUMRECORDS (=64K) records.  Database volumes (files containing databases) cannot exceed 16MB and the databases inside those volumes still cannot exceed CEDB_MAXNUMRECORDS records.

3. Is there a maximum size of a database record in an Object Store? If yes what is it?

4. Is there a maximum size for a field in a database record? If yes what is it?

For both the object store and database volume files, one record cannot have more than CEDB_MAXRECORDSIZE bytes (=128KB), and one property value cannot exceed CEDB_MAXPROPDATASIZE bytes (a little short of 64KB).

Be careful of the CEDB terminology difference compared to other database engines: A CEDB "database volume" is a "database" to other engines, and a CEDB "database" is a "table" to other engines.  The database volumes were created to let you store your data in a file instead of in the object store, so you can think of the object store as just a special-case "default" database volume.

If you are running into these size limitations, you are probably far better off with SQL-CE than CEDB.  Or with a new offering (as of CE 5.0), EDB, which is a trimmed-down version of SQL that presents a programming interface very similar to CEDB for easy porting.  CEDB has very poor performance once you go over ~1000 records.


Comments (4)

  1. Sarah says:

    Hi Sue,

    Maybe you can help me with this one… What do you know about the SQL Server CE 3.0 database? (SQL Server 2005 Mobile Edition)

    I am looking to find the answers to a few questions but noone seems to know the answers… please have a look at the following url for the questions if you know anything about this database system:!1p8onyOGBY_N4a9_eT3OsBwA!277.entry

    Many thanks


  2. sloh says:

    Sorry, I don’t know much at all about SQL-CE. Just CEDB. 🙁

  3. Mehaboob says:

    How do we choose between Registry and CEDB? Assuming we want to store some data in the range of 100. what are the guide line. Can you please compare CEDB and registry?

Skip to main content