Useful Articles
Don't Write Off Micosoft Access for Web Hosting
by: Ian Matthews
Are you a hobbyist and interested in creating an interactive website at little expense? Don’t know which database to use? Whilst using an Access database is almost certainly not suitable for high-traffic websites it can offer a number of advantages when using a third-party host. Of course the site would have to be Windows-hosted and would need to be written in some language that can actually use the database. This would rule out the use of any content management system (CMS) which is tied into, say, MySQL. But if you’re writing a native PHP site, for example, and have Microsoft Office with Access lying around, an Access database is a realistic option.
Let’s assume you’re using PHP, if you use PDO for all database reads and writes it’s a fairly straightforward matter to switch database connections at a later date. As PDO isn’t a full abstraction layer, you’ll need to stick to fairly standard SQL although you might be lucky if you use a few extensions. To illustrate the point, if you use the "Ucase" function to upper case a string in Access this would also work with MySQL but would not work with Oracle as the corresponding function is "upper".
Usually, going for an el-cheapo option with a web-hosting service using, say, MySQL means that you’ll probably be restricted in terms of database space and concurrent users anyway (the one I tried first restricted me to 150GB and 10 users, respectively). With an Access database, you can put it in the main hosting space (which in my case was 3GB) although you should store it outside the document root for security. Each Access database file is limited to 2GB, and I would suggest it’s not wise to get close to this, but there’s nothing stopping you using more than one - maybe one for each area of your website, thus making concurrent users less of a problem.
|
It might also be worth mentioning that the database is only accessed whilst a page is being displayed, so 10 concurrent database users can probably handle 100 or more people viewing the corresponding page at once, especially if you code a solution which retries and waits 3 or 5 times to log on if the user limit is reached.
Of course, if you don’t have Microsoft Office with Access the only manipulation of the database you can do is what you write yourself, but if you do you can use Access forms to view the data locally.
Backing up an Access database is a simple matter of copying the file. For recovery, I’ve seen articles written that say "ah, but there is no easy way to recover other than restoring a previous whole database". I would argue that this isn’t true. There are a few free products around, such as NetDrive, which allow you to mount a remote ftp volume which you can then use to open directly using Access. You can open your "live" database directly and import individual tables or fix individual issues. From experience, though, it’s probably a good idea to shut the site down and not allow concurrent access whilst you do this.
Admittedly, Access doesn’t have the most robust security measures in the world, and what it does have can be worked around, but you can nevertheless password-protect your live database(s) to avoid casual prying eyes working for your web host, whereas they have admin rights to their own databases so if you use one of those you can’t really stop them looking at your data.
Overall, there are of course pros and cons for all technical solutions, just don’t let people put you off using Access for a low-traffic website when it might be the best solution.
Back to Articles Page
|