Thread: embeding postgre
Hi, I have a question, because i cannot find any information in online docs (maybe i'm just blind :P). I'm want to build application with embedded database, but i also need a possibility to have one global database, which can be accessed from internet (ability to synchronize between remote and local/embedded database). I heard from somone that i could use PostgreSQL, but I cannot find any information that confirms or denies it. And one more thing, i'm interested only in free solution ;). Sorry for if i made some mistakes, english is not my native language. I'll be appreciate for any information.
On Fri, 20 Feb 2004, twosk wrote: > Hi, > > I have a question, because i cannot find any information in online docs > (maybe i'm just blind :P). > I'm want to build application with embedded database, but i also need a > possibility to have one global database, which can be accessed from internet > (ability to synchronize between remote and local/embedded database). I heard > from somone that i could use PostgreSQL, but I cannot find any information > that confirms or denies it. And one more thing, i'm interested only in free > solution ;). > Sorry for if i made some mistakes, english is not my native language. > > I'll be appreciate for any information. You should probably consider either firebird if you need a "real" database with locking real transactions and all that, or sqllite if all you need is a nice fast single user database with a sql interface. Postgresql is really not suited to embedded applications. Of course, in 50 years, when embedded applications are running on Star Trek technology, and Postgresql is a quaint old thing, it might make sense, but today, most embedded devices having memory in the hundreds of megabytes designed to have only a few hundred thousand writes to each memory cell, it's just not a good choice.
Centuries ago, Nostradamus foresaw when scott.marlowe@ihs.com ("scott.marlowe") would write: > Postgresql is really not suited to embedded applications. Counterpoint: People tend to think about "embedded" in one of two ways: 1. Applications using PICs and memory devices with _really_ limited lifetimes, where the RIGHT answer is probably something like Sleepycat DB, or perhaps, for persistent data, DJB's "constant database" (cdb). Relational systems Need Not Apply; the implementation language is liable to be one of [8051 assembler|C|Forth], and even SQLite is likely to be way too big. This sort of gentle programmer should order Leo Brodie's book _Thinking Forth_, and see how Forth BLOCKs may be used as a virtual memory 'database.' 2. They have megabytes of memory, lots of room for the GUI fluff that they're doing, and want a database that isn't really 'getting in their way.' In this sort of case, MySQL and SQLite and Firebird propose the answer that you can "link them in" to your application, and thereby have data storage embedded in the application. PostgreSQL is designed in a manner that actively discourages that particular approach; it wants there to be a separate "postmaster" process. But I am unconvinced that this means you _can't_ design the application in a manner where PostgreSQL can hide alongside, and still "stay mostly out of the way." Indeed, the fact that PostgreSQL runs as a separate process seems to me to be an excellent way of "staying out of the way." In contrast, the need, with "embedded in the same process" systems, to have things like event loops and the need to start up the database within your application is anything but "staying out of the way." But we don't really know where the O.P. is biasing in preference, whether there's no memory and no disk, or whether it's just the matter of "veiling" the presence of the DBMS. -- output = ("cbbrowne" "@" "cbbrowne.com") http://cbbrowne.com/info/x.html Life's a duck, and then you sigh.
twosk@interia.pl ("twosk") writes: > I have a question, because i cannot find any information in online docs > (maybe i'm just blind :P). > I'm want to build application with embedded database, but i also need a > possibility to have one global database, which can be accessed from internet > (ability to synchronize between remote and local/embedded database). I heard > from somone that i could use PostgreSQL, but I cannot find any information > that confirms or denies it. And one more thing, i'm interested only in free > solution ;). When people come looking to run PostgreSQL as an 'embedded library,' embedded inside the application process, they generally get rebuffed, as this heads in exactly the opposite direction to the design of PostgreSQL. It _is_ possible to run PostgreSQL in a "somewhat embedded" mode, where you embed _control_ over that database fairly deeply into your application. It runs as a separate process, which would mean you would retain various capabilities for "network" access. But few have gotten really interested in that; we usually have other "fish to fry." You would presumably need to explain in more detail what you intend, although there is a concommittant danger that you may specify your own implementation assumptions as requirements, and prevent there from being answers. Be prepared to say "Here's what I anticipate," and risk being contradicted :-). -- select 'cbbrowne' || '@' || 'acm.org'; http://cbbrowne.com/info/spiritual.html State opinions in the syntax of fact: "...as well as the bug in LMFS where you have to expunge directories to get rid of files....." -- from the Symbolics Guidelines for Sending Mail
Dear twosk >I heard from somone that i could use PostgreSQL, but I cannot find any information >that confirms or denies it. > AFAIK There was a discussion on the same topic in Dec2003 please search the list and you will geta solution -- Best Regards, Vishal Kashyap Director / Lead Developer, Sai Hertz And Control Systems Pvt Ltd, http://saihertz.rediffblogs.com Jabber IM: vishalkashyap@jabber.org ICQ : 264360076 ----------------------------------------------- You yourself, as much as anybody in the entire universe, deserve your love and affection. - Buddha --------------- I am usually called as Vishal Kashyap and my Girlfriend calls me Vishal CASH UP. Because everyone loves me as Vishal Kashyap and my Girlfriend loves me as CASH. ___ //\\\ ( 0_0 ) ----------------o0o-----o0o---------------------