Databases 101

What Happens Under The Hood When Working With Databases

Joshua Gold
Jul 20, 2017 · 4 min read

Databases are used in nearly every website on the internet and can used for anything from customer records to product inventory. Without databases, websites wouldn’t be able to keep a record of anything and would render many sites used today useless. Databases are a useful tool and are the core of how many websites operate.

What Is A Database?

A database is a collection of information that can be easily accessed, managed, and manipulated. Most programs on the web are hooked to a database to store the information that the website collects as a user uses a program. Keeping track of customers so that they can create accounts is a use case for a database. That customer data can be saved inside of a database rather than making a new account each time a user wants to access the site.

This diagram depicts a simple way a database is used by the user and the web page. Looking at the user, one can see that they are only directly seeing the web page. The web page then uses the code to either send or retrieve information from the server, which is then presented to the user.

How to Use a Database

There are countless ways to use a database. One program that is widely used is called SQL. Below is an example of a database keeping track of a customer’s username and password.

The web page shows a basic login page, prompting the user for a username and password.

Once filled out and submitted, the web page tells the website code to grab that information that in the text fields with the use of JavaScript.

That information is then sent to an SQL database to check if that user exists and if the password is correct. If the information retrieved from the database is accurate, the user will be able to continue to the site. If not, the user will get an error telling them the information is wrong.

A Simpler Way to Use a Database

The method shown above took a long time to create, can be quite confusing, and uses a database architecture that is not easily readable or accessible. An alternative (and simpler) option is a service named Cloudstitch. Below, using Google Sheets, is an example of how easy it is to use Cloudstitch

First, it already takes care of the difficult and time-consuming parts one would normally have to go through for this type of integration. The picture below shows what Cloudstitch has made as a template (as well as the Google Sheet file that the service auto generated).


Next, a username and password are entered into the two text fields, and after submitting, the data is added to the database.


The user has a ready-to-use file that can be used as a database, and is in a format that is much simpler than an SQL table. Whether you use SQL, another database, or a tool like Cloudstitch, now you know what’s going on under the hood when working with databases!


Cloudstitch lets you manage websites & run your business, all from your office suite. Try it for free, here

)

Joshua Gold

Written by

Tech, Nature, Music.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade