I'm trying to develop an Android app that provides information on a chosen topic. All the information is stored on a MySQL database with one table for each topic. What I want to achieve is that when the user chooses a topic, the corresponding table should be downloaded to SQLite so that it can be used offline. Also, any changes to that particular table in the MySQL should be in synced with the SQLite db automatically when the phone connects to Internet the next time.
I have understood how to achieve the connection using PHP and HTTP requests. What I wanna know what is the best logic to sync any entries in a particular table in MuSQL database to the one in SQLite. I read about using various sync services but I don't understand how to use them. All my tables have exactly the same schema so is there an efficient way to achieve the sync ?
I have a decent knowledge in SQL but I'm kinda new to Android.
Related
We have one big MySQL database and when making request and getting data from that data base it's took so long to to that. So what we want is there should be a CouchDB or MongoDB cluster that serves as a slave and layer between the MySql and website. When we make request to database that should not come from the database but the replicate CouchDB and when we post a data to the database that should go to CouchDB. We think of setting up a cron job for data synchronization between CouchDB and MySQL database. Is there any way of making this? Any suggestions? I only know one table of the database which is 625k long table and it almost takes 5 mins to getting and posting the data. Our website is built with Laravel so I just wanted you guys to know it for better understanding over the situation.
I am making a system.. an inventory system and I want it to have an online and offline mode.I want to have an offline for it so that I can insert, delete and edit data even there's no internet connection.
Moreover, I want to merge the data from local database with the data from the online database when there is an internet connection. How to do it with Php and mysql?
Can anyone help me to solve this? Do you have an idea on how to do this staff?
You can add uuid (guid), datetime and operation (insert,update,delete) column on every table. Systems must save every successful sync date time to anywhere.
You can sync all table rows after last successful sync when has connection. But two different system changing same row is problem in this methodologies. My be you can design system with insert&delete instead using update.
I seen many questions posted but not these two exactly. I also tried reading the Wikipedia definitions but I don't have enough technical understanding to know what it is saying exactly.
I am looking for a database solution where the User of a website can enter customized data into the columns in an Order.tbl and link it to their account in the Account.tbl.
Scenario:
I make customized shirts. The user would need to log in to their account and order customized details such as pictures and personalized text which could differ from User to User. It would need to be dynamic in this way versus a static selection of shirts.
The software I use to make the shirts can connect to an MS Access database, SQLite database, mySQL database and a few other flat file databases like Excel and CSV.
Currently my software subscription is with Access and SQLite and was informed that Access would not work in my case because I am using web forms. Which leaves me with SQLite or upgrade to handle mySQL.
The only thing I really understand is that mySQL is more robust than SQLite but I am unsure if I actually need it or not.
Any suggestions for a beginnner?
I have a huge Database on the server and i need that DB in SQLite so that i can use it in my application in android as well as in ios app.
I got one solution for this when i go to phpmyadmin and select my db on server i exported the Tables one by one into CSV file and then imported those in my SQLite Browser one by one to get all the tables (And Then corrected column names and type manually by editing every table columns).
This way i made it as a .sqlite DB to be used in the app.
But i want to know more on these points below :
Is their some kind of a backend application that most developers use to convert their DB into SQLite DB. (If yes then what kind of stuff do they use)
Is their any PHP script that can do this stuff. (If yes then what script is used and how ?).
Is their any other simple way to deal with this problem of getting SQLite DB from the server. (If yes then what are the possible ways to do this ?).
Can any one get me some idea about this ?
I am working on a web application (PHP + Doctrine + MySQL) to sell. The problem is that there is information that the clients will need from my central data source and they will have information that they don't want me to see (financial and such).
My Question, what is the best way to get that information to the customer application?
My Initial Thoughts:
The application I am creating is built with Doctrine. I think I can create a connection to two databases by using something like (let me know if you know exactly how to do it):
$this->setTableName('host.dbname.tablename');
The problem with this is that I would have to open up the MySQL port, which a hosting company may not do for me nor may it be safe. Let me know if this is not so.
So I thought about setting up a php-cron job that will download the new data every day (daily would be sufficient). This would require some sort of php page on my data source to output the files. The problem with this is figuring out what information the client app has and updating it.
Edit: I just read about Federated Tables. This may be another solution if I can get the host to open port 3306.
Thanks
Create a view at the finance database to the table in question, then create a federated table at your web source database based on that view. If all you're going to do is read, then your web user only needs SELECT privileges.