What database for Data Acquisition? - mysql

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.

Related

Is there any database system which I can use it without installation

I am designing a small program, which I want to use a database to manage my data. I want a database which I may put it into my system, so that users may use it without install any database system.
So is there any database suit for my project requirement?
Programming Language: Java
Platform: cross-platform (linux, windows, mac)
There are three reasons why I want to use an embedded database system
there is not too much information in my system
what I wish it user may directly to use my system without to setup any database
I also wish when I copy my system from computer A to computer B, it may keep all data
besides database, I also consider to manage data with XML file, but I don't think it is a good idea to use XML, because it is not easy to update or delete data.
AND this is my first time to use stackoverflow, so there are some culture I am not very clear. If I offended stackoverflow, please forgive me.
I use h2 in java.
For following scenario:
h2 is really small (about 1Mb), it is easy to copy, and easy to use with maven, gradle, etc.
h2 is pure java db, when I want to write unit test on my DAO java code, it is easy to start.
h2 can simulate oracle dialect、mysql dialect. After I built a demo with h2, it is easy to move all java code to work with a big DB system.
In H2 jdbc URL, it is easy to config a init SQL script in a file. By this feature, It is easy to create a clear database with only necessary data in it.
When you want to share your data, you can simply release your database file with your production, which is difficult for Oracle or MySQL.
Another real example is Atlassian Confluence. You may download and install Confluence, start it with h2 for trial. When you decide to use it in business, set it up to connect MySQL or Oracle.
SQLite is a common choice. You can embed the database core functionality as a library in your app. The only local resource required is plain vanilla files on the normal file system -- no drivers, daemons etc.

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

What components to use when connecting to a mySQL Database on a webserver

I, want to develop an application that can access my database on my website. I want to know what components can I use to access, insert and update records in my database. Im using a mySQL database on a unix server. The application will be running in windows.
Without understanding well what you mean by what components you need (other than TDataset et all), all I can do is to refer you to this article:
How to set up the dbGo (ADO) ConnectionString for mySQL database
If you have some cash available, I heartily recommend you get the AnyDAC components. I've heard that the DevArt components are also good, but I have no experience with them.
I would highly recommend http://www.devart.com/unidac/ very easy to setup and it supports multiple databases.
We've been using them for over 2 years and we're very comfortable with it.
AnyDac is the best and it's definitely worth buying. I've had plenty of experience with multiple components (AnyDac,UniDAC,SQLDirect,SDAC) and AnyDac has proved its value.
In comparison Anydac is faster, you have the ability to scale up your application to N-tier, supports more systems, has Free Pascal support.

Interface between CardDav server and MySQL database

My web app uses mysql to store contact data. I'd like to sync this data via carddav with mobile devices. I understand carddav is based on a file system, not a database. What software is available to act as an interface or wrapper to make the carddav server work with mysql? or other relational database?
You might want to take a look at Bedework.
Baikal just added this feature!!!
Most dav servers are file system based. If you use SabreDav you can build a virtual filesystem based on your own backend. Baikal is a project that uses sabredav, and a virtual file system. Until recently it stored its data in sqllite. Now it supports both mysql and sqlite.
Its still not 100% mature, but its a great starting point. Playing around with it, I have been able to create contacts directly in the DB (by uploading vcard blobs to a table) and then having them show on my ipad addressbook.
After evaluating many systems, ones built on sabredav like baikal tend to be the simplest to build on. Fruxx is something else you may also check out. Its a hosted system, but will soon have an api.
Last if you are looking for a very elaborate system, then take a look at tine20. It supports activesync (illegally in the usa), carddav, caldav, and has a decent extjs web ui. It natively stores contact information in its mysql store, which is nice since you can update a contact through a sql statement without having to build a vcf file. Where tine doesnt make sense is that it uses a bit more resources because of all the features it offers, and the complexity has ensured that it has a VERY complicated database schema. In other words, you are probably better off creating a rest api on the tine source code rather than doing bare sql inserts.
http://baikal-server.com/

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

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.