I have a few questions regarding databases in Windows Embedded CE 6.0. I
am currently reading chapter 11 in Douglas Boling's "Programming Windows
Embedded CE 6.0 Developer Reference". There are a number of things I am
not too clear about.
Just so you have some idea of my requirements, they are approximately as
follows (I am still researching and playing around with different ideas
and I'm quite new to windows ce programming):
- Speed.
- Multiple processes/threads accessing database.
- Storing only booleans and numbers (shorts up to longs).
- Over 10000 data points for say booleans and numbers.
- Data retention when rebooting.
1. Is it true that if I wish to have multiple processes or threads
interact with the database all at the same time I pretty much need to
use EDB?
2. Is there maybe an alternative option than EDB or CEDB or does
everyone pretty much use one of these two for any project? (Of course
keeping in mind question 1.)
3. As far as I understand both CEDB and EDB can be stored as volumes.
These are files in the filesystem. Each volume can have multiple
databases. It is also possible to use CEDB directly within the object
store.
What benefits does using the object store provide?
When using the object store method, is everything lost when power is lost?
To use the object store do I simply use CREATE_SYSTEMGUID(PCEGUID
pguid); when createing a GUID?
4. I come from an (My)SQL background. Just need to get my terms right:
(C)EDB => (My)SQL
-------------------
Database => Database
Record => Table
Property => Column
or is it...
(C)EDB => (My)SQL
-------------------
Database => Database
Record => Row
Property => Column
... in which case a database in WinCE only has one "table"?
I'm a bit confused here, also because of question 5.
5. I'm having trouble understanding the limitations on each database type.
The book says that "an individual property can't exceed the constant
CEDB_MAXPROPDATASIZE which is set to 8,192 for an embedded database and
65,471 for the CE database." Does that mean whatever the value is inside
a property it must be <= 8,192 bytes for EDB?
The book then says that "A single record can't exceed
CEDB_MAXRECORDSIZE, defined as 8,192 for EDB and 131,072 for CEDB." So
does that mean the size of all property values added together must be <=
8,192 bytes for EDB?
6. If I say use a large cbBufferPool so that the database is cached in
RAM for speed optimisation does that mean data can be lost if power is
suddenly lost? How would one manage this?
7. I intend to make a database available to a number of applications
ranging from os services (such as access through a tcp port or Modbus
protocol over tcp) to managed applications written in .NET.
Would it make sense to design and implement a driver as part of the OS
that other applications can then work with? Something that will then be
part of the SDK?
I'm quite new to all this so I'm not sure what best practice methods are
when something like a database needs to be accessible to any application
at any time. It should also be on two different priority levels. For
example some applications will need to be almost instant at reading or
writing, whereas managed applications can have a lower priority.
I have yet to go deeper into actually using a database, so far I just
need to be clear on my choices and the pros and cons of each type (or
even alternatives).
Thanks heaps!
Oliver
Paul T.
"Oliver Schenk" <oliver...@ii.net> wrote in message
news:u%23%23fIGvH...@TK2MSFTNGP05.phx.gbl...
Thanks for that.
At first I did not realise that you could also talk to an SQL Server CE
database using native code; I thought everything had to be done in .NET
3.5 but then I would have had problems with real-time performance. Those
online books are great thanks for the tip!
Oliver
Paul T.
"Oliver Schenk" <oliver...@ii.net> wrote in message
news:O4o9U13H...@TK2MSFTNGP05.phx.gbl...