pycs-devel archive weblog

A blog for archiving the pycs-devel mailing list

2004-7-7

Phillip Pearson: Re: [Pyds-dev] Re: [PyCS-devel] Re: Maybe problems with Metakit 2.4.9.3

Note that I'm talking about PyCS here, not PyDS -- I don't know if it
would make sense to port PyDS to a server-based DB. SQLite might make
sense. This is Georg's domain anyway ;)

If I do change PyCS, of course I'll use the DB API, so porting between
SQL DBs should be possible. Every DB has its own interpretation of
the SQL standard though, so it might not always be _easy_.

Cheers,
Phil


On Wed, Jul 07, 2004 at 10:46:13AM +1000, Garth T Kidd wrote:
> If you're porting databases for PyDS, I'd love to see `DB-API2`_ used so we
> can put PyDS on any [relational] database we need to. If you want a more
> Pythonic abstraction to work with, SQLObject_ is nice. I must admit, I've
> never been that crash hot on Metakit. :|
>
> .. _DB-API2: http://www.python.org/peps/pep-0249.html
> .. _SQLObject: http://www.sqlobject.org/

Comment on this post [ so far]

Garth T Kidd: [PyCS-devel] RE: [Pyds-dev] sqlite vs postgres / mysql / metakit

You could use a data dictionary approach, where everything ends up in four
tables: two dictionary tables, and two content tables. The schema tables are
tablename and tablename/attributename/attributespec, and the data tables are
table/id and table/id/attribute/value. To add or remove logical tables or
columns, just alter the schema tables and add or remove items appropriately
from the data tables. It's still possible to write fast SQL for updates,
too.

-----Original Message-----
From: pyds-dev-admin@muenster.westfalen.de
[mailto:pyds-dev-admin@muenster.westfalen.de] On Behalf Of Phillip Pearson
Sent: Wednesday, 7 July 2004 11:08 AM
To: Jeremy Bowers
Cc: Yasushi Iwata; pyds-dev@muenster.westfalen.de;
pycs-devel@lists.sourceforge.net
Subject: [Pyds-dev] sqlite vs postgres / mysql / metakit

Hmm - just noticed that SQLite doesn't do ALTER TABLE. That's
unfortunate... it's not that big a deal, but it makes development
annoying...

Cheers,
Phil

Comment on this post [ so far]

Garth T Kidd: RE: [Pyds-dev] Re: [PyCS-devel] Re: Maybe problems with Metakit 2.4.9.3

If you're porting databases for PyDS, I'd love to see `DB-API2`_ used so we
can put PyDS on any [relational] database we need to. If you want a more
Pythonic abstraction to work with, SQLObject_ is nice. I must admit, I've
never been that crash hot on Metakit. :|

.. _DB-API2: http://www.python.org/peps/pep-0249.html
.. _SQLObject: http://www.sqlobject.org/

-----Original Message-----
From: pyds-dev-admin@muenster.westfalen.de
[mailto:pyds-dev-admin@muenster.westfalen.de] On Behalf Of Phillip Pearson
Sent: Wednesday, 7 July 2004 9:01 AM
To: Yasushi Iwata
Cc: pyds-dev@muenster.westfalen.de; pycs-devel@lists.sourceforge.net
Subject: Re: [Pyds-dev] Re: [PyCS-devel] Re: Maybe problems with Metakit
2.4.9.3

Argh - that would explain some of the trouble I've been having recently with
comments in PyCS. I have implemented some pycsadm functions to allow
renumbering of comments, but they seem to randomly shift other comments
around in the process - pretty scary. This is in MK 2.4.9.2, btw.

I'm seriously considering moving PyCS over to MySQL or Postgres (probably
the latter, b/c the license fits better). Georg - would you mind if I did
something like that?

Cheers,
Phil

On Thu, Apr 22, 2004 at 04:48:08PM +0900, Yasushi Iwata wrote:
> Hi,
>
> On Thu, 22 Apr 2004 08:31:18 +0200 you wrote:
>
> > Did you try his suggestion? I think I had problems with something
> > like this before - I used None or [] or something like this for an
> > empty subview and Metakit didn't like that. So it might be something
> > that depends on your Metakit version installed. It would be great if
> > you could do some tests here.
>
> Yes, I tried using [] to create an empty subview. It worked without
> causing segmentation fault.
>
> But about an hour ago, I found that the problem still exists.
>
> http://www.equi4.com/pipermail/metakit/2004-April/001805.html
>
> _______________________________________________
> Pyds-dev mailing list
> Pyds-dev@muenster.westfalen.de
> http://www.westfalen.de/cgi-bin/mailman/listinfo/pyds-dev

