Part 4: How to create your own database - general database management

If you've been following the series, you should now be able to build a basic database. But, what can you do with your new skills?
Christopher McFadden
Building a database is only the beginning.


  • Databases are mighty things when storing, manipulating, and accessing data.
  • They are not too difficult to build, but "activating" their potential can be a little more challenging.
  • But what is the point of all that effort? What, ultimately, can you do with them?

In our previous episodes, we looked at what databases are, how to build them, and some ways to query them. All is well and good, but what other kinds of things can we make with this setup?

Let's take a look.

What are the main uses of databases?

As we have seen in previous episodes of this series, databases are a collection of organized data stored and accessed electronically. The purpose of a database is to provide a centralized repository for storing and managing information, making it easier to retrieve, update, and manipulate that data.

This can make data-related tasks more efficient and accurate and help people make decisions by giving them a single source of information. Databases are used in many applications and industries, such as online shopping, financial management, and healthcare, to name a few.

Databases are widely used in many different applications and industries, and they serve a variety of purposes. Some primary uses of databases include, but are not limited to:

  • Data Storage (obviously): Databases provide a centralized location to store large amounts of data, which can be easily accessed, managed, and updated as needed.
  • Data Management: Databases allow organizations to manage their data more efficiently, with features like data validation, backup and recovery, and access control.
  • Data Retrieval: Databases provide fast and efficient ways to search and retrieve data, which is helpful for various applications, such as reporting and decision-making.
  • Data Analysis: Databases can perform complex data analysis and reporting, such as data mining, business intelligence, and predictive analytics.
  • E-commerce: Databases play a crucial role in powering e-commerce websites, as they can store information about products, customers, orders, and payments. Databases usually power many online shops behind the scenes.
  • Customer Relationship Management (CRM): Databases are often used to store information about customers, sales, and marketing activities, which can be used to analyze customer behavior and improve marketing campaigns.
  • Inventory Management: Databases can manage inventory levels, track stock movements, and generate reports on stock levels and sales.
  • Human Resources: Databases can be used to store and manage information about employees, including their details, employment history, and job performance.
  • In-house document automation and project management: For the more ambitious, you can turn a database into an "all-singing, all-dancing" automation machine. You can generate reports from a template with fixed and repetitive data (like date, standard text, etc.). If done right, you could automate the report-writing process from data collection forms accessed by a website or your local server. Such systems are also an excellent framework for quality control systems (storing and tracking data, audits, etc.).

These are just a few examples of the many uses of databases. The specific use of a database will depend on the needs of the organization and the type of data being stored.

What are the best ways to add and manipulate data on your database?

So, you've learned how to design and build a database, but adding and manipulating data with it requires little skill and knowledge. So, what if you want less technical users to take advantage of it too?

Let us now introduce you to the concept of frontends and backends.

The terms "frontend" and "backend" refer to the two main components of a software application. In our case, the former is our database, and the latter is some way of requesting, querying, or writing data to the backend.

The front end, also known as the client side, is part of the application that users interact with. It is responsible for presenting data to the user and collecting user inputs. The front end is usually written in client-side technologies such as HTML, CSS, and JavaScript and runs in the user's web browser or device.

The backend, also known as the server side, is part of the application that runs on the server and is not visible to the user. It is responsible for processing requests from the front end, interacting with databases and other systems, and returning the necessary data to the front end. The backend is typically written in server-side technologies such as PHP, Python, Ruby, and Java and runs on a web server.

The front- and back-ends work harmoniously to provide a seamless user experience and implement the applications' functionality. The front end is responsible for presenting data and capturing user inputs, while the back end handles data processing and storage.

Assuming we use our lovingly crafted MySQL database as the backend, there are several popular front-end tools that you can use to interact with a MySQL database; some of the most common ones include:

  • PHP: PHP (hypertext preprocessor) is a server-side scripting language commonly used for web development and can interact with a MySQL database. PHP provides many functions for accessing and manipulating data in a MySQL database. This is one of the most commonly used scripts on websites with user forms.
  • Visual Basic for Applications (VBA): An older programming language, VBA is an event-driven programming language developed by Microsoft to customize Microsoft Office applications such as Word, Excel, and Access. With VBA, you can automate tasks in these applications, add custom functionality, and create macros that can perform complex operations with just a few lines of code. This is a great way to learn the basics for smaller database applications.
  • Python: Python is a powerful, high-level programming language that can interact with a MySQL database. The Python MySQL library, MySQL Connector, provides an easy-to-use API (application programming interface) for working with a MySQL database. It is growing in popularity, and many developers ditch PHP in favor of this.
  • Java: Java is a popular programming language that can be used to interact with a MySQL database. Java provides a wide range of libraries and APIs for accessing and manipulating data stored in a MySQL database.
  • Ruby: Ruby is a dynamic, object-oriented programming language that can interact with a MySQL database. The Ruby MySQL library, Ruby MySQL, provides an easy-to-use API for working with a MySQL database.
  • .NET: .NET is a popular framework for building Windows applications and can be used to interact with a MySQL database. .NET provides a variety of libraries and APIs for accessing and manipulating data stored in a MySQL database.
  • Node.js: Node.js is a popular JavaScript-based platform for building fast, scalable server-side applications. Node.js can be used to interact with a MySQL database through the use of libraries such as the MySQL module.

These are just a few examples of the many programming languages and tools that can be used as front-ends for a MySQL database. The best choice for you will depend on your specific needs, including the requirements of your project, your development team's expertise, and the resources you have available.

But, a word of warning, designing and building databases is one thing, but building a front end for a website is an entirely different world. To do so, you'll need to wear various hats, but, in the end, you'll go a long way to becoming a "full stack developer."

That is not a role for the faint-hearted (or inexperienced), so be warned!

What are some of the most important tips when building and using a database?

Since you spent a lot of time and effort building your database, you'll likely want to ensure it runs flawlessly for some time to come.

Several essential steps can help you maintain your database and ensure its integrity, performance, and reliability:

  • Backup and Recovery: Regularly backing up your database is crucial for disaster recovery and data protection. It would be best if you had a backup and recovery plan to minimize data loss in the event of a system failure or other unexpected events.
  • Performance Tuning: Regular monitoring and tuning of your database can help ensure optimal performance and prevent slowdowns. This may include index optimization, query optimization, and adjusting memory and disk usage settings.
  • Security: Implementing appropriate security measures is crucial to protect sensitive data stored in the database. This can include encryption, implementing access control and authentication mechanisms, and monitoring suspicious activity.
  • Data Integrity: Data integrity is essential for the reliability of your database. It would be best if you enforced data integrity constraints such as unique constraints, primary keys, and foreign keys to ensure that data is entered correctly and consistently.
  • Software Updates: Keeping your database software up to date with the latest patches and updates can help prevent security vulnerabilities and improve performance.
  • Monitoring: Regular database monitoring can help identify and resolve potential issues before they become significant problems. This may include monitoring performance metrics, error logs, and resource usage.
  • Maintenance: Regular database maintenance tasks such as defragmentation, index rebuilding, and optimizing table structures can help keep your database running smoothly.

By following these best practices, you can help ensure that your database runs efficiently and effectively and that your data is secure and protected.

And that is your lot for today. This also brings us to the end of our mini-series on databases.

We do hope you've found this informative and fun. As you've seen, building a database is not all that taxing and can, if done right, be an advantageous use of your time.

The power of databases is incredible, and we hope you can take full advantage of them in future endeavors.

Add Interesting Engineering to your Google News feed.
Add Interesting Engineering to your Google News feed.
message circleSHOW COMMENT (1)chevron
Job Board