Designing & Deploying a PostgreSQL Database in the Cloud
Our users sometimes say to us: “Vertabelo is awesome but... how can I add the data?” Oh, come on! Vertabelo is not a database engine or a database administration tool. At least not at the moment. For now, Vertabelo is intended mainly to design database models. This doesn't mean that we don’t care about what you can do next with models created in our application. Of course, we do! That’s why we provide our users with some useful tools on our website and in our GitHub repository.
But back to the question at hand. Suppose you’ve got a database design and you’ve choosen PostgreSQL as the target database. You want to test the design, pour in some data, and give it to a team of developers. Here is a short instruction on how this can be done in the Cloud.
There are few DBaaS (Database as a service) solutions on the Internet, ElephantSQL.com being one of them. I’ve choosen ElephantSQL.com because it is very similar to Vertabelo. It’s simple, fast and it works :D. ElephantSQL is a frontend to various hosting solutions. Through one user interface you can create a PostgreSQL database in seconds.
Let’s prepare the ElephantSQL database:
Sign up in ElephantSQL. It’s straightforward:
Create a database.
You’ll need to pick a name, choose a plan and select a location. I’ve chosen the free plan. Be aware that the free plan is available to a limited number of geographical locations.
On the details page you’ll see connection parameters:
You may connect using the command line tool (psql):
Or using PgAdmin:
OK. You’ve got a running database. Now it’s time to fill it with objects designed in Vertabelo. First, log in to your Vertabelo account and open your database model (if you don’t have a Vertabelo account yet, you can choose a free trial plan).
Once your database model is finished, you need a SQL script. You’ve got two options to obtain the script:
Generate script manually by clicking the SQL icon in the top toolbar:
You can also use a Vertabelo API or one of its clients:
Now it’s time to run this script against the database:
You can choose PgAdmin. Just open the script and click the Play button:
Or command line client:
As you can see, creating the database is quite simple. Most of the steps are done in the Cloud. Tighter integration between Cloud databases and Vertabelo could eliminate the need for desktop tools at all, giving you 100% Cloud-based database design and deployment.
Do you like working in the Cloud? Do you think Vertabelo should support database deployment? Let us know in the comment section!