---
description: Examples of database creation
---

# Creating a Database

<pre class="language-java" data-overflow="wrap"><code class="lang-java">// Create a database factory.
DatabaseFactory databaseFactory = DatabaseFactory.SQLITE;

// Create databases.
<strong>Database database = databaseFactory.create(
</strong>    new DatabaseCredentials().SQLITE("src/test/resources/database.sqlite3")
);

Database database2 = databaseFactory.create(
    new DatabaseCredentials().SQLITE("src/test/resources/database2.sqlite3")
);
</code></pre>

```java
// Create a database factory.
DatabaseFactory databaseFactory = DatabaseFactory.MONGO;

// Create databases.
Database database = databaseFactory.create(
    new DatabaseCredentials().MONGO(
        "connectionString", "databaseName"
    )
);

Database database2 = databaseFactory.create(
    new DatabaseCredentials().MONGO(
        "connectionString", "databaseName"
    )
);
```

