Ask Your Question

where is `sage.databases.db.Database-`

asked 2013-05-25 11:36:30 +0200

updated 2013-05-25 12:12:19 +0200

I am trying to port some older Sage code (I think for Sage 5.4 or so). It uses sage.databases.db.Database but that doesn't seem to exist anymore. Where is it?

The file I'm trying to update is

Edit: Can I just use

from sage.databases.all import SQLDatabase as Database


edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-05-25 13:15:30 +0200

kcrisman gravatar image

updated 2013-05-25 13:16:06 +0200

See Trac 10353, where this was indeed removed to allow us to remove ZODB as a dependency. You may be able to use the Conway polynomial database rewrite or Cremona table rewrite to move to SQLite. I'm not sure it would be completely trivial to just use that backend, though of course you can try!

(On a related note (not for the OP), does anyone know whether psage stuff is ever tested as to whether it at least compiles or imports with a given version of Sage? This probably could have easily been avoided.

edit flag offensive delete link more


I tried so far as that I just did that (see my commits [here]( and it imports fine but I'm not sure if it really works. That was not important for me as other stuff from PSage works now (which failed before because of the failing import) with a more recent Sage (5.8 and 5.9).

Albert Zeyer gravatar imageAlbert Zeyer ( 2013-05-31 06:13:24 +0200 )edit

answered 2013-05-25 13:27:38 +0200

vdelecroix gravatar image

updated 2013-05-25 13:30:32 +0200

If I am not mistaken, your database looks more like a list of objects (rather than a list of objects with some of their invariants). The SQL framework is perhaps not the simplest way to achieve it. You may have a look at the Conway database in sage.databases.conway which is simply a dictionnary which is stored on hard drive using python pickling.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-05-25 11:36:30 +0200

Seen: 401 times

Last updated: May 25 '13