从mysql将数据迁移到Firebase [英] Migrating datas to Firebase from mysql

查看:106
本文介绍了从mysql将数据迁移到Firebase的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不太明白 firebase

我当前的情景:

拥有一个使用 - PHP Mysql

Having a Web app that uses - PHP and Mysql

要求:

创建混合移动应用使用离子框架并学习这是一块蛋糕,因为我已经知道 AngularJS

Creating a Hybrid Mobile App using Ionic Framework and learning that was a piece of cake since I already know AngularJS

现在出现了困难的部分:

Now here comes the hard Part:

我希望数据得到 sync 在移动应用和网络应用之间。经过大量的谷歌搜索后,我提出了两个想法:

I want the datas to get sync between mobile app and web app. After a lot of googling I cam around two ideas:

1)使用Firebase 或2)使用PouchDB

面临的困难:

如果我必须使用 PouchDB 然后我将不得不在服务器中使用 CouchDB 这是非常困难的我想替换现有的 mysql

If I have to use PouchDB then I would have to use CouchDB in the server which is quite difficult I suppose replacing the existing mysql.

所以,使用firebase,我必须将所有 DB 数据导入Firebase并使用一个 javascript firebase客户端用于同步

So, Using firebase, I have to import all my DB datas to Firebase and use a javascript firebase Client for synchronising

所以我的问题是:

1)将数据导入firebase后,如果在 mysql数据库中发生任何进一步操作 firebase如何会知道我的变化吗?因为,我的 PHP 脚本连接到现有的 mysql 数据库。??

1) After importing datas to firebase, If any further operations occurs in mysql database how the firebase will know of my changes? Because, my PHP scripts connect to the existing mysql database.??

2)我是否还需要更改 PHP 脚本?

2) Do I have to change my PHP scripts too?

推荐答案

据我所知 - 一旦您切换到使用Firebase(因此,您将所有现有数据移植到Firebase),那么所有进一步的通信都将与Firebase进行本身 - 您将不再需要您的MySQL数据库。

As far as I know - once you would do the switch to use Firebase (so, you would port all your existing data to Firebase), then all the further communication would be with Firebase itself - you would not need your MySQL database anymore.

此外,您不必再使用PHP脚本了,因为您可以通过firebase进行所有操作您在Angular中的控制器。

Also, you wouldn't have to be using your PHP scripts anymore because you can do all the manipulation with firebase via your controllers in Angular.

这篇关于从mysql将数据迁移到Firebase的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