Ask Your Question

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

asked 2013-05-25 04:36:30 -0500

updated 2013-05-25 05:12:19 -0500

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 06:27:38 -0500

updated 2013-05-25 06:30:32 -0500

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

answered 2013-05-25 06:15:30 -0500

kcrisman gravatar image

updated 2013-05-25 06:16:06 -0500

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-30 23:13:24 -0500 )edit

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 04:36:30 -0500

Seen: 71 times

Last updated: May 25 '13