---
title: "Quick start"
description: "Get CoraDB running in minutes: start the CoraDB service, open a demo database or create your own, and run your first relational, graph and hybrid queries."
url: "https://www.coradb.ai/manual/quick_start.html"
markdown_url: "https://www.coradb.ai/manual/markdown/quick_start.md"
product: "CoraDB"
version: "1.0"
keywords: "coradb quick start, coradb service start, coradb create database, coradb start database, corasql, first graph query"
---

# Quick start

This guide takes you from a fresh installation to your first graph query. It assumes CoraDB is already [installed](https://www.coradb.ai/manual/install.html) and its [environment variables](https://www.coradb.ai/manual/env.html) are set.

## 1. Start the CoraDB service

The service starts the master process, the broker (which accepts client connections, port 33000 by default) and the CoraDB Manager Server (CMS):

```bash
coradb service start
```

```text
@ coradb master start
++ coradb master start: success
@ coradb broker start
++ coradb broker start: success
@ coradb manager server start
++ coradb manager server start: success
```

On Windows you can also start and stop **CORADBService** from *Services* (Control Panel › Administrative Tools), or with *Service Start* / *Service Stop* in the CoraDB Service Tray menu. Controlling the service needs administrator rights there; from a shell, a normal login user is enough.

See [Controlling CoraDB processes](https://www.coradb.ai/manual/admin/control.html#coradb-services) for all service commands.

## 2. Open a demo database

CoraDB includes ten ready-to-use [demo databases](https://www.coradb.ai/manual/demo-databases.html). This guide uses **e-commerce**, the [sample database](https://www.coradb.ai/manual/sample-database.html) of the whole manual. Start its server:

```bash
coradb server start e-commerce
```

```text
@ coradb server start: e-commerce
This may take a long time depending on the amount of recovery works to do.
CoraDB 1.0
++ coradb server start: success
```

To start a database automatically with `coradb service start`, list it in the `server` parameter of `coradb.conf`:

```ini
[service]
service=server,broker,manager
server=e-commerce
```

## 3. Create your own database

`coradb createdb` creates the database volumes in the current directory. Give the database a name and a locale, then start it:

```bash
mkdir testdb && cd testdb
coradb createdb testdb en_US
coradb server start testdb
ls -l
```

```text
-rw------- 1 coradb dbms 536870912 Nov 17 15:04 testdb
-rw------- 1 coradb dbms 536870912 Nov 17 15:04 testdb_lgar_t
-rw------- 1 coradb dbms 536870912 Nov 17 15:04 testdb_lgat
-rw------- 1 coradb dbms       176 Nov 17 15:04 testdb_lginf
-rw------- 1 coradb dbms       183 Nov 17 15:04 testdb_vinf
```

| File | Content |
|---|---|
| `testdb` | First data volume |
| `testdb_lgat` | Active log |
| `testdb_lgar_t` | Background archive log |
| `testdb_lginf` | Log information |
| `testdb_vinf` | Volume information |

Without options, 1.5 GB is allocated (512 MB each for the data volume, the active log and the background archive log). Use `--db-volume-size` and `--log-volume-size` to change it, and [coradb addvoldb](https://www.coradb.ai/manual/admin/admin_utils.html#addvoldb) to add volumes later. See [createdb](https://www.coradb.ai/manual/admin/admin_utils.html#createdb) and [Database volume structure](https://www.coradb.ai/manual/intro.html#database-volume-structure).

## 4. Run your first queries

Open the [corasql interpreter](https://www.coradb.ai/manual/corasql.html):

```bash
corasql -u dba e-commerce
```

A **relational** query on the `orders` table:

```sql
SELECT EXTRACT(YEAR FROM order_date) AS yr, COUNT(*) AS orders
FROM orders
GROUP BY yr
ORDER BY yr;
```

| yr | orders |
|---:|---:|
| 2021 | 416 |
| 2022 | 482 |
| 2023 | 551 |
| 2024 | 675 |
| 2025 | 786 |

A **graph** query: which brands have the most followers?

```sql
SELECT b.name, COUNT(cu) AS followers
FROM MATCH (cu:customer)-[:follows]->(b:brand)
GROUP BY b.name
ORDER BY followers DESC, b.name
LIMIT 3;
```

| b.name | followers |
|---|---:|
| Nike | 209 |
| Adidas | 132 |
| Puma | 94 |

A **hybrid** query: a graph pattern (customers and their city) joined with a relational table (orders):

```sql
SELECT cu.company_name, COUNT(o.id) AS orders
FROM MATCH (cu:customer)-[:resides_in]->(ci:city),
     orders o
WHERE o.customer_id = cu.id
  AND ci.name = 'London'
GROUP BY cu.company_name
ORDER BY orders DESC, cu.company_name
LIMIT 3;
```

| cu.company_name | orders |
|---|---:|
| Hicks-Marshall | 15 |
| Jordan, Smith and Bartlett | 15 |
| Hernandez, Wilson and Johnson | 10 |

Type `;exit` to leave corasql.

## Next steps

- Learn the [SELECT statement](https://www.coradb.ai/manual/sql/query/select.html) and [graph queries with MATCH](https://www.coradb.ai/manual/graph/match.html).
- Build your own tables and graph in the [tutorial](https://www.coradb.ai/manual/graph/graph_getting_started.html), and see [Relational and graph in one query](https://www.coradb.ai/manual/sql/hybrid.html).
- Connect from an application with a [driver](https://www.coradb.ai/manual/api.html): PHP, ADO.NET, Python, Node.js, JDBC or C (CCI).
- Explore the other [query tools](https://www.coradb.ai/manual/qrytool.html).
