7

I need a SMALL/LIGHTWEIGHT DB control (maybe delivered as a single PAS file) that I can integrate directly into my application. I need to store relatively small amounts of data in a small number of tables and I want to access some columns fast. I know that Delphi 7 has that nice BDE but I don't want to trouble the user with the installation process.

I use Delphi 7.


EDIT:
I think I asked the wrong question. So, here is what I actually need:
How to store dynamic data (unknown number of fields) to a file?

2
  • See the question: stackoverflow.com/questions/222699/… Commented Feb 7, 2011 at 6:57
  • Hey! I'd narrow the question a bit with 1) as said, you need a storage engine only 2) since you want it statically linked, license matters 3) OK to multiple files or not. Personally i'd go either TClientDataSet or ADO/Jet Commented Feb 7, 2011 at 10:47

10 Answers 10

9

NexusDB offers a free embedded version. Here is an Example

Sign up to request clarification or add additional context in comments.

2 Comments

In what way do you consider it overkill? It fully compiles into your application without any external dependencies (and it's modular, if you e.g. don't need to use SQL, you don't need to compile SQL support into your application) and provides similar functionality to the BDE which you said in your original post you would use if it wasn't for the need to install it.
@Engler. See PhilW's post. For the moment I am looking at TDBF. It is much smaller. It adds almost nothing to app size and especially to compilation time!!!
8

If you're committed to not include any more dependencies with your application, take a look at TClientDataSet.

I'd recommend some sort of "embedded" database. Example: In order to use Firebird as an embedded database, at a minimum, you only need to ship one DLL. You can put that DLL in your installer so the user doesn't need to install anything.

2 Comments

Sqlite is another option (1 DLL too).
while I like the Nexus DB alternative, TClientDataSet is the best way to go in my opinion, not to mention that it's shipped with Delphi for so many versions.
7

As an alternative, how about the freeware TDbf database? It compiles directly into your application and is reliable for lightweight uses.

Also, if you are old enough to remember the days when DBase was the standard desktop database platform, then you probably know how to use it already. :-)

It's at http://tdbf.sourceforge.net

(If there doesn't seem to be a lot of recent activity then it is because it's been around for 10 years and is very stable).

Just a thought.

5 Comments

Thanks. I really like TDBF. I just installed it. I will experiment with it. I have to see if it supports binary fields.
re: no activity - thats because dBase (and all its forks) format is obsolete.
Hi Worm. I have seen that. Sadly. The worst part is that the documentation is nonexistent. stackoverflow.com/questions/4920159/…
@Altar, at least being old means being very well-known too :-)
Test TDBF is very stable. But you could have problems if you want later to upgrade your application to an Unicode version of Delphi (who knows the future of your success?).
7

You could try SQLite. Its an excellent embedded database. Fast, reliable, and you cant beat the price (open source, public domain). There's a number of Delphi wrappers, or you can use the library directly if you want a light weight solution.

Comments

4

Two Open Source solutions (working from Delphi 6 up to XE):

  1. One ORM oriented solution, which can store data using SQLite or a pure Delphi storage. It can be either as stand-alone, either as Client/Server.

  2. One very fast pure Delphi NoSQL table storage engine. Sample benchmark was able to store 1,000,000 records with one integer and one text field in 800 ms (with automatic index creation). You create your own table columns, then access the fields content via Late-Binding.

Comments

3

If have some budget to spend, give AnyDAC a try. It provides native and embedded SQLite access, so you don't even have to ship an external DLL.

3 Comments

UniDac is so much better devart.com/unidac but that's my personal opinion...
Really? I would love to hear more about it. I'm using AnyDAC and I'm pleased with it, but I don't know much about UniDAC.
Huh ? I have backward experience with UniDac. Compare AnyDAC and UniDac SQLite drivers - AnyDAC is unbeatable. Static linking, encryption, their service components, documentation.
1

TurboPower FlashFiler

4 Comments

That code hasn't been actively maintained since it was released in 2003.
@Thorsen: I know, But I guess it will do for Delphi 7?
Well, there were a number of bugs in the last released version of FlashFiler and as far as I'm aware there has been no work done on FF at all since it was open sourced. Also there are a number of fundamental design issues with it. That's one of the reasons why I developed NexusDB from scratch as spiritual successor to FlashFiler. I'm probably not really objective about it ;) but IMO, given the requirements of the questioner, the free embedded version of NexusDB would be a much better option than FlashFiler.
@Thorsten (with both t's this time...:), I'm not familiar with NexusDB, but I know that you have done a great job on this project. Kudos! I don't doubt at all that NexusDB is better than FF, I just wanted OP to be aware of the project.
1

I have tried (arranged by lightweight):

  • NexusDB - commercial, too big for what I need; adds quite some overhead
  • DISQLite - seems powerful; difficult to use
  • kbmMemTable - commercial, UNDOCUMENTED FOR TRIAL USERS (it cannot be trialed unless you purchase the documentation, first which befits the purpose of the TRIAL concept)
  • TDBF - free but not maintained anymore; also it totally lacks of documentation
  • Synopse BigTable - seems to be the solution that I need. It consists in 2 PAS files only.

In some situations a custom system may fit better that a general one. So, for what I need, I will tailor my own system. Because I know the size/type of the data I can make fields that perfectly fit my data. The DB size will be smaller this way and faster (plus it is free). :)

Solution: How to store dynamic data (unknown number of fields) to a file?

Comments

0
  1. JvCSVDataSet and JvCSVBase from JVCL
  2. kbmMemTable
  3. Embedded Firebird server
  4. jbDBF

1 Comment

kbmMemTable really sucks. It cannot be trialed because the help file of this commercial component is not available unless you pay for it (separately). So, no manual = no chance to trial it.
-2

While the manual is paid for, the actual component is available for free, including a pretty extensive demo application showing lots of the features. In addition there are lots and lots of information on the internet about how to use it. Use www.codenewsfast.com or google.com to search for it.

best regards Kim Madsen [email protected]

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.