Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 15B1E9F9F0E for ; Thu, 9 Nov 2006 17:47:16 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 15264-10 for ; Thu, 9 Nov 2006 17:47:13 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.238]) by postgresql.org (Postfix) with ESMTP id 42E2E9F9D99 for ; Thu, 9 Nov 2006 17:47:13 -0400 (AST) Received: by wx-out-0506.google.com with SMTP id i28so294687wxd for ; Thu, 09 Nov 2006 13:47:12 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=eMTLZX+c2Z3nGwJXfbaEzv/F5ZYxGITmXKCtOWERSsmlrlE35ikC5f2olEdkmzsDZLV/7uk5Ja9KPZnqXbgkgwHGEd+ZSGMRenSmOHZgBDMNNB6e67uVyep5ymDuxKzpuXmtHFOl8zCrK3P+SHZmPdIqCLOXvWMm1wyE9vApQqU= Received: by 10.70.109.4 with SMTP id h4mr1541958wxc.1163108832300; Thu, 09 Nov 2006 13:47:12 -0800 (PST) Received: by 10.70.90.11 with HTTP; Thu, 9 Nov 2006 13:47:12 -0800 (PST) Message-ID: <9e0a28690611091347ie22a1cds7c4092f870bf50cd@mail.gmail.com> Date: Thu, 9 Nov 2006 17:47:12 -0400 From: "Juan Miguel Paredes" To: pgsql-php@postgresql.org Subject: Re: PgSQL and integration between 2 PHP programs and a Java program In-Reply-To: <7b872b430611091003q10f48coee46572e51c6f6e3@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <7b872b430611090218k55fc4cf3kf1fc83f0dccdebf2@mail.gmail.com> <1d7288990611090702w2b93e727qc2447fc5bef42fe7@mail.gmail.com> <7b872b430611091003q10f48coee46572e51c6f6e3@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/32 X-Sequence-Number: 3649 Hi, folks! On 11/9/06, Servers24 Network wrote: > This was the description of my project. If anyone have a better solution > please let me know. I also have researched about using LDAP as the main DB > server but seems it can only be used as the CAS and not the main DB for > applications as it's main use is as a directory and can not be used in a > high volume of changing data environment. Also very much modification should > be done in each application to be able to talk to LDAP server!! PHP can take advantage of php4-ldap/php5-ldap to communicate with LDAP server with no much trouble... Of course, that depends on your actual class design, but with good OO design it should be quite simple to replace/extend existing classes/methods for LDAP. Same thing could be said for Java. > Also I have another question : do I need to edit MySQL queries very much in > my PHP applications to interact with a PgSQL or not? Because most of the > queries are the same and maybe very few should be changed ( as far as I > know! ). Again, if you're using some ORM or database abstraction layer (PHP-ADODB, for example of the latter), it could be as simple as changing your dsn configuration with maybe a very few noticeable differences in sql-dialects. If you're using just plain old php database apis (e.g. mysql_connect, mysql_query), both mysql and pgsql apis are very similar in php (there's mysql_connect for pg_connect, mysql_query for pg_query and so on)... Just watch out for things like parameter ordering and so on (documentation is your friend), but of course, database abstraction is highly recommended. In any case, LDAP could be a good option for storing authentication and authorization information in a centralized repository (most modern frameworks, languages, technologies can integrate pretty well with LDAP), and keep your application-specific data in whatever repository seems appropiate. Greetings!