> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-8a08bda2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> Page describing the `Shared` database engine, available in ClickHouse Cloud

# Shared database engine

export const CloudOnlyBadge = () => {
  return <div className="cloudBadge">
            <div className="cloudIcon">
            <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
                <path fillRule="evenodd" clipRule="evenodd" d="M5.33395 12.6667H12.3739C13.6593 12.6667 14.7073 11.6187 14.7073 10.3334C14.7073 9.04804 13.6593 8.00004 12.3739 8.00004H12.0839V7.33337C12.0839 5.12671 10.2906 3.33337 8.08395 3.33337C6.09928 3.33337 4.45395 4.78537 4.14195 6.68204C2.55728 6.76271 1.29395 8.06204 1.29395 9.66671C1.29395 11.3234 2.63728 12.6667 4.29395 12.6667H5.33395Z" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
            </svg>
        </div>
            {'ClickHouse Cloud only'}
        </div>;
};

The `Shared` database engine works in conjunction with Shared Catalog to manage databases whose tables use stateless table engines such as [`SharedMergeTree`](/products/cloud/features/infrastructure/shared-merge-tree).
These table engines do not write persistent state to disk and are compatible with dynamic compute environments.

The `Shared` database engine in Cloud removes the dependency for local disks.
It is a purely in-memory engine, requiring only CPU and memory.

<h2 id="how-it-works">
  How does it work?
</h2>

The `Shared` database engine stores all database and table definitions in a central Shared Catalog backed by Keeper. Instead of writing to local disk, it maintains a single versioned global state shared across all compute nodes.

Each node tracks only the last applied version and, on startup, fetches the latest state without the need for local files or manual setup.

<h2 id="syntax">
  Syntax
</h2>

For end users, using Shared Catalog and the Shared database engine requires no additional configuration. Database creation is the same as always:

```sql theme={null}
CREATE DATABASE my_database;
```

ClickHouse Cloud automatically assigns the Shared database engine to databases. Any tables created within such a database using stateless engines will automatically benefit from Shared Catalog’s replication and coordination capabilities.

<Tip>
  For more information on Shared Catalog and it's benefits, see ["Shared catalog and shared database engine"](/products/cloud/features/infrastructure/shared-catalog) in the Cloud reference section.
</Tip>
