views:

104

answers:

6

Hi: We have a windows MFC app that is written against an access database on a company server. The db is not that big: 19 MB. There are at most 2-3 users accessing it at any one time. It is used in a factory environment where access speed (or lack thereof) over the intranet becomes noticeable as it is part of the manufacturing time for our widgets.

The scenario is this: as each widget is completed, it gets a record in the db.. by the end of the year, the db is larger and searching for a record takes longer and longer. The solution so far has been to manually move older records to an archival table about once a year.

We are reworking other portions of this app right now, and it would be a good time to move to another db if we are going to do it.

It is my understanding that if we were using sql, the search time would not go up as the table gets bigger because the entire .mdb does not have to be sent over the network each time. Is this correct? Does anyone have any insight about whether it could be worth it to go to the trouble (time and money) of migrating to a new db, or should I just add more functionality to the application we have now, and maybe automatically purge the older records from time to time, and add additional facilities to the app to get at the older records when needed?

Thanks for any wisdom you can share..

A: 

It is my understanding that if we were using sql, the search time would not go up as the table gets bigger because the entire .mdb does not have to be sent over the network each time. Is this correct?

This general idea is true for almost all databases. The idea of a database is to separate your application from the actual data. The data resides in a database server. Your application doesn't.

Does anyone have any insight about whether it could be worth it to go to the trouble (time and money) of migrating to a new db

Yes. Having proposed this many times. It's expensive. It's complicated. Your MS-Access database will never get better or faster.

Other database servers will (and can) get faster and more sophisticated. After all, you're not sending .MDB files through a network anymore. The limitations are reduced. You're working with standard SQL through ODBC. Any database will work at the end of ODBC. You can fire vendors to find better, faster, cheaper products. Once you stop using Access you have choices.

Either stop using Access now or plan to suffer with it forever. And remake this decision every year until the end of time.

S.Lott
You can use Access through ODBC too, rendering your core argument irrelevant. It's not a great solution, but for the extremely limited userbase he already has, plus the cost involved in migration, switching to Access/ODBC is probably the best cost:value proposition in this case.
Cory Petosky
@Cory Petosky: The value of ODBC is being able to switch vendors. Access through ODBC is an opportunity to fire Microsoft and replace them with a better vendor and better product. ODBC -- by itself -- is worthless. What ODBC gets you is what's important.
S.Lott
@S.Lott: you say "Other database servers" but you seem to be talking about Jet/ACE, which is not a database server in the first place. So talking about "other database servers" is nonsensical. Perhaps you don't really understand how Jet/ACE works?
David-W-Fenton
@David-W-Fenton: You're right. "other database servers" cannot possibly mean Jet/ACE. Other database servers seemed pretty obvious. "Other" means not Access. Database means -- well -- SQL database. Server means -- well -- server. Here's examples of "other database servers": SQL/Server, Oracle, MySQL, Postgres, DB2. Does this help clarify what "other", "database" and "server" might mean?
S.Lott
Lose the word "other". D'oh.
David-W-Fenton
@David-W-Fenton: It's hard to lose "other" when it means "other than Access". I supposed I could say "actual server-based database servers other than Access". But that seems overly fussy and legalistic.
S.Lott
I don't really see why starting your sentence with the second word doesn't say exactly what you mean. Jet/ACE is not a server database, so you can just start off without the word "other". I don't see the issue if you just leave it out.
David-W-Fenton
@David-W-Fenton: I can't see how it is even possible to interpret the description without "other" meaning "other", i.e. "other than Access". I can't see writing "Other Than Access Server-based Database Proper Server that's Not Embedded In the Product In Order to be Legalistic". I run the risk of over-constraining the solution. For example, SQLite also tends to work much, much better than JET, and it isn't really a "server" either. But it's Not Microsoft, and still counts as "other". Please don't ask me to overconstrain the answer because you want to see a "proper" server.
S.Lott
YOu're thinking "other databases" but saying "other database servers." Yes, Access/Jet/ACE is a database, and SQL Server and MySQL are databases other than Access. They happen to be database servers, which Jet/ACE is not. If the issue is not that it's a server (e.g., your SQLite example), then "server" is the problem word.
David-W-Fenton
I'm asking you to post an answer that is not misleading. Many people just don't understand how Jet/ACE works because they can't conceive of a multi-user database without a server process controlling interaction with the data store. Your wording tends to reinforce the misperceptions of those people and that's why I object to it. It's also imprecise and probably elliptical. It's your post, so you're responsible for its content, but I think it could be clearer with a very, very tiny change.
David-W-Fenton
@David-W-Fenton: At this point, I'm lost. Most people think database means means "server". And yet, "other database server" somehow doesn't mean server and has to be needlessly over-qualified to be absolutely certain that JET is not included. Yet, I can't see why SQLite must also be excluded. I'm pretty much unable to fully decipher what you're asking for. You want me to say "NOT JET"? Is that what you need for clarification?
S.Lott
If most people think "database means 'server'" then they are wrong, and that's all the more reason that one is better off using precise language. Lots of databases don't have a server component, though most of those have fallen out of favor in the last 10-15 years.
David-W-Fenton
Since you've clarified what you mean, I'd say you should just say "other database engines", which is clearer and non-specific on the server issue. But it's your post, not mine, so you don't have to do what I suggest. The fact that I interpreted "other database servers" to mean something different than what you've now explained you meant indicates to me that an edit is justifiable.
David-W-Fenton
+3  A: 

