|
A wiki-based database is a collection of wiki files that can be accessed using SQL-like commands. The first (and, as of 2006, the only) such system was designed and developed by Reliable Software as part of their P2P version-control system, Code Co-op, which features a Peer-to-peer wiki system. SQL (commonly expanded to Structured Query Language â see History for the terms derivation) is the most popular computer language used to create, modify, retrieve and manipulate data from relational database management systems. ...
2006 (MMVI) was a common year starting on Sunday of the Gregorian calendar. ...
Reliable Software is distributed software company founded by Bartosz Milewski in 1996. ...
Code Co-op is the peer-to-peer version control system made by Reliable Software. ...
Peer-to-peer wiki is a server-less system that allows wiki sites to be shared between peers. ...
Database
The database is implemented as a collection of wiki files (records) stored inside namespaces, which play the role of tables. In a file-based P2P wiki, a namespace/table is implemented as a subdirectory of the main wiki directory. Wikipedia does not yet have an article with this exact name. ...
In relational databases and SQL databases a table is a set of data elements (values) that is organized using a model of horizontal rows and vertical columns. ...
The files (records) may contain any wiki markup, but in order to be accessible through SQL commands, they must define some tuples, or property-value pairs. This is done by embedding a wiki table inside a record. The first column of this wiki table defines the names of properties, the second specifies their values. For instance, a record in the Student table (namespace) may contain the following wiki table: In the context of a relational database, a row, also called a record or tuple, represents a single, implicitly structured data item in a table. ...
| Name | Chad Codewell | | Courses | Programming, Anger Management | which defines two properties, Name and Courses, and assigns values to them.
Queries The properties defined inside records may be used to formulate SQL queries. For instance, the following query may be embedded in a wiki file (a query line starts with a question mark): ?SELECT Name FROM Student WHERE Courses CONTAINS "Anger Management" ORDER BY Name When the wiki file is displayed, the SELECT statement is expanded into a wiki table that lists the results of the query. In the above example, the result might look like this: A SELECT statement in SQL returns a result set of records from one or more tables. ...
| ID | Name | | Student:13 | Chad Codewell | | Student:18 | Lewis Black | The ID column shows the name of the record (in a file-based system, this is the name of the file minus the extension .wiki). It also serves as a wiki link to the record. When the user clicks on it, the whole record is displayed like any other wiki file.
Forms Wiki files may contain markup for displaying HTML forms. The target of a form (the action associated with the form) may be another wiki file. When the form is accepted, the target wiki file is displayed. The properties defined by the form can be accessed in the target file using the syntax [?propName]. In particular, the values from a form may be used in SQL queries in the target page. A webform on a web page allows a user to enter data that is, typically, sent to a server for processing and to mimic the usage of paper forms. ...
A form may also be used to create new records. In that case, the target file would contain the INSERT command that creates a new record and fills its property table with specified values. For instance, continuing the above example, the target file may contain: An SQL INSERT statement adds one or more records to a table in a relational database. ...
?INSERT INTO Student (Name = [?name], Courses = [?courses]) where the values of the properties are set by a form that activats this file. |