* [gentoo-embedded] help in choosing DB engine for embedded application
@ 2010-03-30 13:24 Mirage ha
2010-03-30 14:17 ` Peter Stuge
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Mirage ha @ 2010-03-30 13:24 UTC (permalink / raw
To: gentoo-embedded
[-- Attachment #1: Type: text/plain, Size: 654 bytes --]
Dear All,
I do not know if this is the correct place to post this question or not but
as you have experience in embedded field i expected
you will help me.
I facing a problem in choosing database engine for my application my
manager suggested to use files (e.g. txt files ) , i suggested to use
berkeley db.
So could you tell me which is better and if there is better solution (
better db engine) please tell me.
also if there is link to good database benchmark comparison please send it.
Thank you,
M.
--
Never Think Hard About Past,It brings"Tears" Don't think more about future,
It brings"Fears" Live this moment with a Smile, It brings"Cheers".
[-- Attachment #2: Type: text/html, Size: 791 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-embedded] help in choosing DB engine for embedded application
2010-03-30 13:24 [gentoo-embedded] help in choosing DB engine for embedded application Mirage ha
@ 2010-03-30 14:17 ` Peter Stuge
2010-03-30 14:30 ` Ed W
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Peter Stuge @ 2010-03-30 14:17 UTC (permalink / raw
To: gentoo-embedded
Hi Mirage,
Mirage ha wrote:
> I do not know if this is the correct place to post this question or
> not but as you have experience in embedded field i expected you
> will help me.
Although the question is not very specific to Gentoo I do agree with
you that it can be relevant in this group.
> I facing a problem in choosing database engine for my application
> my manager suggested to use files (e.g. txt files ) , i suggested
> to use berkeley db.
> So could you tell me which is better and if there is better solution
> (better db engine) please tell me.
Unfortunately there is no simple answer to this question. The best
solution depends on many things that probably only you or your
department knows; data structure, data access patterns (reads/writes
1:1, 10:1, 100:1 ?), number of updates per time period, size of
updates, and so on, and so on.
Choosing the best database solution is always a difficult task.
> also if there is link to good database benchmark comparison please
> send it.
For the reasons I mention above it is also very difficult to create
good database benchmarks. Some databases already include a
benchmarking suite, but that will be tuned to the particular workload
that the particular database handles the very best. It's marketing
basically.
Besides performance there can also be factors such as time to
market/previous developer experience to consider - if the system does
not have a critical performance requirement then it may be better to
choose a database which allows the most rapid delivery of the
product.
And there are even further dimensions to the database question - it
is a very difficult one to answer.
If you can describe some of the things I mentioned above, in
particular the properties of your data, and the access patterns, then
it may be possible for people to offer suggestions - but knowing more
about the application may also only lead to more questions needed to
find the best answer.
//Peter
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-embedded] help in choosing DB engine for embedded application
2010-03-30 13:24 [gentoo-embedded] help in choosing DB engine for embedded application Mirage ha
2010-03-30 14:17 ` Peter Stuge
@ 2010-03-30 14:30 ` Ed W
2010-03-30 14:31 ` Arkadi Shishlov
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Ed W @ 2010-03-30 14:30 UTC (permalink / raw
To: gentoo-embedded
On 30/03/2010 14:24, Mirage ha wrote:
>
> Dear All,
>
> I do not know if this is the correct place to post this question or
> not but as you have experience in embedded field i expected
> you will help me.
>
> I facing a problem in choosing database engine for my application my
> manager suggested to use files (e.g. txt files ) , i suggested to use
> berkeley db.
> So could you tell me which is better and if there is better solution (
> better db engine) please tell me.
> also if there is link to good database benchmark comparison please
> send it.
Always depends on your requirements for speed, convenience, features,
crash recovery, insert/delete patterns, etc...
Ed W
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-embedded] help in choosing DB engine for embedded application
2010-03-30 13:24 [gentoo-embedded] help in choosing DB engine for embedded application Mirage ha
2010-03-30 14:17 ` Peter Stuge
2010-03-30 14:30 ` Ed W
@ 2010-03-30 14:31 ` Arkadi Shishlov
2010-03-30 15:01 ` Karl Hiramoto
2010-03-31 8:55 ` [gentoo-embedded] " Mirage ha
4 siblings, 0 replies; 6+ messages in thread
From: Arkadi Shishlov @ 2010-03-30 14:31 UTC (permalink / raw
To: gentoo-embedded
On 03/30/10 16:24, Mirage ha wrote:
> I facing a problem in choosing database engine for my application my
> manager suggested to use files (e.g. txt files ) , i suggested to use
> berkeley db.
> So could you tell me which is better and if there is better solution (
> better db engine) please tell me.
SQLite is pretty popular currently.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-embedded] help in choosing DB engine for embedded application
2010-03-30 13:24 [gentoo-embedded] help in choosing DB engine for embedded application Mirage ha
` (2 preceding siblings ...)
2010-03-30 14:31 ` Arkadi Shishlov
@ 2010-03-30 15:01 ` Karl Hiramoto
2010-03-31 8:55 ` [gentoo-embedded] " Mirage ha
4 siblings, 0 replies; 6+ messages in thread
From: Karl Hiramoto @ 2010-03-30 15:01 UTC (permalink / raw
To: gentoo-embedded
On 03/30/2010 03:24 PM, Mirage ha wrote:
>
> Dear All,
>
> I do not know if this is the correct place to post this question or
> not but as you have experience in embedded field i expected
> you will help me.
>
> I facing a problem in choosing database engine for my application my
> manager suggested to use files (e.g. txt files ) , i suggested to use
> berkeley db.
> So could you tell me which is better and if there is better solution (
> better db engine) please tell me.
> also if there is link to good database benchmark comparison please
> send it.
>
> Thank you,
> M.
Depending on the application, I might side with your manager, raw txt or
binary files can be better in many situations.
Depends a lot on the workload, explain the application in general.
What is the most frequent operation a write, read( or search), or
delete? Raw files, txt or binary write() it is very fast. Reading the
file or seraching for something inside a large file can be slow without
indexes, or the ability to binary search. If the data in the file is
already sorted, for example by an incremeting ID, or time, binary
search inside the file can be very fast. Appending data to the end of a
file can be a O(1) operation. A DB engine after the write or delete,
may have to update it's internal indexes, and rebalance its B-Tree, or
update any other internal structures.
How much data? How much I/O?
Is program size important? writing to a file is much smaller program
footprint than a DB engine.
Optimizing for write or erase speed raw files will be faster.
Optimizing for a fast search of data a DB engine will be faster unless
you binary search your data in the files, or index it yourself. If
your going through the trouble of using your own complex indexes, then
you might as well use a DB engine to avoid re-inventing the wheel.
--
Karl
^ permalink raw reply [flat|nested] 6+ messages in thread
* [gentoo-embedded] Re: help in choosing DB engine for embedded application
2010-03-30 13:24 [gentoo-embedded] help in choosing DB engine for embedded application Mirage ha
` (3 preceding siblings ...)
2010-03-30 15:01 ` Karl Hiramoto
@ 2010-03-31 8:55 ` Mirage ha
4 siblings, 0 replies; 6+ messages in thread
From: Mirage ha @ 2010-03-31 8:55 UTC (permalink / raw
To: gentoo-embedded
[-- Attachment #1: Type: text/plain, Size: 457 bytes --]
Thanks Peter, Karl,Arkadi,Ed for your detailed replies,
Actually the application doesn't need complex database operations and the
most frequent operations are write and read (no complex search is needed or
it is very limited).
It seems i will use binary files :)
Thanks again for your fast replay.
Mirage
--
Never Think Hard About Past,It brings"Tears" Don't think more about future,
It brings"Fears" Live this moment with a Smile, It brings"Cheers".
[-- Attachment #2: Type: text/html, Size: 575 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-03-31 9:07 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-30 13:24 [gentoo-embedded] help in choosing DB engine for embedded application Mirage ha
2010-03-30 14:17 ` Peter Stuge
2010-03-30 14:30 ` Ed W
2010-03-30 14:31 ` Arkadi Shishlov
2010-03-30 15:01 ` Karl Hiramoto
2010-03-31 8:55 ` [gentoo-embedded] " Mirage ha
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox