Databases are collections of organized data that can be easily retrieved by a computer. They serve as a data access layer in multitier architecture and are typically run on dedicated computers. There are two main types of databases: SQL (Relational Database) and NoSQL (Non-Relational Database).
SQL databases use a query string to request specific information from the database management system, and data is organized into tables called relations, with rows referred to as tuples. Data integrity is maintained by ensuring that no tuple is referenced if it is not present. These databases must typically run on a single server, and the cost of scalability increases as the number of users grows. Famous SQL implementations include Oracle, MySQL, and Microsoft SQL Server.
NoSQL databases do not use a query string and instead return a defined group of data known as a document. Data integrity is maintained by the application-level programmer, and these databases can be run on multiple servers to divide the load. The cost of scalability increases linearly with the number of users. Famous NoSQL databases include MongoDB, Cassandra, and Redis.