Access: Why not?
I blogged a few times recently about ways to make Acess databases do kind of what you want when you’re programming with .NET. There was this one about multiple JOIN syntax. Then this one about “parameter” errors. And finally this one about weird column names. Yuck!
Besides these weird little nuances, Access can be a pain to work with because:
- It’s more of a file-based, structured data store rather than a true database;
- There is essentially no security;
- It doesn’t have much in the way of referential integrity features;
- It lacks stored procedures and triggers;
- It doesn’t have constraints as we know them;
- It can’t handle large volumes of data;
- Performance tuning is meaningless;
- Its data types are kind of a mess; and
- It’s weirdly not-quite-SQL syntax is hard to adapt to.
There’s this one guy following me on Twitter who, every time I posted a link to one of these items, replied with something to the effect of “Best Access tip: don’t use it.” That’s not a crazy thought, but it’s wrong.
Here’s why
I have one particular application running in the field, on a pen-tablet kind of PC. There’s a central database on the customer’s main office server, and the pen-tabs (one or more of them) keep coming home to hook up to the network and push new data back to that server.
My tablet PCs don’t have wireless access to any network, and obtaining that would be prohibitively expensive considering how the application is deployed. I could have used a single-user database engine, maybe the scaled-down versions of Oracle or SQL Server, but those things honestly do have some admin overhead. Access really doesn’t.
I could have built the central database, likewise, on a “real” engine, but the client already works with Access for many existing tasks. We’re not managing that much data, perhaps ten megabytes at the high end. There might possibly be three or four users on the system at once.
You know what?
In that scenario, I don’t see an urgent reason to push the client off something that they know, that is easy, and that works for them. Performance in terms of transactions per second is poor, in a technical sense, but it’s still much faster than they can type or even read. We don’t get deadlocks. Security is not a priority. The client’s staff can create and run reports right out of Access if they like.
It’s simple, simple, simple. Best tool for the job. It’s also–considering almost everyone already has Microsoft Office–essentially free of cost. Notably, if there are problems with the Access installation, you as the developer probably won’t have to deal with them.
I don’t suppose Access is ever the only solution to a problem. But in my experience it’s frequently a reasonable one and it spares a lot of drama over acquiring and installing a database engine.
-e
December 14, 2009 @ 4:52 pm
SQL Server Express or Compact Edition. SQLite. MySQL. Cost is never a reason to use Access. Nor is the fact that you are confined to running only on the client. We all know applications tend to live on longer than we expect, so you’ll be maintaining an Access solution sometime into the 2020’s wondering why you ever used Access. Don’t. You’ll regret it.
Also, many editions of Office come without Access…
Mark W. Schumann
December 14, 2009 @ 6:53 pm
Thank you for your comment, Eric.
If it were only about cost of acquisition, I’d totally agree. I tend to look at a combination of cost, technical merit, low admin overhead, and ability to fit into the customer’s existing infrastructure and mental model.
As an extreme example, I used to work in an IBM System/38 shop. I developed plenty of applications that “should” have been done in C for all kinds of reasons, but it was a ’38 shop. We just didn’t have C… or getting it would have meant fitting a PC with an SNA interface card and… oh geez, now I’m getting a headache.
We ended up abusing RPG III in horrible ways, because it was there and C wasn’t. (Man, now I’m telling war stories. Sorry.)
This current application, and a few others I’ve dealt with, have been in Access Shops. It’s nice to integrate that cleanly with what they understand and are aleady using.
Tweets that mention Access: Why not? « Critical Results -- Topsy.com
December 15, 2009 @ 11:35 am
[…] This post was mentioned on Twitter by Mark W. Schumann and Mark W. Schumann, Ezra Brooks. Ezra Brooks said: RT @MarkWSchumann: Yesterday's still-fresh blogginess: Why NOT just use MS Access in your .NET development project? http://bit.ly/66nR8a […]
webdev_hb
December 15, 2009 @ 11:54 am
On smaller scale projects I’ve found that using LINQ with XML files to be a sufficient solution – Doesn’t require any additional software to be installed and works very well.
Mark W. Schumann
December 15, 2009 @ 11:59 am
Good idea, Hugo. Obviously the overhead can be deadly if you have more than a little data, but if you designed the thing right it should be easy to upgrade to a real database when necessary.
Adventures in version control | Critical Results
May 28, 2013 @ 9:32 am
[…] my original system had been developed around… I am not making this up… a Microsoft Access MDB file. Which worked great! But all my database code worked with System.Data.OleDb* objects. In many […]