Create a database
So, we roughly know the functionality of our web application, what it looks like and the pages we need. Now it’s time to decide what information we will store in our database.

What is a database
A database is simply a collection of data! The data can be stored on disk, in memory on the server, or both. You can create a folder on your hard drive, save a few documents and call it a database.

A database management system (DBMS) is a system that provides consistent APIs for (most often):

Creating databases, updating and deleting databases
Read and write data to databases
Secure database access by providing single-level access to different areas and functions
The type of database you need to run your web application will determine what data you need to store and what your users need to do.

Types of databases
There are many types of databases for different purposes. A web application will most often use one of the following.

SQL
You should use an SQL database if your data is highly relational. Your data is relational if you have several well-defined record types that have relationships to each other. For example, a “Customer” may have many “invoices” stored in its records. Typically, you create a “Customer” table and an “Invoice” table, which can be linked together by “Foreign Key” columns. For example, Customer.Id = Invoice.CustomerId.

SQL databases have an extremely powerful query language that allows you to represent your data in many different ways.

Document database
You should use a document database if your data is not very relational. Document databases store “documents”. Each record in your database is just a big block of structured data, often in JSON format.

If you need to store relationships between your records, you have to write code to manage that yourself. However, many other aspects of using document databases are much simpler. Your database can be “schema-less”, which means that you don’t have to declare the definitions of your records up front.

Decide how to divide your data
Each of your customers has their own private set of data. One of the worst things that can happen to your application is that one customer’s data will be available to another customer.

Even if only a small amount of non-confidential data is leaked and no harm is done, such an event will significantly weaken the trust in the security of your application.

The code you will need to write:

When creating a new client, you need to create a new database and fill in any initial data.
You need somewhere to store records of all your customers and how to connect to each customer’s database.
If you need to update the database (for example, add a new table), you need to write code to update each one individually.
If you need to query all your customer data into one, you need to pull the data from each and aggregate it.

Create the interface
Note. Actually, you will create your server and frontend interface at the same time. But for this post we will keep it simple.

What do we mean by interface?
The interface is the visual element of your web application. It defines what you see and interact with. The UI is developed using HTML, CSS and JavaScript.

If you are using server-side pages, it is very easy to get started. Your server-side framework is set up and ready to build. This is where the huge advantage of server pages comes in.

Create your backend
What do we mean by backend?
The server is usually what manages your data. This refers to databases, servers, and everything that the user cannot see in the web application.

Building the server side is one of the most challenging parts of web application development. If you feel overwhelmed, a tool like Budibase can eliminate many of the difficulties, including the following tasks.

The main backend tasks will be:

Provide HTTP endpoints for your frontend that will allow it to work with your data. For example, create, read, update and delete (“CRUD”) records.
Authenticate users (make sure they are who they say they are: log in).
Authorization. When a logged-in user makes a request, the server side determines whether the user is allowed (authorized) to perform the requested action.

Maintain interface
If you have chosen server pages, your backend will also generate your frontend and serve it to your user.

With a single-page application, the server side will simply serve your static front-end files (i.e., your “single page” and associated resources).