James K. LowdenMaintainer, FreeTDS |
|
| Year | Berkeley | Armonk |
|---|---|---|
| 1970 | ![]() |
A Relational Model of Data for Large Shared Data Banks |
| 1988 | ![]() |
SQL an International Standard |
The customers’ cost is the vendors’ gain!
Read
|
Write
|
| constructor | compare | assign | selector | gen expr | |
|---|---|---|---|---|---|
| table | no | no | only via INSERT - SELECT | yes | no |
| column | only as arg to IN | no | no | yes | no |
| row | only in INSERT & UPDATE | no | only to/from set of host scalars | (yes) | no |
| scalar | N/A | yes | only to/from host scalar | (yes) | no |
Credit: Chris Date A Critique of the SQL Database Language [pdf] December 1983
| SQL | SELECT DISTINCT E#, TOTAL_PAY FROM ( SELECT E#, SALARY + BONUS AS TOTAL_PAY FROM EMP ) AS TEETH_GNASHER WHERE TOTAL_PAY >= 5000 |
| Tutorial D | ( ( EXTEND EMP ADD SALARY+BONUS AS TOTAL_PAY )
WHERE TOTAL_PAY >= 5000 ) { E#, TOTAL_PAY } |
credit: The Importance of Column Names by Hugh Darwen
SELECT … | ./graph_thisftp might be a good model| RDBMS | Bind Function |
|---|---|
| ODBC (per column) | SQLRETURN SQLBindCol( STMT Handle, int col, int type, BYTE *buf, int len, int *indicator); |
| Ingres | |
| SQLite | |
| MySQL (strings only) | MYSQL_ROW mysql_fetch_row(MYSQL_RES *result); |
| Postgres (string or unconverted) | char *PQgetvalue(const PGresult *res, int row, int col); |
ODBC Is Not the Answerstdio as a ModelDB * dbopen(const char *url, const char *options)size_t dbwrite(void * restrict sql, size_t size, DB * restrict stream)int dbscanf(DB * restrict stream, const char * restrict format, ...)int dbprintf(DB * restrict stream, const char * restrict format, ...)int dbclose(DB* stream)server.dbname.schema.object.column comes straight from IBM /server/dbname/dir/.../object?use dbname could be cd dbname$EDITOR, cat, more, chmod, chown, chgrp, and rm also good models
|
|