07JAN14 UPDATE: JS2DX – a platform that will support Sprout’s User Interface has been completed. http://js2dx.com
this page is being updated.
Sprout is a object-oriented programming (oop) language native to Relational Database Management System (RDBMS). It is written entirely with stored procedures that are an implementation of SQL/Persistent Stored Module delivering object-oriented capability vernacular to a database. Sprout does not require external modules or compiled code. It is not an object-relational mapping solution or an add-on language database language backward-compatible with classic SQL syntax.
Sprout’s low level programming language instructions are comprised of nested key-value pairs which are stored in normalized form inside a registry implemented with Entity Attribute Value data model where there are no nulls and values are never repeated. For example if two or more programs employ a variable named “var_name” that name will be stored in the registry only once. The registry is a flexible storage mechanism that may accommodate columnar tables and sets of single node values constituting documents of any structure like program code, HTML, XML, RDF, etc.
Sprout is positioned as server-side of development and deployment platform. In combination with client-side GUI driver it will enable coding complex applications where requests executed in a database transaction. This feature will ensure data integrity on the level of RDBMS mechanism and thus accurate transaction commits or rollbacks.
Sprout will support distributed asynchronous transactions which may become used in embedded systems with real time sensory feedback. In such system if distributed node fails, returns error or is out of range Sprout may correct the glitch by finding result closest to input parameters in an indexed set consisting of pre-compiled results.
For example a cruise control system on a vehicle is programmed in Sprout. There is a real time feed of movement characteristics like incline, velocity and acceleration. The control system adjusts acceleration and braking to maintain constant speed while recording data log into a black box. Once the vehicle runs over a sleek of oil rather than relying on computation algorithms for a response Sprout executes a database query based on the feed of movement characteristics. The query returns a set of data sorted by resemblance of the feed input. The data in the set contains trajectories computed in advance using a computing system more powerful than that inside the vehicle. Sprout accomplishes the entire process in a continuous, uninterrupted database transaction ensuring accurate execution and logging.
While the above provides an example of using Sprout in an embedded system with a specific functionality it is a flexible, multi-purpose application development platform suited for a variety of tasks. It is akin to Servoy and will use a web interface for programming environment.
Procedural vs. Object-Oriented.
Procedural languages native to many RDBMS platforms make available limited object-oriented features like classes, their instances and inheritance. Sprout, while written with a standard SQL/PSM, addresses that limitation by introducing call stack and memory addressing routines that enable features attributed to object-oriented programming.
In the example below there are three program functions: a() with one command before and after invocation of b() with two commands before and after invocation of c() with three commands in total:
In a procedural language the call stack is ordered in the sequence of commands made of all nested invocations from beginning to end:
Result of a function invocation is optionally assigned to a value. To do so the language executes code of the invoked function and assigns the result to a variable. For example in function a():
DECLARE B; B = b();
In an object-oriented language the call stack control routine makes hops over the stack structure. One location in the stack may contain a pointer to another location or address. This feature makes possible creating instances of classes – an
important feature in the object-oriented programming paradigm.
Creating reference pointers to a call stack address may be advantageous over assigning a variable to the result of invocation. For example the caller does not need to be aware of class type to create its instance, methods are associated with a class, inheritance and others. Instantiate a class by creating reference to class header in the call stack in function a():
B = NEW b();
Database objects (tables, views) are accessible with their resource identifiers with each assigned a unique numeric identifier in the registry. For example a table structure is defined in a document of an application user in a domain.
SELECT * FROM <domain>.<application>.<user>.<document>.<table> ; SELECT * FROM table(<unique identifier>) ;
In another example there is a class user() with methods list(), update():
-- select all users SELECT * from user.list(); -- select user with id 1 SELECT * from user.list(1); -- update user with id 1 U = NEW user(); U.Name = 'Joe'; U.DOB = '1/1/2000'; SELECT U.update(1);
- Object oriented programming language native to RDBMS
- Column and row level restrictions on data access
- Entities, rows, and values have unique identifiers
- Referencing of entities, rows, values by URI or numeric identifier
- Variables, arrays, flow-control
- Class instances, instant methods, inheritance
- Complex types for input and output
- Nested key-value pair (low level) code enables high level syntax-independence
- EAV objects do not require physical design
- Executes programs under one database transaction
- Contains at most one “null” per datatype in the registry
- Applies table partitioning and server clustering
Sprout may find use in the following fields:
- Semantic Web
- Sparse data
- Clinical research
- Applications with dynamically changing data model
- Reports, GUI
- Web and other programming
Proof of concept prototype has been built and tested. Long term goal is developing a versatile database visualization platform. Updates of ongoing development will be posted. Please contact for sponsorship opportunities.