Differences between revisions 4 and 5
Revision 4 as of 2007-06-16 01:03:03
Size: 938
Editor: DavidJoyner
Comment:
Revision 5 as of 2007-06-16 01:03:28
Size: 945
Editor: DavidJoyner
Comment:
Deletions are marked like this. Additions are marked like this.
Line 21: Line 21:
connection.execute connection.execute("...")

Tom Boothby's sqlite-tutorial

How to create a simple database in sqlite using SAGE.

In SAGE, type

sage: import sqlite3

To create a filename for the database

conn = sqlite3.connect("/full/path/mydata.db")

This is a blank database at the moment. Now create a table with fields labeled/typed as follows:

connection.execute("...")

This creates a sqlite3.cursor object. Now let's enter an entry into this database

E = EllipticCurve("389a")
connection.execute("...")

This is our new entry in the database mydata!

Suppose you entered something wrong and you want to delete an entry. You use the primary key to delete an entry:

To "query" all the elliptic curves of rank 2, type:

sqlite-tutorial (last edited 2008-11-14 13:42:00 by anonymous)