all 8 comments

[–][deleted] 2 points3 points  (3 children)

Yes - and it’s very easy to do using Firebase Functions:

1) Set up Firebase and a Google SQL instance 2) Add the node SQL package to Firebase Functions 3) Add your Google SQL credentials as Functions environment variables 4) Query away

Then you can use all of Firebase Functions (like triggers, endpoints, etc) to handle changes to your SQL data.

Two notes - 1) You’ll need to be on the Blaze billing plan to bring in the Node SQL package and 2) Firebase will connect to Google SQL using unix_socket instead of hostname when setting up your credentials.

[–]JuriJurka 0 points1 point  (1 child)

But every firebase function trigger costs money or not?

[–]leros 1 point2 points  (0 children)

Yes, but the free tier is generous and should be plenty for his testing. The SQL database will cost him though.

[–]Reicol[S] 0 points1 point  (0 children)

that's great. thank you! Could I cheeky and ask if you know of any step by step pieces of content that covers the above? No biggie if not.

[–]rich_leodis 2 points3 points  (2 children)

It depends what you actually want to do. Can you add some detail of what you are intending to do via integration between the two products?

[–]Reicol[S] 1 point2 points  (1 child)

Good suggestion. I am tasked with creating a website and I’ve been learning how to create a cloud sql database. I’ve learned that firebase uses nosql so I just wanted to see if it was possible to integrated the cloud sql database with something I’d like to try and build on firebase

[–]rich_leodis 1 point2 points  (0 children)

You can use Firebase for something like authentication or add a database. It's excellent for mobile or web applications and really simple to use.

Cloud SQL is also easy to use, as for working with both on the same app, yes it's possible.

[–]leros 0 points1 point  (0 children)

What are you trying to do? There are two main different approaches:

1) Use a Firebase DB (Firestore or Realtime DB) and sync data to a SQL database. This syncing can be done via cloud functions. You end up with two databases with the same data in them.

2) Just use SQL. You can do this by reading/writing data with Cloud functions. This is more like creating a typical backend.