Re: Database Access
Re: Database Access
- Subject: Re: Database Access
- From: Bob Savage <email@hidden>
- Date: Mon, 28 Jan 2002 01:03:07 -0600
on 1/27/02 11:27 PM, Carla Lewis wrote:
>
I've looked at mySQL, but I have no freakin' idea of how to actually
>
connect to a database using Cocoa. It's not like there's a book on it,
>
or even info in user groups like this.
You might also want to look at PostGreSQL. Here are some links:
- <
http://www.postgresql.org/> There is an insane amount of information to
look at here! Definitely worth a peruse.
- <
http://www3.us.postgresql.org/users-lounge/docs/7.1/programmer/> this is
specifically the link to one of the US mirrors, but you can find this in
your local mirror. This shows how to use several languages to connect to a
PostGreSQL database. For Cocoa you could use the C or C++ bindings to libpq
(there is also a simplified C interface called 'libpgeasy'), there are ODBC
and JDBC drivers, as well as interfaces for Perl, and Python which you could
call out from your cocoa app, if, for some reason that was best for your
situation.
- <
http://www.ca.postgresql.org/docs/momjian/writing_apps/> This will give
you an idea of what writing to the C library is like.
- <
http://www.onlamp.com/pub/a/onlamp/2002/01/24/postgresql.html> A recent
article on using PP to connect to PostGreSQL.
- <
http://www.oreilly.com/catalog/ppostgresql/>
- <
http://www.commandprompt.com/ppbook/> the second of these is the online
version of the first -- the latest book to come out on PostGreSQL (about
three weeks ago?). It includes a chapter on LXP which is an Apache module. I
don't have any experience with it but it looks cool:
<lxp>
<include sql="SELECT datname, datdba AS user_id FROM pg_database">
<if this.user_id="$userid">
<strong><field /></strong><br />
<setvar owned_databases="$owned_databases @this.datname" />
</if>
<else>
<field /><br />
</else>
</include>
</lxp>
>
The only other thing I've seen that looks intriguing is WebObjects, but
>
I get the impression it IS the connectivity solution, but it's not a
>
database engine itself.
That's about right.
Bob