[Kde-pim] Akonadi and PostgreSQL

Brian DeRocher brian at derocher.org
Sat Mar 13 12:44:56 GMT 2010


On Fri, 2010-03-12 at 12:18 +0100, Tobias Koenig wrote: 

> On Thu, Mar 11, 2010 at 11:58:02PM -0500, Brian DeRocher wrote:
> > (5) It would be nice to give akondi a schema in an existing database.
> > This way i could join with other schemas like krecipe and amarok and
> > make that useful... somehow.
> Hmm? What do you mean with schema here?


Unlike MySQL and like Oracle, PostgreSQL uses a namespace around a
collection of tables.  While in mysql you can connect to db1 and select
* from db2.table2, in postgresql you can not.   In postgres you connect
to one database and you can select * from schema1.table1 and
schema2.table2.  Thus you can can join across databases in mysql and
join across schemas in postgresl.

Here's a link with more information.

http://en.wikipedia.org/wiki/Comparison_of_relational_database_management_systems#Databases_vs_Schemas_.28terminology.29

Typically a PG dba will create one database and create several to
hundreds of schemas in it.  There's no need for table prefixes.  Each
schema has an owner and an ACL.  After connecting to a PG database you
typically set your search path to a list of schemas, similar to PATH.
Select * from foo, will scan your search_path until it finds a foo table
that you may access.

So in other words, when you create an independent PG database, you are
isolating this information from any other database.  I understand
there's no benefit to Akondi to see krecipe and amarok data.  While i
can't give a concrete example to some integration, i'm sure there's room
for innovation here.

Brian

--
http://brian.derocher.org


_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list