Jump to content

KDb/Drivers/Loopback: Difference between revisions

From KDE Community Wiki
Jstaniek (talk | contribs)
Jstaniek (talk | contribs)
No edit summary
Line 1: Line 1:
A higher-level driver: one that does introspection into plugged databases' schemas and returns available information in a form of virtual database Views.
Design document


Old wiki page: [http://www.kexi-project.org/wiki/wikiview/[email protected]] (TODO: migrate here)
started: may 2005 by jstaniek
status: idea and some design, volunteers needed


Status: idea and some design, volunteers needed
It's a higher-level driver that performs introspection into plugged-in data sources and returns available information in a form of db views.
 
== Example ==
 
Most important db views can look like the Schema Table of SQLite https://sqlite.org/schematab.html
 
CREATE TABLE sqlite_schema(
  type text,
  name text,
  tbl_name text,
  rootpage integer,
  sql text
);
 
Then, you can perform SELECT queries on the table.
 
== Why? ==
This feature gives the overview of database objects and fields, eg. for creating a design report without a need for custom coding. As a consequence, e.g. KEXI can display data from this table as from any other tables, if this KDb driver is accessible.
 
We also get alternative way for schema introspection: by running a query, like:
 
SELECT * FROM TABLES WHERE name="foobar"
 
instead of using the KDb API (pseudocode):
 
KDbConnection::tableSchema("foobar")

Revision as of 20:50, 6 April 2023

Design document

started: may 2005 by jstaniek
status: idea and some design, volunteers needed

It's a higher-level driver that performs introspection into plugged-in data sources and returns available information in a form of db views.

Example

Most important db views can look like the Schema Table of SQLite https://sqlite.org/schematab.html

CREATE TABLE sqlite_schema(
 type text,
 name text,
 tbl_name text,
 rootpage integer,
 sql text
);

Then, you can perform SELECT queries on the table.

Why?

This feature gives the overview of database objects and fields, eg. for creating a design report without a need for custom coding. As a consequence, e.g. KEXI can display data from this table as from any other tables, if this KDb driver is accessible.

We also get alternative way for schema introspection: by running a query, like:

SELECT * FROM TABLES WHERE name="foobar"

instead of using the KDb API (pseudocode):

KDbConnection::tableSchema("foobar")