---
title: database
framework: cloudkit
role: symbol
role_heading: Instance Property
path: cloudkit/ckdatabaseoperation/database
---

# database

The database that the operation uses.

## Declaration

```swift
var database: CKDatabase? { get set }
```

## Discussion

Discussion For operations that you execute in a custom queue, use this property to specify the target database. Setting the database also sets the corresponding container, which it inherits from CKOperation. If this property’s value is nil, the operation targets the user’s private database. The default value is nil.
