Appearance
HTTP, CRUD, and Database
HTTP is an extensible protocol, but at its core, it facilitates CRUD operations.
INFO
CRUD stands for Create, Read, Update and Delete.
Almost all internet consumer-related software uses CRUD; you use it every time you ask an application to take your new data or modify the existing one.
The basic HTTP verbs corresponding to CRUD operations are:
- GET — retrieve a specific resource (by id) or a collection of resources
- POST — create a new resource
- PUT — update a specific resource (by id)
- DELETE — remove a specific resource by id
Data persistence with Database
Adding persistence to an application means storing data so that it persists beyond the lifetime of the application. This is typically achieved by storing application data in a database.
What is a database?
A database is a shared collection of related data.
There are many different types of databases. For example:
Relational Database: A type of database that stores and organizes information in a set of tables with columns and rows, allowing for data to be linked together. This allows for efficient data retrieval and analysis, and they provide powerful search and sorting capabilities.
NoSQL Database: NoSQL databases are non-relational databases that store data in a distributed, non-tabular structure. They are better suited for large, unstructured datasets, and they can be scaled horizontally across multiple servers.
Object-Oriented Database: A kind of database that stores data in the form of objects rather than in the traditional row-and-column fashion of relational databases.
Graph Database: A type of NoSQL database that uses graph structures with nodes, edges, and properties to represent and store data. It is used for applications that require complex data relationships and analysis.
Key-Value Database: A type of NoSQL database that is designed to store data in a key-value pair format. Key-value databases are highly scalable, meaning they can easily store large amounts of data and are very fast and efficient to access. Key-value databases are often used in applications such as distributed caching, gaming leaderboards, and real-time analytics.
Distributed Database: A type of database that is stored and managed across multiple computers, sites, or locations. The data is synchronized across all the nodes of the distributed database system, ensuring that all users have access to the same information.
The CRUD operations are the four most basic operations that can be performed with all database systems and they are the backbone for interacting with any database.
Example: Prodensity app
The Prodensity app that JHU used to track your health status during the Pandemic is a simple CRUD application.
Going beyond CRUD!
A simple CRUD application is just a front-end (UI) for a database! Most software development frameworks have the concept of CRUD deeply embedded in their toolset, making it too easy to get an app up and running in a matter of days with little code that is doing anything else. You don't learn much about software engineering if your app is mostly CRUD. You should strive to incorporate some challenging functional requirements to go beyond a simple CRUD application.