Repositioning SQL within K-16

Yesterday at Pauling House (a meeting place) I was sketching my vision of how to get more "SQL savvy" out to more people. The visiting CTO seemed unpersuaded, said SQL was archiac and you couldn't model business intelligence in purely transactional systems, but we'd only just met, I don't think he's as focused on K-16 curriculum writing as I am. As I put it in my blog "SQL is old hat, but we still need professionals with the skills and/or overview vis-a-vis this technology." [1] So a lot of you probably know that SQL is about creating tables, storing, updating and retrieving data in those tables, related by intersecting columns. Until not so long ago, my story goes, SQL was a high priest language as it only ran on million dollar mainframes, most mom & pop (small) businesses had no need for such a thing. Not surprisingly, the teaching literature tends to be very business oriented in the sense of talking about parts in inventory, quantity and price. Like economists, they (the business school writers) talk about "widgets" meaning "generic salable catalog item" (this all got started well before software engineers actually implemented GUI widgets for real, actually called something "a widget" and built businesses around them, e.g. buy my closed source OCX calendar object and drag and drop it onto your Visual Basic canvas, for only $29.95, free shipping). The problem is I'm trying to insert more SQL into the grade school mathematics curriculum, right about the time we're doing Venn Diagrams, union and intersection of sets. This "business flavor" of widgets in inventory isn't "mathy" enough, leaves students and teachers thinking they're on some pre-business track, whereas a lot of these youngsters are looking at field work in biology or something. It's premature to assume business, and yet not a bad investment, in terms of time, plus SQL is used in field work, bioinformatics etc. My solution (drum roll) is to switch to Polyhedra for subject matter, rather like parts in inventory (they even stack up, some of 'em), with the main table giving a possibly lengthy greek name, like esoteric species of flora or fauna (more biological). peda.com is an example source of information, Web pages by George Hart and collaborators also good.[2] Where Python fits in is we want our math students to get it about "transformations" between XYZ coordinates in say traditional OFF format, and a VRML or POV-Ray scene description, i.e. the same information, pulled via SQL, but then couched in an XML (x3D = new VRML) or ray tracing script (also recently million dollar software that ran only on mainframes but now accessible to any kid with a desktop or laptop). In addition to whatever server side transformations (implemented in Python), we want to diagram / explain / show how a SQL engine backs a website with pages assembled on the fly in response to an incoming URL. We don't store the HTML, we suck out the relevant data and build a page, with a picture and everything, or we list results of queries, SELECT statements, entered at the front end. A simple web framework, WSGI scripts or whatever, everything open source, transparent, will give kids a clue as to how their world works, including all that parts and inventory stuff (like when ordering a new video card from TigerDirect or whatever). They build it themselves, with help from teachers, pass the work down from year to year, start new versions. The school intranet becomes a source of culture, a living document and portfolio of student work (students have some control over what of theirs gets saved, vs. deleted if just a draft). Now of course our math teachers are complaining at this point that we've gone far afield and they're right. This SQL database about polyhedra is on the school intranet let us imagine, one among several, and students use it in art class, chemistry class, lots of places besides math. Geographic information systems show gem stones, where this or that type is more prevalent. So in math class we're maybe more interested in the duals table (relates each poly to its unique dual) and the XYZ coordinates, if that's how they're stored (I've used quadrays in some of my FoxPro implementations, got an article in FoxPro Advisor about that).[3] In science class we might be looking at crystal lattices and pull up pictures of polyhedra in that context instead (same database, different subject area). Math classes definitely need to be using x3D and some ray tracing, if spatial geometry is on the agenda at all. This presumes vectors, the usual pre linear algebra content, and if we're using a "math objects" approach, we definitely get to those, complete with __add__ and scalar __mul__ per Gibbs-Heaviside (overloading special names, used interactively in shell mode as well as in scripts). All of the above may be implemented as student led projects, teachers as managers, including with some XP techniques if that's what your school is into, not speaking for all of them. You don't need an exhaustive table of hundreds of polyhedra, or even if your school has that, hand doing a small set, maybe just the Platonics, is enough to start doing an inner join or two, running a ray tracer. The point is to get some hands on experience even before college, with what are still the tools of many a trade, from show biz to neurochemistry. The same approach works after high school as well, but I think we'll want to get started as soon as students feel ready, let them set the pace, like so what if they're only like age 12 in China, it's not up to me to make all the rules, I'm not some Olympian head honcho. I'm a big believer in organic growth, community gardens i.e. we want "SQL savvy" to take root indigenously, not show up at the door as some "must study me" imposed module. The technology is all freely available, don't have to go with polyhedra, but in the interests of efficiency, optimization, I'm suggesting that'd be a smart investment for any school, with all the raw materials already free and open source. Kirby 4D PS: an excellent main table could be the Waterman Polyhedra, which I named for Steve Waterman. These are convex polys carved from the CCP matrix, such that every vertex is the center of a CCP within radius maximum, i.e. its the maximum convex hull for each ball-to-ball sweepout radius. The bigger ones are especially beautiful, though not every SQL group would want to bother storing them (vs. generating efficiently -- given the symmetries you only need to store like a 12th of the vertices).[4] [1] http://worldgame.blogspot.com/2008/08/wanderers-2008816.html [2] http://www.cit.gu.edu.au/%7Eanthony/graphics/polyhedra/archimedean_duals/tri... by Anthony Thyssen, with data from George Hart [3] http://www.grunch.net/synergetics/quadrays.html [4] http://watermanpolyhedron.com/watermanpolyhedra1.html http://local.wasp.uwa.edu.au/~pbourke/geometry/waterman/gen/index.html

On Sun, Aug 17, 2008 at 9:10 AM, kirby urner <kirby.urner@gmail.com> wrote: << SNIP >>
So in math class we're maybe more interested in the duals table (relates each poly to its unique dual) and the XYZ coordinates, if that's how they're stored...
K-16 features many gentle on-ramps, which individual students will sample, staying on some, getting off others. SQL starts out with simple SELECTs against pre-existing tables. In our 10th grade geometry class, we learn the "dual" of a polyhedra is obtained by turning faces into corners (vertices), vertices into faces, leaving the number of edges alone (V + F = E + 2). So if we wanted to list duals in our Polyhedra table as a saved view, we could do something like: #=== from pysqlite2 import dbapi2 as sqlite conn = sqlite.connect("newgeom") curr = conn.cursor() curr.execute("DROP VIEW duals;") VIEW = """create view duals as select a.shortname, b.shortname from polyhedra a, polyhedra b where a.faces = b.vertices and a.vertices = b.faces and a.edges = b.edges; """ curr.execute(VIEW) conn.commit() for row in curr.execute("select * from duals").fetchall(): print row[0], "is the dual of", row[1] #=== To get:
tetra is the dual of tetra cube is the dual of octa octa is the dual of cube cell is the dual of cubocta cubocta is the dual of cell
Note that "cell" is my short name for the rhombic dodecahedron, a space-filling shape fascinating to Kepler. Note also that sqlite3 has native html tabular output, something to play with (cut and paste while projecting, view in browser perhaps?)... Of course there's this prejudice that XML is not a math topic, but pre-college we're less strict about the difference between bread and butter numeracy and "pure math", want to show semi-structure data in tree format. Poet Gene Fowler, author of eWriter, always maintained that XHTML should be studied under the heading of punctuation, i.e. while you're learning about colons, commas and semi-colons, learn pointy bracket markup as well. As such, we might push HTML over to grammar teachers, but then computer languages have grammar, so they might push right back. The bottom line is if teachers feel these are hot potato topics, then they become no one's responsibility, whereas if they're seen as excitingly relevant, as injecting new life into tired material, then we're looking at a bonanza, with plenty to go around. All we need is that army of curriculum writers ready to tackle the content in an open source manner -- what I see happening on the Web, slowly but surely, including on Youtube, fun: http://www.youtube.com/watch?v=40Lnoyv-sXg sqlite> .schema polyhedra CREATE TABLE Polyhedra ( greekname CHAR PRIMARY KEY, shortname CHAR NOT NULL, vertices NUMERIC NOT NULL, edges NUMERIC NOT NULL, faces NUMERIC NOT NULL, volume NUMERIC NOT NULL); sqlite> .mode html sqlite> select * from polyhedra; <TR><TD>Tetrahedron</TD> <TD>tetra</TD> <TD>4</TD> <TD>6</TD> <TD>4</TD> <TD>1</TD> </TR> <TR><TD>Hexahedron</TD> <TD>cube</TD> <TD>8</TD> <TD>12</TD> <TD>6</TD> <TD>3</TD> </TR> <TR><TD>Octahedron</TD> <TD>octa</TD> <TD>6</TD> <TD>12</TD> <TD>8</TD> <TD>4</TD> </TR> <TR><TD>Rhombic Dodecahedron</TD> <TD>cell</TD> <TD>14</TD> <TD>24</TD> <TD>12</TD> <TD>6</TD> </TR> <TR><TD>Cuboctahedron</TD> <TD>cubocta</TD> <TD>12</TD> <TD>24</TD> <TD>14</TD> <TD>20</TD> </TR> Kirby
participants (1)
-
kirby urner