Within the Firebase console you can assign these broad roles to the collaborators on a project:

As you can see, Database and Storage are in the same role here, so you can't assign different permissions for them.
Luckily you can also define a custom role in the Cloud console, which allows you fine grained control over what a collaborator can do.
You'll want to read the documentation on granting, changing and revoking access in the Cloud documentation, and then build a role that has the necessary Firebase product-level predefined roles. Since you want the collaborator to only have access to Realtime Database, you'll need one of these:
Role: Firebase Realtime Database Admin
roles/firebasedatabase.admin
Description: Full read/write access to
Realtime Database resources
Realtime Database Admin permissions:
firebasedatabase.instances.create
firebasedatabase.instances.get
firebasedatabase.instances.list
firebasedatabase.instances.update
Role: Firebase Realtime Database Viewer
roles/firebasedatabase.viewer
Description: Read-only access to Realtime Database resources
Realtime Database Viewer permissions:
firebasedatabase.instances.get
firebasedatabase.instances.list