Comment on this post [ so far]

Phillip Pearson: [PyCS-devel] sqlite vs postgres / mysql / metakit

Hmm - just noticed that SQLite doesn't do ALTER TABLE. That's
unfortunate... it's not that big a deal, but it makes development
annoying...

Cheers,
Phil

Comment on this post [ so far]

Phillip Pearson: Re: [Pyds-dev] Re: [PyCS-devel] Re: Maybe problems with Metakit 2.4.9.3

> You might consider SQLite. I've never used it so I can't recommend it
> per se, but it is closer to Metakit in that you can open files yourself
> for databases, rather than having to use the system DB.
>
> (I would imagine PyCS would still want MySQL or Postgres, truthfully,
> but it is worth a look. PyDS might be a better fit with SQLite. I *like*
> being able to backup my PyDS just by shutting it down and copying some
> files. I think SQLite should retain that, it isn't so easy for MySQL.)

Good idea. Do you know what SQLite's memory consumption is like? I'm
not happy with the amount of memory my PyCS processes are using up at
the moment on my server, and suspect that MK has a lot to do with it.

Here are my reasons for switching:

- MK uses too much memory.

- MK is single user; I can't play with the DB without shutting down
PyCS. [it looks like SQLite might let me do this too].

- I don't trust MK not to lose data.

- The MK file is hard to inspect - I have to either download it onto
another machine or write code to access it.

If I can get rid of these problems using SQLite, then it would
probably be a better choice than MySQL or Postgres as you still
wouldn't need to install a separate DB to get PyCS running.

Cheers,
Phil

Comment on this post [ so far]

Jeremy Bowers: Re: [Pyds-dev] Re: [PyCS-devel] Re: Maybe problems with Metakit 2.4.9.3

Phillip Pearson wrote:
> Argh - that would explain some of the trouble I've been having
> recently with comments in PyCS. I have implemented some pycsadm
> functions to allow renumbering of comments, but they seem to randomly
> shift other comments around in the process - pretty scary. This is in
> MK 2.4.9.2, btw.
>
> I'm seriously considering moving PyCS over to MySQL or Postgres
> (probably the latter, b/c the license fits better). Georg -
> would you mind if I did something like that?

You might consider SQLite. I've never used it so I can't recommend it
per se, but it is closer to Metakit in that you can open files yourself
for databases, rather than having to use the system DB.

(I would imagine PyCS would still want MySQL or Postgres, truthfully,
but it is worth a look. PyDS might be a better fit with SQLite. I *like*
being able to backup my PyDS just by shutting it down and copying some
files. I think SQLite should retain that, it isn't so easy for MySQL.)

Comment on this post [ so far]

Phillip Pearson: Re: [Pyds-dev] Re: [PyCS-devel] Re: Maybe problems with Metakit 2.4.9.3

Argh - that would explain some of the trouble I've been having
recently with comments in PyCS. I have implemented some pycsadm
functions to allow renumbering of comments, but they seem to randomly
shift other comments around in the process - pretty scary. This is in
MK 2.4.9.2, btw.

I'm seriously considering moving PyCS over to MySQL or Postgres
(probably the latter, b/c the license fits better). Georg -
would you mind if I did something like that?

Cheers,
Phil

On Thu, Apr 22, 2004 at 04:48:08PM +0900, Yasushi Iwata wrote:
> Hi,
>
> On Thu, 22 Apr 2004 08:31:18 +0200 you wrote:
>
> > Did you try his suggestion? I think I had problems with something like
> > this before - I used None or [] or something like this for an empty
> > subview and Metakit didn't like that. So it might be something that
> > depends on your Metakit version installed. It would be great if you
> > could do some tests here.
>
> Yes, I tried using [] to create an empty subview. It worked without
> causing segmentation fault.
>
> But about an hour ago, I found that the problem still exists.
>
> http://www.equi4.com/pipermail/metakit/2004-April/001805.html
>
> _______________________________________________
> Pyds-dev mailing list
> Pyds-dev@muenster.westfalen.de
> http://www.westfalen.de/cgi-bin/mailman/listinfo/pyds-dev

Comment on this post [ so far]