---
title: CKDatabaseOperation
framework: cloudkit
role: symbol
role_heading: Class
path: cloudkit/ckdatabaseoperation
---

# CKDatabaseOperation

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

## Declaration

```swift
class CKDatabaseOperation
```

## Overview

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 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](cloudkit/ckdatabaseoperation/database.md)

## Relationships

### Inherits From

- [CKOperation](cloudkit/ckoperation.md)

### Inherited By

- [CKFetchDatabaseChangesOperation](cloudkit/ckfetchdatabasechangesoperation.md)
- [CKFetchRecordChangesOperation](cloudkit/ckfetchrecordchangesoperation.md)
- [CKFetchRecordZoneChangesOperation](cloudkit/ckfetchrecordzonechangesoperation.md)
- [CKFetchRecordZonesOperation](cloudkit/ckfetchrecordzonesoperation.md)
- [CKFetchRecordsOperation](cloudkit/ckfetchrecordsoperation.md)
- [CKFetchSubscriptionsOperation](cloudkit/ckfetchsubscriptionsoperation.md)
- [CKFetchWebAuthTokenOperation](cloudkit/ckfetchwebauthtokenoperation.md)
- [CKModifyRecordZonesOperation](cloudkit/ckmodifyrecordzonesoperation.md)
- [CKModifyRecordsOperation](cloudkit/ckmodifyrecordsoperation.md)
- [CKModifySubscriptionsOperation](cloudkit/ckmodifysubscriptionsoperation.md)
- [CKQueryOperation](cloudkit/ckqueryoperation.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
