Analysis database
While Quantitative Commons can load to and fetch data from a large range of database types, it also offers the option of saving data in its internal database. This is a quick ad hoc solution for collecting data from many different sources in a database in order to carry out analytical tasks, without having to set up database servers or any other infrastructure.
Loading data and creating schema
The Quantitative Commons analysis database is completely schemaless. It uses a Key-Value model to store data in a table structure without the need for defining a data model beforehand. To load data to the analysis database, select Analysis database load from the In/Out-menu. Then use the Create objects from loaded data tool.
To create analytical objects and save them to the database, enter a name for your object type (or select it on next load) and select its logical role. A Predicate/Verb is, in simple terms, an object that connects or states a fact about an Object/Noun. In the statement Peter called Paul, Peter and Paul are Objects/Nouns (the object name may by Person) and Called is a Predicate/Verb (perhaps named Phone call). You must then define a Row id-column, which is the column containing a unique key for each row. If your data row does not have a natural unique key, the Create GUID tool in the Dataset menu item is a good solution to create one. If your object is made up of several rows (say, your predicate object is a meeting and each row contains information about a person who attended the meeting) you may optionally provide an id from column to connect rows belonging to the same object.
You may then select the columns from loaded data that you wish to be attributes of your object, and the attribute that should be displayed when visualizing your object in a link chart or on a map. Execute the operation to create one object of the stated type for each row (or set of rows if a column id has been defined), with the selected columns as attributes. Repeat to create any other object from the same data. Object with identical row-id:s and at least one identical attribute value will be automatically linked in the query logic (Peter and Paul are the originator and recipient attributes of the phone call object, and the Person objects are created from the same row and will, hence, be linked.
Analysis database tools
There is a special category under the Analyze menu item that contains tools to query the analysis database. The Select from analysis database-tool lets you select any attribute (of any created object), define a condition and a logic relationship between the attribute and the condition (equal to, contains, larger than etc.). Omitting the attribute will query any attribute. Optionally, the object type that should be returned by the query may be defined.
The Visualize as-listbox contains options for how the results of your query should be returned. You may choose to display it in a data grid, on a map, as a link chart, as a frequency chart and as a timeline. When searching for attributes that may be shared among multiple objects and viewing query results in a data grid, you may select to either have Quantitative Commons return any attributes that are shared between returned objects (Least Common Projection), or to return all attributes that belong to any returned object (Any field).
There are many other tools that can be used to query the analysis database, information about which can be found by clicking the info icon of each tool. After fetching data from the analysis database, all other tools of Quantitative Commons can of course also be used upon the selected data.
Analysis database settings
Settings for the analysis database can be found under the Analysis database section of the settings menu. There, you may delete items, export and import the entire database to and from XML, select a location for the database other than the default, control rollback and index settings, and the data types returned by a query.