This entry in my series detailing how I have my development environment set up will deal with databases. This is going to be a somewhat shorter post than the others simply because there isn’t as much customization to be done in this area as some of the others.
For any client that I have a voice in selecting the database back end for, I generally choose MySQL. There is a myriad of places around the Internet that detail the advantages and disadvantages of MySQL when compared to the other popular database systems, so I won’t go into that here. However, the two main reasons I choose it are price (hard to beat free for the community edition) and its ability to run on nearly any platform. It certainly doesn’t hurt that it scales very well and has several options for graphically managing the schemas and data it contains.
I’ve done a “vanilla” installation of MySQL 5 on OS X 10.5–just downloading the binaries for OS X and following the installation instructions. I have been thinking lately that I need to figure out what I need to do to not have it auto start at system login and use some sort of script to start and stop it like I do my other tools. It’s pretty light-weight when used as a development database, so I don’t think it’s hurting my boot up time much. I’ve also been wondering if there is some way to set up different “environments” to segment my clients’ schemas from each other. Honestly though, I really haven’t had the time lately to research if it’s possible.
I know there are people out there that use PostGRES as their preferred database, and I’m pretty sure that it will run on OS X, but I’ve not had a client to date that uses it. As a result, I’ve not done any research into what it would take to get it installed on OS X and hooked up to ColdFusion via the Administrator.
I have run across a few clients that use Microsoft SQL Server in the last year or so. Obviously, SQL Server won’t install and run directly on OS X. I have BootCamp set up on my Macbook Pro with Windows XP installed on it. I have installed MS SQL Server 2005 Developer Edition on that Windows install. Whenever I need MS SQL Server, I use VMWare Fusion to launch my BootCamp partition as a virtual machine (then promptly minimize it so I don’t have to look at Windows). I have made an entry in my /etc/hosts file to point the hostname “BootCamp” to the IP address that VMWare assigns that VM. Beyond that, it’s easy to create a DSN in ColdFusion administrator in OS X to point to that hostname.
One database engine that I don’t have a good solution for at the moment is Oracle. All the clients I’ve worked for that use Oracle had a dedicated development database set up for developers to use. I have not investigated what options there are for running an Oracle engine locally for development. Maybe one of the two or three of you that read my blog can give me some ideas in the comments.
If any of you have any suggestions of ways that you have done things in the past that worked well, fee free to leave a comment.