I would probably move to either Microsoft SQL Server 2008 R2 Express Edition (free) or MySQL (free) if there is both funding and time to put in a data access layer. Because you will be making requests of a remote server and not operating on data at the local workstation this move is very involved from the development standpoint.

However you should analyze whether or not its more cost effective to perform your archival process quarterly or monthly, and just move the archive database to SQL Server 2008 R2 Express Edition. (You can install the Microsoft SQL Server Management Studio client tools on workstations and query the archival database for faster reports on historical data without rewriting your entire production application; similar solutions exist for using MySQL or other OSS/free RDBMS).

cfeduke
Going from Access -> SQL Server is very painless from a database perspective (in fact, Access has a wizard that will create a SQL server db from your access db), but your application may need to be changed some to work with SQL Server.
Nate Bross
I've used that as a starting point in the past. Its that MFC application in the OP's question that uses the MS Access database directly that's going to suck up all the development budget and time.
cfeduke
+2  A: 

Instead of shipping the DB over the network to the client and then performing queries, you could instead write a small wrapper on the server that handles requests, looks up the result in the Access DB (using SQL + the Access ODBC driver), and returns the result. This avoids the overhead of a large migration you might not need and still gets rid of the basic problem the users are experiencing.

Moving to a "proper" database solution is the best long term solution, but if your needs scale linearly and slowly over the next 30 years, it's hard to justify an expensive migration. That said, if you expect to really ramp up, or want to be more "future-proof", migrating now will likely save money/time.

Cory Petosky
+3  A: 

Since your database is small and very few users, I could not make a solid case for migration. I would definetly set up an script to archive old records on a more frequent basis (don't archive into same db, this would somewhat defeat the purpose). But also make sure two things are correct as well.

  1. INDEXES. If your queries start slowing down, make sure you have proper indexes http://support.microsoft.com/kb/304272
  2. Your network connection between computers is fast. Maybe upgrade to gigabit cards and router? Possibly put the db on a scsi drive (raid 10 for speed and redundancy)

Throwing advanced technology at simple problems is an expensive way to go and not always the answer!

RandyMorris
+3  A: 

First of all, the information that the whole table and the whole database is transferred across the network is simply incorrect. If the queries are indexed, then the search times should not go up that much over time.

As others have mentioned spending the time + money to setup and maintain and then have someone maintain and manage and support that database server is certainly a possibility here. However, keep in mind that simply migrating a JET based application to sql server in many cases will run slower, and in fact sql server is slower then JET when no network is involved.

So, I would take some time to ascertain why things slow down so much, and also check into how indexing is setup.

So, just keep in mind that it is pure folklore and myth that the whole tables and whole database is transferred over the network. This concept is ONLY DUE to most people really not having any computer training and not knowing and understanding how the JET data engine works.

Albert D. Kallal
I don't know about the lack of computer training. Lots of people with CS degrees propagate this myth. It's entirely because they are ignorant, and very often willfully so.
David-W-Fenton
+3  A: 

I have cilents with 300 mb databases although they should be upsizing to SQL Server for other reasons. 19 Mb is relatively small. If performance is bad enough that archiving speeds things up then check the indexes to the tables for all your sorting and selection fields. Albert gave you a good URL there to check.

Entire MDB files do not go down the wire. Unless you are missing indexes.

Tony Toews