Fireship · @fireship

MySQL with Firebase?

Uploaded August 8, 2019 · Length 14:01

MySQL with Firebase?

Summary

Learn how to integrate MySQL with Firebase using cloud functions and TypeORM.

  • mysql with firebase
  • firebase cloud functions
  • typeorm
  • sql database
  • google cloud sql

Transcript preview

The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.

  1. 0:00

    I gotta check this out MySQL is the most

  2. 0:12

    popular database flavor in the world

  3. 0:14

    how are you millions of WordPress blogs

  4. 0:16

    and large complex enterprise

  5. 0:17

    applications today you'll learn how to

  6. 0:19

    combine cloud functions along with

  7. 0:20

    Google Cloud SQL to build an entirely

  8. 0:23

    server list cloud database and we'll

  9. 0:25

    combine it with an awesome tool called

  10. 0:26

    type o RM which will help us efficiently

  11. 0:28

    model in query relational data using

  12. 0:30

    nothing but typescript and nodejs

  13. 0:32

    if you're new here like and subscribe

  14. 0:34

    and congrats to Fabian how listen you're

  15. 0:36

    the t-shirt winner from last week's

  16. 0:37

    video

  17. 0:38

    send me your details on slack and if you

  18. 0:40

    missed out just leave a comment below

  19. 0:41

    because I'm giving away another t-shirt

  20. 0:43

    with this video let's go ahead and start

  21. 0:46

    by addressing the obvious question of

  22. 0:47

    why would you ever want to use a MySQL

  23. 0:49

    database with firebase the platform

  24. 0:51

    already has fire store which is a fast

  25. 0:53

    and expensive database that scales out

  26. 0:55

    of the box while fire store will take

  27. 0:57

    care of the majority of your relational

  28. 0:59

    data modeling needs there may be times

  29. 1:00

    when an SQL database is just the better

  30. 1:03

    tool for the job

  31. 1:04

    or you might just be working with a

  32. 1:05

    legacy database where you have no choice

  33. 1:07

    in the matter no matter what the use

  34. 1:08

    case my goal today is to show you how

  35. 1:10

    easy it is to integrate mysql with

  36. 1:12

    firebase the first thing you'll learn is

  37. 1:14

    how to provision a cloud SQL instance

  38. 1:16

    and then how to connect it to the cloud

  39. 1:18

    functions environment the second big

  40. 1:20

    thing you learn is how to use a tool

  41. 1:22

    called typo RM which provides object

  42. 1:24

    relational mapping with typescript and

  43. 1:26

    this allows us to completely manage our

  44. 1:28

    database structure and queries without

  45. 1:29

    ever having to write a raw SQL query and

  46. 1:32

    using a tool like this will dramatically

  47. 1:33

    increase your productivity and developer

  48. 1:35

    happiness the feature we're building

  49. 1:38

    today is a collection of HTTP cloud

  50. 1:40

    functions that allow us to read and

  51. 1:41

    write to the database our database

  52. 1:43

    contains a hippo table and those hippos

  53. 1:45

    can own many hats but the hats live in

  54. 1:48

    their own database table so we'll need

  55. 1:49

    to build a join query to join all that

  56. 1:52

    data together into a single request

  57. 1:53

    you'll need a few things to get started

  58. 1:56

    with this project first you'll want to

  59. 1:58

    have a firebase or a Google cloud

  60. 1:59

    platform project and then I highly