<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CloudKit",
  "identifier" : "/documentation/CloudKit/CKSyncEngine-5sie5/Configuration/database",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "s:8CloudKit12CKSyncEngineC13ConfigurationV8databaseSo10CKDatabaseCvp"
  },
  "title" : "database"
}
-->

# database

The associated database.

```
var database: CKDatabase
```

## Discussion

Multiple sync engines can run in the same process, each targeting a different database.
For example, you may use one sync engine for a person’s private database and another for their shared database.

> Important: When using CloudKit’s production environment, don’t create multiple sync engines that target the same database.
> You can, however, do this in the development environment to help testing — for example, to simulate multiple devices syncing back and forth.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)