FerretDB with DBine
How to connect DBine to FerretDB and what you can do once it's connected. This page is written from what the FerretDB driver says about itself, so it matches the version of DBine you download.
Connect
- In DBine, open New connection.
- Pick FerretDB in the list of engines.
- Fill in the fields below, press Test connection and then Save.
Default port: 27017.
General
| Field | Description |
|---|---|
| Server | Several members separated by commas: host1:27017,host2:27017. Example: localhost |
| Port | |
| Database | Initial database; empty = the one in the connection string or “test”. |
| User | |
| Password | Kept in the system keychain, never in DBine's files. |
| Connection string | If filled in, it replaces the other fields. Example: mongodb+srv://user:password@cluster.example.net/dbKept in the system keychain, never in DBine's files. |
| Read-only | On or off. |
SSH tunnel. The connection can go through an SSH server, even through a chain of bastions, with a password, a private key or the SSH agent. The server's fingerprint is checked against known_hosts or confirmed the first time.
SSL/TLS
| Field | Description |
|---|---|
| Encrypt the connection (TLS) | On or off. |
| Trust the server certificate | On or off. |
Advanced
| Field | Description |
|---|---|
| Authentication database | Example: admin |
What the explorer shows
Under the connection: Databases. Inside each one:
- Collections
- Views
Query editor
The editor uses FerretDB's own query syntax, in JSON, with completion for the connection's objects. Statements and commands run against the database selected in the tab.
What the editor accepts:
mongosh-like syntax, one statement per line or separated with `;`:
db.collection.find({ age: { $gt: 30 } }, { name: 1 }).sort({ age: -1 }).limit(10)
db.collection.aggregate([{ $group: { _id: "$city", n: { $sum: 1 } } }])
db.collection.countDocuments({}) · db.collection.distinct("field", {})
db.collection.insertOne({…}) · updateMany(filter, { $set: {…} }) · deleteOne(filter)
db.getCollectionNames() · db.runCommand({ dbStats: 1 })
db.createCollection("c", { capped: true, size: 4096 }) · db.createView("v", "c", [{ $match: {} }])
db.getCollection("c").createIndex({ field: 1, date: -1 }, { unique: true }) · dropIndex("field_1") · db.dropDatabase()
DBine extension: db.createCollection("c", {…}, { ifNotExists: true }) does not fail if the collection already exists.
A raw JSON command is also accepted: { "find": "collection", "filter": {} }.
Unquoted keys, single quotes, ObjectId("…"), ISODate("…"), NumberLong(…) and /regex/i.
Ready-made templates for new objects:
- New view
- New time series
- New capped collection
- Change validator ($jsonSchema)
- New index
Tools for FerretDB
Available
- Graphical execution plans
- Server monitor
- Sessions and running queries
- Index usage
- Create databases
- Drop databases
- Database properties
- Visual designer for new objects
- Rename objects
- Compare and sync schemas
- Native bulk load when migrating data
- Users and permissions
Not available for FerretDB
- Live query profiler
- End a session
- Locks: who blocks whom
- Cancel another session's query from the sessions list
- Manual transactions (commit and rollback)
- Relations in the ER diagram
- Clone tables
- Backups
Why a tool doesn't apply to an engine, and the details of each one, are in the engine support reference.
Generated from the FerretDB driver 0.1.12, which DBine downloads the first time you connect to FerretDB.