Prisma Data Platform - Prisma ORM on Cloud
Tags: database, postgres, cloud, opensource
Published: 2021-09-02 04:50:19

[Prisma](https://www.prisma.io/?utm_source=Prisma%20Ambassador&utm_medium=Blog%20post&utm_campaign=Prisma%20AP%20Somsubhra%20Dass) Data Platform is a cloud based service which allows developers to try the Prisma ORM, run queries on cloud environment without the need to install Prisma Client locally on the developers' computer.


## Features of Prisma Data Platform

- Free database provisioning
- Pre defined model schema templates
- Run and test Prisma Queries on the data
- Collaboration between team members
- Data browsing capabilities

## Getting Started

To get started, visit [Prisma Data Platform](https://cloud.prisma.io/), sign in with your GitHub Account and click on **New Project**. From here, we may choose to go in two different ways:

- Create new project from scratch
- Import existing project from GitHub

### Creating Project

Creating a project is simple on Prisma Data Platform. Once you create the project on Prisma Data Platform it will simultaneously create a GitHub Project for it.

![Project create](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nz9g9w8jc388fbmn3sj0.png)

![GitHub Project](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vircta7a7x1j9wmwtqft.png)

### Creating Database

Prisma Data Platform can automatically spin an app instance on heroku and create a PostgreSQL database instance as well. You may connect to an existing database as well.

![Database Creation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p1qts21h2hs80re9k1c4.png)
![PostgreSQL Heroku Add-on](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yrmetfkl8l1x2h82euse.png)

### Creating Schema

One of the great features of Prisma Data Platform is that it provides  pre written schemas for our database. We can even customise the schema if we want. Also it loads sample data to our database so that we can try out our queries on those data.

![Prisma cloud Schema](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2940a7xgkdhd29q5lfux.png)

For this blog, I would be using the **URL Shortener template**.

Once the schema has been created, it pushes the `schema.prisma` file to the GitHub Repository and also adds a `Readme.md` file to the repo which contains all the instructions for setting up and running the project locally and also the Database **ER diagram** for ready reference like the one shown below:

![ER Diagram](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7i1s3dpt7vp09t54gjvl.png)

This ER Diagram is generated using:
- [Prisma DBML Generator](https://github.com/notiz-dev/prisma-dbml-generator)
- [DBDiagram.io](https://dbdiagram.io)

## Prisma on Cloud Functionalities

The Prisma on cloud contains several functionalities such as
- Guide to Local Setup 
- Data browser (Prisma Studio)
- Query Console

### Local Setup

Prisma on Cloud gives a robust documentation to setup the same project on your local development environment with the option to setup local database or connect to a remote database.

![Local Setup](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oofuuhdyi4nj6xaw0hlc.png)

### Data Browser

Prisma on Cloud provides **Prisma Studio** out of the box for data browsing on cloud. It helps developers edit data in database tables without a local database client.

![Prisma Studio](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pvvh6i1tp2uwuxvv6u4g.png)

### Query Console

The query console is the heart of Prisma Data Platform. It allows us to write and try out complex queries on the sample dataset. It can even serve as a scratch pad for your queries during the development phase of your application. It helps to instantly get output of a query without having to write APIs and console logs for the same.

![Query Console](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9j0or271u8twymp0dcip.png)

The Query console supports code highlighting, auto complete, auto saves queries and also code linting features.

### Collaborate with users

Prisma on cloud also allows developers to collaborate with fellow developers, just by inviting a GitHub user to the Prisma Project. It also gives various types of permissions for collaborators such as Admin, Developer, Viewer etc which grants restricted access to the Prisma project.

![Collaborate](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c4knd0rcj6i7b35a6pko.png)

Admins can even modify access of collaborators and can remove them from project if at some point they think it's necessary to do so.

## What's next for Prisma Data Platform?
- Support for other database dialects
- Multiple environments support to facilitate and organise projects and initiate workflows between them
- Insights such as query times, generated SQL Script about the Query ran in the Query console
- Telemetry events integration from Prisma queries to 3rd party external services supporting Open Telemetry Framework
- Insights about list of queries in the application

**[Please note: All the above mentioned points are subject to change and are not guaranteed]**

## Contribute to Prisma

Prisma ORM is Open Source and available publicly on GitHub. If you want to contribute to the Prisma check out their GitHub Repository by clicking [here](https://github.com/prisma/prisma).

##### Similar Articles:
Check out my previous blog on Prisma MongoDB Connector [here](https://dev.to/somsubhra1/journey-from-mongoose-to-prisma-orm-for-mongodb-3j21).