("Company", this.getSchema());
+ }
+}
+
+export default CompanyModel;
diff --git a/src/models/customModelInterface.ts b/src/models/customModelInterface.ts
new file mode 100644
index 0000000..ffeabf2
--- /dev/null
+++ b/src/models/customModelInterface.ts
@@ -0,0 +1,16 @@
+import * as mongoose from "mongoose";
+/**
+ * This is the base models class and contains some useful methods to perform
+ * basic operations with MongoDB.
+ * @history
+ * | Author | Action Performed | Data |
+ * | --- | --- | --- |
+ * | Andrea Mantovani | Use export default | 12/05/2016 |
+ * | Luca Bianco | Created interface | 10/05/2016 |
+ *
+ * @author Luca Bianco
+ * @license MIT
+ */
+interface CustomModel extends mongoose.Document {}
+
+export default CustomModel;
diff --git a/src/models/databaseModel.ts b/src/models/databaseModel.ts
new file mode 100644
index 0000000..04cf780
--- /dev/null
+++ b/src/models/databaseModel.ts
@@ -0,0 +1,252 @@
+import * as mongoose from "mongoose";
+import Model from "./model";
+import CustomModel from "./customModelInterface";
+
+/**
+ * DatabaseModel is a interface that represent the document on MongoDB.
+ *
+ * @history
+ * | Author | Action Performed | Data |
+ * | --- | --- | --- |
+ * | Davide Polonio | Create interface | 09/05/2016 |
+ *
+ * @author Davide Polonio
+ * @copyright MIT
+ */
+export interface DatabaseDocument extends CustomModel {
+ /**
+ * @description Represent the company name.
+ */
+ name : string,
+ /**
+ * @description Represent the owner id ( the Company that owns the db).
+ */
+ idOwner : string,
+ /**
+ * @description Represent the username to access to the database.
+ */
+ username : string,
+ /**
+ * @description Represent the password to access to the database.
+ */
+ password : string,
+ /**
+ * @description Represent the address host where is install the database.
+ */
+ host : string,
+ /**
+ * @description Represent the name of database.
+ */
+ dbName : string
+}
+
+
+/**
+ * DatabaseModel manage all connections to MongoDB companies databases.
+ * Implements model and schema of MongooseJS.
+ *
+ * This model represent a connection to a company.
+ *
+ *
+ * @history
+ * | Author | Action Performed | Data |
+ * | --- | --- | --- |
+ * | Davide Polonio | Create class | 06/05/2016 |
+ *
+ * @author Davide Polonio
+ * @copyright MIT
+ */
+class DatabaseModel extends Model {
+ /**
+ * @description
+ * This constructor calls his super constructor. After it gets the
+ * database connection and puts it in model.
+ * @return {DatabaseModel}
+ * This.
+ */
+ constructor() {
+ super();
+ }
+
+ /**
+ * @description Gets All the databases for a company
+ * @param company_id
+ * @returns {Promise