PostgreSQL and Postgres Plus databases in Bungee-powered apps


Today we announced support for PostgreSQL and Postgres Plus databases in Bungee-powered applications. This new capability represents another step toward providing developers with the most flexibility in managing, hosting and using their data in Bungee-powered applications.

Working with SQL-based databases inside of Bungee Connect is pretty straight forward. There are several tools to help you, such as:

SQL Console.png

  • SQL Console – Work directly with the database during development using the database console. Simply type in your statement and see the returned results below. This is a very handy way to work with your database, including adding/removing tables or columns or test out statements from your application.
  • Event Viewer – Through the event viewer you can see the statement sent to the database server and the results that were returned. During simulation the event viewer will log all the requests to the server and the responses, making it easy to debug your application and ensure it is doing exactly what you expected.
  • Connection Config – Simply enter your credentials and you’re connected. Of course, you can switch between sandbox and production environments programmatically.

Just this week we have also released a developer sample application powered by MySQL. This article covers this storefront developer sample. Note: When you import the sample application a sandbox database will be automatically created for you, simply simulate and get started.


The documentation team has also been hard at work documenting the integration of SQL databases into Bungee-powered applications. You can find that documentation here. Though written for MySQL you can use it for PostgreSQL databases, the concepts are the same with a few slight differences.

Postgres has a schema layer within the database. Tables are within the schema. When querying a database table you need to include the schema in dotted notation before the table name. Where the MySQL query would be “select * from itemsTable” the Postgres query would be “select * from schemaName.itemsTable”.

MySQL uses the lastInsertID function to get the primary key for the most recent inserted row in a table. For Postgres, you need to query such as “select currval(‘schemaName.tableNameidColumnNameseq’)”. Where schemaName, tableName and idColumnName are replaced by the values of your schema, table and column name. This query can be executed using the queryOneResult function which will return the id of the last inserted row.

As always, we are interested in your feedback on this new capability and how Bungee Connect can better meet your needs.



  1. Brad,

    I think what you guys are working on is very cool. But this announcement greatly confuses me…

    If I am reading this correctly, I can now build BC apps using MySQL, Pg, and Pg+. Huh? The big appeal to me of PaaS is that I no longer need to worry about these kinds decisions. I am confused as to why I should care what the underlying DB is when building an app on BC.

    I thought BC was all about abstracting out this kind of mess, quote from above:

    “Where the MySQL query would be “select * from itemsTable” the Postgres query would be “select * from schemaName.itemsTable”.”

    Refer to your whitepaper “The Next Evolution in Web Apps”, page 8. I understood where you guys were going (left side picture, generic “persistence”), but now it looks like you are back over to the right-side picture (Vendor D DB, Vender E DB).

    No disrepect, just confused! Can you explain?


  2. Peter,

    You make a great point. You’re right, Bungee Connect is all about abstracting out the messiness of building an application.

    We have added this connectivity to existing databases to provide the maximum amount of flexibility. We aim to give developers the greatest amount of choice in using their data. A problem we wanted to avoid was requiring you to move all of your data to a Bungee Connect database. By enabling this functionality you can continue to use your existing investments in databases and maintain the ability to re-use that data outside of your Bungee-powered application.

    If you are looking for a database that you don’t need to host you could consider Amazon SimpleDB. A couple months ago we released a sample application for SimpleDB, here:

    This is just the first installment, as our database connectivity evolves we will abstract even more for you.


  3. Hi Brad – thanks for the follow up.

    I thought the announcement was saying that BC is now *hosting* databases, Pg and MySQL specifically, within the BC environment.

    “Bungee Labs™ today announced […] Developers of Bungee-powered applications can connect to existing and new Postgres databases in a cloud-based development and hosting environment, providing organizations the flexibility to control how and where business data is stored.”

    The “new Postgres databases in a cloud-based dev and hosting env” is what I mistook for a hosting offering.

    Your response indicates that this is a *connect* capability to databases outside of BC, not hosted within BC. OK, now I get it.


  4. jcmmartin said

    I think it is a good new. For when will we have a bungee DB ownership?

    Jose Carlos

  5. Ted Haeger said

    If you’re asking when Bungee Connect will offer data hosting as part of our service offering, the best answer I can provide right now is, “Not yet.” 🙂

    We have been getting this inquiry an increasing amount lately. As I see it, data is part of a full service platform. However, there are several other initiatives that the team here is working on, so we’re not ready to make an announcement for when (or how) we will provide database hosting.

    Stay tuned to this blog. When the time comes, we will announce our intentions here.

    Director, BCDN

  6. carlos said

    Hi Ted,
    As you say data is part of full service application platform and i think if bungee had a Bungee DB would be the best situation , if not at least data hosting is a good idea.

RSS feed for comments on this post

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: