I could not find any such information on the web. Is there a general purpose programming language written in SQL? Where a program is run by a sql command and returns a document (string). A web application, for example, would be contained within a SQL database and does not require application layer development. I'm asking because I am in the middle of developing such platform from scratch. It supports creation of unlimited number of db objects (tables, columns) and has basic programming logic with variables, procedures, etc. Many features are still in the works but the compiler already has some basic functionality to query, build html forms, tables, etc.
I am very interested in learning about any similar technologies. Thanks.
SQL (meaning ISO Standard SQL) is such an archaic and peculiar language and lacks even the most basic features that we take for granted in more modern languages. It's not a great legacy on which to base a new language.
If you want to design a new database language then I suggest you base its data structures and syntax on the relational model instead of the SQL model. Have you looked at any of the many "D" -based projects: The Third Manifesto
I am working on a language that is "contained" inside an RDBMS. Its compiler is written in procedural SQL (I selected Postgres PgSql for development). There are PgSQL functions that run program code and return documents. It eliminates the need to have a separate programming language (php, cf, etc) on server to render finished documents. When a program code is compiled its commands are stored in compiler tables. When it is run, the compiler retrieves program commands into a stack which is the program code. It is a new language with its own syntax.
It eliminates the need for server-side processing outside of RDBMS engine: one sql command like "select run(#ProgID::int);" - returns an entire, completed document to the client in a text string.
Its datamodel has a fixed number of tables and can support an unlimited number of user-defined tables (limited only by range of surrogate key datatype). If an app with 1000 user tables is created - all program code,including application data, will be contained inside that fixed number of tables. It has leaf-level locking, meaning in theory it's possible to simultaneously edit different columns of same row by separate users. There are basic program flow controls (procedures, statements, assignments,etc).
This approach ("marrying" of a language to a particular dbms) was rather common in "the old days" (i.e. Adabas/Natural, Datacom/IDEAL, TOTAL/Mantis and several others on the mainframe as well as the DBASE, Paradox, Foxpro offerings on the pc).
As the pc and "open" systems (Not to be confused with Open Source) gained favor, one goal was that lots of things could "plug & play" together rather than some one-to-one relationship between a language and the dbms.
Do any of the aforementioned employ a GPL written in procedural sql? I worked with couple of these platforms. I reckon their language's source is compiled in another GPL, likely lower level than of procedural sql. I am looking for something where language compiler's source is in pl sql which many of RDBMS support. There are varieties of procedural sql that differ by platform (t-sql,pl/sql,plpgsql), but basically they are alike. Pl sql has been around for some time, is there an example where it serves as a GPL compiler? Whether I find one or not I would be interested to know what others think about programming with such thing. Imo reducing the need to program app layer could be an advantage: client-application-database-application-client process is cut to client-database-client. Many systems use RDBMS anyway, where few procedures could add a GPL compiler.