A database is the rawest form that data can take in a web application, and it’s often referred to as the “source of truth”. Without a database, a web developer has no means of programming user sessions that refer back to one another, such as when a user logs in and performs a set of actions that they expect to be accessible next time they login. From saving basic user data such as usernames and emails to saving more complex data such as documents and product purchases, a database enables a wide variety of dynamic functionality.
Before a web developer can store and retrieve data from a database, the database needs to be designed and created. This task is yet another case where coding takes on a more creative, design-oriented quality. The design of a database is not only critical to any applications’ future functionality, but it also is difficult to modify once it’s been designed, so it has lasting consequences for potentially years to come.
Thankfully, the basic building materials for a database are relatively few.
You have tables, which are like buckets that contain sets of uniform items. Items in a table are called records—each record is can be likened to a row in a spreadsheet. Records have fields, which are attributes of the record—not unlike the column in a spreadsheet. Lastly, tables can have relationships to other tables.
So, in order to complete a basic database design, a web developer would need to specify which tables need to exist, and within each table, which fields will pertain to the records in each table. Lastly, the developer would need to decide, or determine, what the relationships between the tables should be.