<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CloudKit",
  "identifier" : "/documentation/CloudKit/CKDatabaseOperation",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "c:objc(cs)CKDatabaseOperation"
  },
  "title" : "CKDatabaseOperation"
}
-->

# CKDatabaseOperation

The abstract base class for operations that act upon databases in CloudKit.

```
class CKDatabaseOperation
```

## Overview

Database operations typically involve fetching and saving records and other database objects, as well as executing queries on the contents of the database. Use this class’s [`database`](/documentation/CloudKit/CKDatabaseOperation/database) property to tell the operation which database to use when you execute it. Don’t subclass this class or create instances of it. Instead, create instances of one of its concrete subclasses.

## Topics

### Accessing the Database

[`database`](/documentation/CloudKit/CKDatabaseOperation/database)

The database that the operation uses.



---

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)