---
title: Realtime Database
description: Hooks for integrating with Realtime Database.
---

# Realtime Database

The `@react-query-firebase/database` package provides hooks fetching and mutating data on Realtime Database.

## Installation

```bash
npm i --save @react-query-firebase/database
```

## Usage

To use the hooks, export your `Database` instance, e.g:

```js
import { initializeApp } from 'firebase/app';
import { getDatabase } from 'firebase/database';

const firebase = initializeApp({
  ...
});

export const database = getDatabase(firebase);
```

## Documentation

- [Querying Data](/database/querying)
- [Data Mutation](/database/data-mutation)
- [TypeScript](/database/typescript)
