What is Relational database?
A database that represents data as tables (relations) of rows and columns and relates tables to each other through shared values. Also called an RDB. Queries and updates are made in SQL, and constraints such as primary keys and foreign keys keep the data consistent.
Japanese name: 関係データベース
Relational database appears in 5 practice questions across 1 topic, including Database Basics.
Field: Database Basics
Managing data with SQL and constraints
In a relational database, the SQL language is used to define tables (DDL), search and update data (DML) and control privileges (DCL). In SQL you only describe what result you want; the DBMS optimizer decides the order in which to read tables and which indexes to use. Data correctness is maintained by constraints, such as primary keys that uniquely identify rows, foreign keys that make rows refer correctly to rows of other tables, NOT NULL and UNIQUE that forbid NULL and duplicates, and CHECK that limits the range of values, together with the ACID properties of transactions.
FAQ
What does "relational" in relational database refer to?
It refers to the tables themselves. In mathematics, a set of combinations of elements drawn from several sets is called a relation, and each row of a table corresponds to one such combination (a tuple). It does not mean the links between tables.
How do you choose between a relational database and NoSQL?
A relational database suits work where data consistency matters and complex searches such as table joins are common. NoSQL may suit cases with a very large number of simple reads and writes by key, where you want to scale out by distributing data across multiple servers.