Saturday, November 12, 2011

More on the SQL interface and G World

The engine in its urrent form has droped about 20 line of code. It has a simplified model. The G machine executed by popping off the top element in the current active G store, and executed the associated SQL procedure. When the procedure stops, the engine will execute the top node on result, if any. (The null node is executable).

That's about it. So SQL programmers should adopt the open source semantic triple format. Each of their records has the triple, for semantic indexing, but still is wide open to create additional columns. Each proprietary record containing the standard nested G graph definitions. The only real important thing is SQL programmers agree on the little grammar we need to put in stop,start, an link records at the end of their lists, an then to the proper stop result, if any, onto result (result is the standar name for Gout store in the equation:
Gout = @(Xgraph,Ygraph). The G machine coopts the local name 'result'

If their is no push onto result, and the procedure stops, then G executes the next node in sequence with the current store. (this is a bit tricky and SQL programmers need to agree on a rank/file pointer arithmetic.)

So everything really happens at start up when the SQL programmers loads the operators, the loaded SQL sequences have to be internally state consistent with G grammar. The link operator, medium jump to another table, causes the installed link procedure to execute. The link involves an internal state change in G machine, it has to swap out the current table store. The other state store is left on result, the ascending link so the completed traversal migrates back to the link point and the previous store recovered.

The link is natural because of the nested descending order grammar in G graphs.

So SQL programmers agree on the operations of a triple:


1) keyword is any sequence of one or more random bytes.
2) pointer arithmetic allows for a partition into rank and file counting for traversal.
3) link has function and property. The major property, set/descent results from the requirements of rank and file pointers. Link are short (next node) medium (next store) long (next URL). Link can have schema property, they can have any proprietary property which follws grammar fundamentals.

4) An associated grammar that captures link state and rules, allowing a huge expansion of the set of proprietary SQL operators. In byte mode, each keyword is a character, but otherwise the syntax hold, it simply adopts the byte property. So in byte mode, a G graph looks exactly like Typeface Explosion!


No comments: