next | previous | forward | backward | up | top | index | toc | home
ICMS2006 > databases

databases

i1 : ZZ[x,y]

o1 = ZZ [x, y]

o1 : PolynomialRing
i2 : (x+y)^6

      6     5       4 2      3 3      2 4       5    6
o2 = x  + 6x y + 15x y  + 20x y  + 15x y  + 6x*y  + y

o2 : ZZ [x, y]
i3 : t = temporaryFileName() | ".db"

o3 = /tmp/M2-12722-1.db
i4 : d = openDatabaseOut t

o4 = /tmp/M2-12722-1.db

o4 : Database
i5 : d#"foo" = toString (x+y)^6

o5 = x^6+6*x^5*y+15*x^4*y^2+20*x^3*y^3+15*x^2*y^4+6*x*y^5+y^6
i6 : close d

o6 = 0
i7 : fileExists t

o7 = true
i8 : e = openDatabase t

o8 = /tmp/M2-12722-1.db

o8 : Database
i9 : e#"foo"

o9 = x^6+6*x^5*y+15*x^4*y^2+20*x^3*y^3+15*x^2*y^4+6*x*y^5+y^6
i10 : value oo

       6     5       4 2      3 3      2 4       5    6
o10 = x  + 6x y + 15x y  + 20x y  + 15x y  + 6x*y  + y

o10 : ZZ [x, y]
i11 : removeFile t