Draft of the internal database organization.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Wed, 15 Jul 2015 19:06:15 +0000 (21:06 +0200)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Wed, 15 Jul 2015 19:06:15 +0000 (21:06 +0200)
README [new file with mode: 0644]

diff --git a/README b/README
new file mode 100644 (file)
index 0000000..9c1899c
--- /dev/null
+++ b/README
@@ -0,0 +1,44 @@
+App exhibits
+============
+
+SQL table definition
+--------------------
+
+Additional table "exhibit_item". This table stores all information about exhibits/objects/category 
+(referred to as "items" below) (that may be animals and cages for a zoo or portraits and rooms in a museum)
+in a very "extensible" and still queryable way.
+
+table exhibit_item
+       id: integer primary key
+       label: "Name" of the item primarily for administration of the database (e.g. wolf)
+       properties: json-string defining the properties of the item
+       schema: optional id of the table exhibit_schema.id (foreign key) defining the allowed content of "properties".
+               if schema is null, a default schema is taken (e.g. "object" with key/value pairs).
+
+table exhibit_schema
+       id: integer primary key
+       label: arbitrary string labelling the schema (e.g. animal)
+       schema: json-string specifying the format of properties (http://json-schema.org/)
+
+
+Examples
+--------
+Example of the properties of an item:
+{
+       'name': 'Salzburg'
+}
+
+Example of another item:
+{
+       'name': 'Wolfgang Amadeus Mozart',
+       'size_cm': 170,
+       'born_in': 45 // id of item Salzburg
+}
+
+
+Links
+-----
+
+* https://github.com/jdorn/json-editor
+* http://json-schema.org/
+