I designed a Microsoft Access database for one of my clients and it’s split into two files – a front-end file with all the forms, reports and code and a back-end file with the tables. That’s pretty standard.
During the development process, I needed to make adjustments to the table design – new indexes, fields need to be added and removed, relationships changed. That’s usually no problem if I have remote access to the client’s system and can login and make the changes. In this case, I don’t. Even to deploy a new program version, I have to send it to the client and let them unpack the files to their desired locations.
It’s not the ideal situation but it’s what I have to work with. When it comes to making design changes in the back-end tables, I could try to guide the client rep through the process but I’m not risking that. I’d rather have a routine that will automate it and ensure that everything is done as painlessly as possible.
My new series of YouTube videos is an introduction to Microsoft Access for absolute beginners who have never used Access before. If you are in the position of needing to learn Access fast or are curious about what you can do with Microsoft’s desktop database software, this series will provide you with a great introduction to organization of data into related tables, creating user-friendly data entry forms and designing reports to present your data as needed.
The idea behind this series is to demonstrate Microsoft Access by showing the design of a new database application from start to finish. This includes the occasional mistakes and bugs that happen from time to time and need to be resolved. In these videos, you’ll get to see the thought process behind the design of an order entry application and learn about the different questions that need to be asked when planning a new solution that will be used by other people.
One of the nice features of MySQL as a database software is its noinstall option in which you download the files themselves and perform a manual installation that takes just under a gigabyte of space on your drive. If you’re a developer or a student, this means you can quickly create a new self-contained instance wherever you need it and then blow it away if you need to without cluttering up your registry.
This does mean working on the command line so you’ll want to have a certain comfort level with that. You will also need to be working with Administrative privileges.
One of the fundamental differences between an Excel spreadsheet and a Microsoft Access or SQL Server database is the database’s ability to group data by subject into tables and create links between that information. This type of organization enables the user to store large amounts of data and retrieve specific information quickly by writing queries that will search on the various fields. Referential Integrity is actually a simple but essential concept to understanding how databases like Access or SQL Server work. Once you understand it, you will be able to use these tools to better organize and report on your data.
To demonstrate this concept, I’m going to use a few tables in a Microsoft Access database. Access is a great environment to start learning about databases as it provides a user-friendly interface and is widely available through Office365.
Watch the companion video for this article on YouTube or continue article below …
One of the great things about MySQL and MariaDB are their versatility of installation. They can be setup as a Windows services and trimmed out with some extra utilities or it can be installed on a flash drive as a portable server.
The easiest installation is certainly the Windows Installer with a wizard for MySQL or the MariaDB MSI that will guide you through the installation of the server and all the options you want. Myself, I still like self-contained programs that won’t interfere with anything else on my system and can be easily removed without leaving hidden traces. I also don’t like adding a lot of stuff to my Windows startup.
If you have a basic comfort with using the Windows command line and control panel, doing a minimal installation of either MariaDB or MySQL is not difficult once you understand a few steps. The MySQL full documentation and the MariaDB Knowedgebase are available for reference on their respective sites but here are the essentials to get you started.
One of CiviCRM’s strengths is the ability to add custom fields to hold specific information about your contacts. One thing it doesn’t offer (yet) is a calculated field type that will present the results of calculations of other fields. While calculated fields are generally discouraged in relational database design, they are sometimes necessary within a user interface. One suggested method is to add custom code hooks within CiviCRM’s PHP code but as a database guy, I decided on a back-end solution.
One of my current projects involves migrating a large amount of data away from an old custom Borland Paradox application into a new CiviCRM system. As with too many quickly-constructed apps, this old Paradox database wasn’t especially well designed and, among other the other challenges in salvaging the data, there were no restrictions on how dates could be entered. This means that, in multiple fields within each of the 20,000+ database records, I might see any of the following:
While CiviCRM does have a utility for importing data from CSV and other SQL tables, it was having quite a time with this collection and many of the dates were being mishandled. That’s if the records weren’t rejected entirely for other reasons. Data migration doesn’t often happen with just a few settings adjustments and a click of the Import button.
A few months ago, I wrote about how to install MySQL on Windows with IIS. Now I want to show you how to create an AMP web programming stack (Apache, MySQL & PHP) on Mac OS X. As with Windows, you could just go with a ready-made development environment like MAMP but, if you’re going to be doing real database and web design work with MySQL, it’s best to know how everything works.
For this demonstration, I’m going to be using Mac OS X El Capitan (v.10.11), the latest version as of this writing. My installation environment is a hosted Mac server with 1 GB of RAM and 40 GB of disk space. I will be demonstrating the process using the Terminal commands.
Unlike Windows, OS X already includes the Apache web server and PHP language pre-installed so it’s a much simpler process to ensure that everything is working together. You will need root access in order to install and configure the components.
Occasionally, when you’re making a lot of design changes to a Microsoft Access database, Access might start crashing when you’re working with that specific database file or when trying to enter the VBA environment with ALT-F11. This leaves you unable to investigate the issue or make further changes. It can be a sign that there are errors within the project’s compiled VBA code. One solution is to use the /decompile switch to remove the compiled VBA code from the project and then recompile the source code.
If you’re doing ongoing design work with Access, I recommend creating a new shortcut to the MSACCESS.EXE file on your system with the decompile switch. You would use this only when trying to recover a file. The rest of the time, you should use the normal menu shortcut.
You can also enter this with the Run command on the Start menu and include the path to your database file after the /decompile switch.
The first file that you open after running Microsoft Access with this switch will be decompiled. This will not delete the source code behind your forms or reports but it will remove the compiled version of the code and might enable you to get back into the VBA environment.
Once you’re in VBA, use the Debug >> Compile Database command to recompile the database project. This will enable you to find and correct any problems within the code.
As always, be sure to make regular backups of your files as you’re coding in case this doesn’t work and you have to recover. Also be sure to make a backup of the file before you try to decompile it in case something goes wrong.
If this doesn’t work, then the last resort is to rebuild your database by importing all of the objects within it into a new database file. This is time consuming, however, although it does seem to remove a lot of temporary data that Access stores in the file, reducing the database size substantially in some cases.
Comeau Software Solutions specializes in the development and enhancement of Microsoft Access applications. We can also rescue Access projects that have gone off-track and help you decide when it's time to move to another solution. Please contact us for more information on how we can help you with your database needs.
My newest book, MySQL Explained, is due to be published this month! You can check out the LeanPub page to show your support and to sign up for notifications of when it’s published. See the description of the book below.
UPDATE 10/24/2015 – MySQL Explained is now available in both EPUB and MOBI (Kindle) formats with the first chapter available for FREE from LeanPub.com and Amazon.com! Read more about this guide to the leading database for online applications and on the official page!
About the Book
MySQL Explained is a step-by-step tutorial for everyone who’s ready to learn about the database software most commonly used for storing information behind some of today’s most popular websites and online applications.
Written especially for people outside the I.T. world, MySQL Explained provides the background information you need to get familiar with database theory and the principles behind organizing data. This book starts from the ground up, helping the reader to understand the very definition of a database, the forms it can take and the different options for storing information. By the end of this book, you’ll understand the reasons for choosing MySQL, the options for installing it and the tools that it offers to store and safeguard your data.
If you are in any way involved in designing or managing a website or data solution of any kind, you owe it to yourself to understand the tools involved. Quality database management sytems are essential in today’s data-driven world and such essential tools should not be a mystery to those who depend on them. MySQL Explained can help you unravel the mystery and learn more about a technology that will be around for a long time to come.
MySQL Explained is published through OS Training which, in addition to publishing tutorials like this one, offers onsite and online training in web technologies including Joomla, Drupal and WordPress.