Whether it's possible, I am thinking about having the ability to embed a PostGreSQL database, much like sqllite. I have read it's difficult. I am no database expert though, so I wish to know what you think.

Basically I would like PostGreSQL without all of the configuration and installation. Whether it's possible, let me know how.

You can't embed it, nor in the event you try.

For embedding you need to use sqlite while you pointed out or firebird rdbms.

Rather than literally embedding it, would you do the installation alongside your program and just run it while your program is running?

You cannot embed it as being a in process type factor like sqlite etc, but it is simple to embed it to your application setup using Inno setup at http://www.innosetup.org. Search their subscriber list archive and you'll hire a company did the majority of the meet your needs and all you want to is grab the zipped distro and you will easily have postgresql installed once the user installs your application. After that you can make use of the pg_hba.conf file to limit the server to local host only. Not really a true embedded DB, however it works.

Unless of course you perform a major rewrite of code, it's not possible to operate Postgres "embedded". Either run it as being another process or use another thing. SQLite is a superb choice. But you will find others. MySQL comes with an embedded version. View it at http://mysql.com/oem/. Also several java options, and Mac has Core Data you are able to write too. Hell, you may also use FoxPro. What OS yourself on and what services you require from the database?

PostgreSQL is supposed to run like a stand-alone server it's most likely possible to embed it should you hack in internet marketing hard and lengthy enough, but it might be much simpler to simply run it as being intended inside a separate process.

Are you currently being funny when evaluating a completely featured database engine with sqlite? To be sure sqlite is extremely nice for embedding, however it supports only fundamental SQL functionality. For many complex programs it can't match the needs.

Make an effort to to begin another thread inside your application that will begin a postgresql server in local mode either by binding it to localhost with a few random free port or by utilizing electrical sockets (does home windows support electrical sockets?). That needs to be simple enough, something similar to:

system("C:Program FilesMyApplicationpgsqlpostgres.exe -D C:Documents and SettingsUserLocal SettingsMyApplicationdatabase -h 127...1 -p 12345")

after which just connect with 127...1:12345.

Whenever your application quits, you could send a SIGTERM for your thread after which wait a couple of seconds for postgresql to stop (ie join the thread).

PS: You may also use pg_ctl to manage your "embedded" database, even without threads, just perform a "pg_ctl start" (with appropriate options) when beginning the applying and "pg_ctl stop" when giving up it.

Anybody attempted on Mac OS X:

http://pagesperso-orange.fr/bruno.gaufier/xhtml/push_postgresql.xhtml

http://www.macosxguru.internet/article.php?story=20041119135924825

(Obviously sqlite could be my embedded db of preference too)