Experience with direct data access components - mysql

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).

Related

Connect to Embedded MySQL from Delphi XE3

How could I connect to Embedded MySQL server (libmysqld.dll library) from Delphi XE3? For now I know only one way – use DevArt MyDAC components (specific TMyEmbConnection), but it is paid what is unacceptable for my task now. Try to use dbExpress, but not successful.
So, I have two questions:
1. Can I use dbExpress or any other components from Delphi XE3?
2. Any third-party components (prefer free)?
Thanks
I've used ZeosLib for that in the past.
Worked quite well actually, although really soon it turned out that it was easier to have a central database.
Several people wanted to use the application, and then they wanted to share their changes, and keep things in sync, etc. Luckily, switching to a mysql server was not much more work than copying the data, and changing the connection component parameters.

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.

How to use different providers for Linq to entities?

I'm trying to familiarize myself a bit more with database programming, and I'm looking at different ways of creating a data access layer for applications. I've tried out a few ways but there is such a jungle of different database technologies that I don't know what to learn. For instance I've tried using datasets with tableadapters. Using that I am able to switch data provider rather easily (by programming against the interfaces such as IDbConnection). This is one thing I would want to achieve. But I also know everyone's talking about LINQ, and I'm trying to get to know that a bit better too. So I have tried using Linq to Sql classes as the data access layer as well, but apparently this is not provider independent (works only for SQL Server).
So then I read about the Entity Framework (which just as Linq to SQL apparently has gotten its share of bashing already...). It's supposed to be provider independent everybody says, but how? I tried out a tutorial to create an entity data model, but the only providers to choose from were SQL Server/Express. Just for learning purposes, I would like to know how to use the entity framework with MS Access/OleDb.
Also, I would appreciate some input on what is the preferred database technology for data access. Is it LINQ still after all the bashing, or should you just use datasets because they are provider independent? Any pointers for what to learn would be great, because it's just too much to learn it all if I'm not going to use it in the end...!
the only providers to choose from were SQL Server/Express
The .NET Framework only includes EF providers for SQL Server and SQL Server Compact. If you need to access another DBMS, you need to install a third-party provider. For instance, there's a free provider for SQLite, with designer support. There are also a few (commercial) providers made by Devart, for various DBMS. As far as I know, there are no EF providers for OleDB or ODBC...
I really like the metaphor from Scott Hanselman: "I'm not a plumber, but I do know what an S-Bend is."
Personally, I think you should have a working knowledge of all the variety of ways to access data.
ADO.Net, EF, Linq2Sql, txt files, xml etc etc etc.
Have a look at the Nerd Dinner and the Music Store samples. See the way they access data (how do they do Unit Tests, Mocking framework, IOC etc)
Regarding data providers, personally I would avoid Access. It is just as easy to get a Sql Express or Mysql installation running and looks better on your resume.
(For what its worth, this question discusses setting up mysql for EF.)

Using LINQ with databases other than SQL Server Express 2005

I'm just starting to look into using LINQ for my database (and XML, and data object!) needs, but need to decide on which database to go with. I've been reading Pro LINQ, and it says that currently, LINQ in .NET 3.5 only supports SQL Server. I have done some googling, and have found references to using LINQ with MySQL and PostgreSQL (my other two DB options), but they are refer to DLinq, which I understand to be the predecessor of LINQ to DB.
I've read interesting and informative comparisons of the three databases here and here, but am still torn. I do not have any in-depth database experience, so it's important to be able to get the software installed and configured easily, or at least be easy to figure out how to compile a list of steps to configure it. I definitely want to have transactional support as well. But most importantly -- I want to use LINQ.
I'd like to hear what everyone here is using, whether it's SQL Server because LINQ supports it natively, or the other two with some additional component for LINQ support that I haven't yet found.
We use devart's dotConnect provider for Linq-to-Oracle and have been very pleased. They try and make the functionality match Linq-to-SQL as close as possible, which seems to be what you're looking for.
They have providers for:
Oracle
MySQL
PostgreSQL
SQLite
SQL Server
From a cost perspective, it's an excellent deal I'd say, just pay for developer seats, no server licensing.

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.