Every application needs a way to store information. For small, simple applications that have few users and low security requirements, data can be stored in plain text files. However, larger applications with numerous users and high security requirements should use a relational database for data storage. When we implement a database solution, no matter which technology we are working with, there are four best practices that we follow.
Configuring your database is essential to keeping your data secure. When adding and configuring users make sure the right people are useing the right data and can access only the functionality they need. If a user does not need to delete data from the database configure their account accordingly. We make sure that users are only allowed to perform function appropriate for their level and do not see data that they shouldn't.
When entering information into your database make sure you validate all user input. Not validating user input can have dire results for your database and application. Be sure that your application remains secure if a user enters something like ``; DROP DATABASE mysql;''.
Even if your database is compromised there are still steps you can take to keep intruders from exploiting your data. We always encrypt sensitive information, such as credit card numbers and passwords, using a reliable, one way encryption algorithm like md5.
If your source code is efficient, but your database is not, then the database will become a processing bottleneck. Database efficiency begins with good relational design. If data is replicated in numerous tables it can lead to data corruption and functional errors. Also a consideration when designing a database is propper index implementation. We earned the business of one client by reducing database search times 400% by adding indexes to certain tables. The final piece in database efficiency is programming stale. Are your database connections persisting too long thus slowing the database? Are you joining tables correctly? Are you locking other processes out for too long? These are just a few issues that the we keep in mind when crafting our applications.
A well designed, efficient database will grow with your company.
We help all of our clients develop a backup solution that is appropraite for their technology and their busniess needs. Some of our larger clients have redundant database servers that pick up the load if a server goes down. Other clients simply need a dump of their data on a nightly basis to insure that no information is lost over a prolonged period of time. We find that most solutions fall somewhere in between.