In Sofawiki, you can only SELECT.
In SQL, fields are predefined in a schema.
In Sofawiki, there are no predefined fields. Fields are defined using a key-value pair on square brackets wherever you want on a wiki page.
Some text [[key::value]] some other text [[key2::value1::value2]]
You can however use the FROM clause to restrict the search to pages who begins with that name. If you want to restrict ro namespace Film, you write FROM film:. Note that you must have the authorization to view the pages with that name or you get an error.
All keywords must be UPPER CASE. The keywords are AVG CALC CONST COPY COUNT CROSS DESC EXCEPT FIELDS FORMAT GROUP JOIN LIMIT MAX MIN ORDER PROJECT RENAME SELECT STYLE SUBSTR TEMPLATE UNION WHERE
Case matters when you name a key. You are save if you use only lowercase field names. Some keys are reserved:
- _name which is the name of the page
- _status which is the status of the page
- _content which is the entire content
Special characters can be expressed as tags
- colon :
- pipe |
- leftsquare [
- rightsqare ]
- leftcurly {
- rightcurly }
The order of the fields does normally not matter. The order of repetition does however matter if you have multiple values for a field. In this case, all tuples of the same position in the field are part of the same tuple. If a field has less values than another, then the last value is repeated. Also, if a field has a null value, it must specified empty.
For our examples, we have added all tuples in one page. However, the result of the searches would have been the same if each tuple was on its own page.
In SQL, you specify * if you want all fields.
In Sofawiki, you must explicitely specify all fields of the tuple. You can make a query FIELDS to get all fields.
In Sofwawiki there are no duplicate tuples.