What are the various possibilities to use MySql in a desktop applicaion - mysql

Can MySql database be used as a back-end of a desktop application. What are the various possible ways to do it?

I would say that it would be possible, with each desktop application client connecting to a centralized mysql database, at the client site, or possibly connecting to a centralized server managed by you/your company, and like #Neil Butterworth mentioned there are various APIs/methods to use to talk to the database. However, if you are looking to embed a database with your application, I would suggest looking at sqlite instead. It is a small,lightweight relational database designed for being embedded into applications.

To add to nstehr's answer, see:
SQLite vs MySQL
How scalable is Sqlite
How do databases work internally

Yes, I have done so on more than one occasion. Build your database in MySQL, either locally or on a remote machine, and then set up your connection to the database using the appropriate API.
There is a package for connecting to a .NET application (just search .NET MySQL library and it should turn up), with Java you can use Hibernate (or any other ORM Framework) and set the dialect to whichever version of MySQL you're using in the hibernate.config file. Or you could just use ODBC/JDBC directly. I'm sure other languages have their own support.
Any application, if built well, should be able to be supported by a variety of databases, and it should not affect the application. Switching between databases should involve changing a couple of property files at most, and then testing for database-specific idiosyncrasies.

Can MySql database be used as a
back-end of a desktop application
Yes, of course - just like any other database.
What are the various possible ways to
do it?
What do you mean? Do you mean how to access the database from the app? Lots of ways - some are:
via its native C API
via ODBC
via JDBC
Which one you use will of course depend greatly on which language(s) your desktop app is written in.

Related

How can I connect my react native app to MySQL server?

I'm creating a mobile app for an existing website and trying to connect to a local instance I have running on a MySQL workbench. I've seen others recommend against the use of MySQL but I'm stuck with it, since that's the current database. I'm using expo to run my React Native code. Do I need to use a server, like "MAMP?"
Let me know if there is any more info that is needed.
You cannot connect your app directly to your database.
You will need a server/API that acts as an intermediate between the app and the DB. You can code it in most programming languages and if you know PHP, having MAMP on your system will allow you to build your API with PHP.
I've seen others recommend against the use of mySQL
You should definitely question their reasoning. I've been using MySQL for many years now in small and big projects and it has never been an issue. If they're comparing it to non-relational DBs like Mongo, I can understand, it's easier to setup and maintain a NoSQL database than a relational one.
I assume you're not that experienced but I still purposefully used some terms that may be new to a beginner. Since I don't know your skills, I will refrain from pointing you to specific tutorials/articles.
I recommend you to Google anything you don't understand from this answer.

What database for Data Acquisition?

I have to develop a database that will be used for data acquisition, mainly measurements from micrometer which will be compared against a Reference Table inside the db. The platform is OS X. I have been looking at Valentina-DB, SQLite and even MySQL.
My main requirement is: The database will be used by factory workers which may not have a lot of experience in using software. Therefore, the front-end has to be extremely easy to use. This includes installation of the database and the front-end.
What are my options when it comes to custom GUI apps?
Most of databases have no GUI front-end to use "by factory workers for data acquisition" so you need to program it yourself.
One of the approaches would be to use Java Swing GUI and some Java-based database like Apache Derby maybe. You could put everything into runnable jars, talk to database exclusively directly (not network setup, no authentication) and Java is available on OS X form Oracle website. Seems relatively easy to setup and would also run under Windows if at the end desired. This is not the only possible approach but something that is likely to work.
There are many possible alternative approaches.

iOS and Mac OSX communicating with MySQL database

I have a client who wants a control panel for the app I am developing them. The control panel is a Mac OSX application that allows the user to submit files (excel docs and such) to my MySQL database. Those files are then checked by the iOS app I have created for them.
I have no idea how to do this. I have the MySQL database all set up, and I have looked everywhere for a solution. Any help is appreciated.
I wouldn't try to connect to your MySQL database directly from your cell phone. It's a bad design for several reasons. Instead build a API on the same server as the MySQL database. It doesn't matter if you do it in java, php, c# or anything else. You might even find some product or open source project that can do this automatically. I've listed some benefits of doing it this way
It makes testing easier. You can write a test framework against your API that doesn't rely on or is using a phone.
It makes development faster. You don't need to emulate or use a phone to develop and test your table design and queries.
It gives you compatibility. When you need to change your database (and you do) you can create new APIs that the new version of the app uses while and old version still out there can continue to use the old API (that you might have to modify to still provide the same functionallity)
It gives you flexibility. If your user base grows and you might need to have replication for reads or sharded databases you build that into the API instead of into the app which is just a better way to do it.
One option would be to use PHP to handle all the database interaction.
Host the scripts on the server and just have the apps call them and get the scripts to return some sort of parseable response (I'd go for JSON).
I have never found a suitable Object-C based connector for MySQL. At this point I would suggest using a C/C++ connector. There's lots of examples of how to configure the connector for both C and C++. The hard part will be all of the data passed from the MySQL code and the Object-C code will that it will have to be in C types.
EDIT: An Example

Does Rikulo support mysql database?

I know rukilo is an UI framework for Dart language but I wonder if it supports to use Mysql? And if it is, how to connect mysql with Dart? Thank you
We are developing Rikulo ORM to simplify the database access (but it is not opened yet). The first version will be built on top of WebSQL (SQLite) and IndexedDB. We do have a plan to bridge it to the backend server such as MySQL. Of course, there are some security and performance challenges to deal with.

Experience with direct data access components

I would like to know as to what has been the experience of using direct data access components like devart's MyDAC which allows a direct connection to the mysql server rather than through the client library or ODBC.
With AnyDAC you can acess almost all popular databases (MySQL, SQL Server, Oracle, Firebird, PostgreSQL, DB2, SQLite, ...). High-speed native direct access, many unique futures, unified API for access to cross-database features, excelent support.
I've never used MyDAC before. My experience is with DAC for MySQL from http://www.microolap.com/.
So far so good. Pretty easy to drop onto my Delphi projects, set the values of various properties, and then ready to connect. It has quite a number of useful components that allows you to retrieve data in several ways and you can use it easily with TDataSource.
No issues with deployment as well. All compiled nicely into one EXE.
Hope this helps!
Mydac is the best when you try to connect to MySql, it's fast stable and real powerful components.
Also the same for other components like Sdac and Odac.
and if you would like to use more than database you can use Unidac, which you can use to connect to (oracle, Sql server, Mysql, Interbase, Firebird and ODBC drivers.).
Another great point for Devart components that you don't need client library to be installed on the clients machine (libmysql.dll).