Since the datastore types that MetaModel support are widely different, one might question "what does a schema or a table mean?" for eg. Excel spreadsheets, CSV files etc.
On this page we will answer such questions. In the table below there's a list of MetaModel modules and an explanation of the semantics of schemas and tables.
Module | Schema | Table |
---|---|---|
JDBC | A database schema, as defined by JDBC. | A database TABLE, VIEW or other tabular structure in a schema. |
OpenOffice | A database schema, as defined by JDBC. | A database TABLE, VIEW or other tabular structure in a schema. |
CSV | A handle to the CSV file. If the file does not exist, schema will be empty. Always has default schema and virtual information schema. | The actual file structure, based on the column name line. |
Excel | A handle to the Excel spreadsheet. If the file does not exist, schema will be empty. Always has default schema and virtual information schema. | A sheet in the spreadsheet |
Fixed width | A handle to the Fixed value width file. Always has default schema and virtual information schema. | The actual file structure, based on the column name line. |
Access | A handle to the Access file. Always has default schema and virtual information schema. | The tables in the Access database file. |
XML (SAX) | A handle to the XML file. Always has default schema and virtual information schema. | A certain position in the XML tree, defined by a user's xpath expression. Each table also has xpath expressions for each column, which define the values of the rows in a table. |
XML (DOM) | A handle to the XML file. Always has default schema and virtual information schema. | All tables are virtual representations of recurring combinations of XML elements. The actual generation of tables depend on whether you perform manual or automatic "flattening" (denormalization) of tables |
MongoDB | A MongoDB database. | A MongoDB collection with a virtual table model, which represent the properties of the documents in the collection. |
Neo4j | A Neo4j database. | Nodes with given label. |
Salesforce.com | A handle to the web services of Salesforce | A type of Salesforce.com SObject. |
SugarCRM | A handle to the web services of SugarCRM | A SugarCRM 'module'. |
Semantics of "Create table"
In addition to understanding "what is a table?" it is also useful to know what it means to "create" a table, as it is facilitated by UpdateableDataContext.
Module | Create table semantics |
---|---|
JDBC | Issue a CREATE TABLE statement to the database. |
CSV | Create or overwrite the CSV file with a (new) table structure. If multiple files should be created, then create a new CsvDataContext and issue the createTable operation there. |
Excel | Creates a new sheet in the Excel spreadsheet. |
MongoDB | Creates a new collection in the MongoDB database. |
CouchDB | Creates a new CouchDB database. |
POJO (Java objects) | Creates a new collection of Java objects (Map based). |