A database (データベース) is a collection of data organized for a purpose and stored so that many users and applications can share it.
If each department keeps the same customer details in its own separate files, one copy may get a new address while the other does not, and the two disagree. Gathering the data in one place and organizing it cuts duplication and lets everyone see the same up-to-date content.
AnalogyIt is like keeping one shared address book in the living room instead of each family member writing contacts in a personal notebook. When someone updates it, everyone sees the same entries.
How to rememberRead the word literally: the "base" where data is gathered and kept.
Exam points
Mix-upA database (データベース) is the collection of data itself, separate from the DBMS, the software that manages it.
A DBMS (Database Management System) is software that manages a database and reads and writes data on behalf of users and applications.
Application
DBMS
Database
The DBMS reads or writes the database and returns the result to the application.
3 / 3
The application does not deal with where or in what format data is stored; it asks the DBMS to fetch or change data. The DBMS handles concurrency control (同時実行制御), coordinating operations, for example by making some wait, so that data stays consistent even when many people update it at once. It also handles failure recovery (障害回復), which restores data damaged by a failure from backups and the like, and access rights management (アクセス権管理), which sets what each user may do.
AnalogyIt is like a library's stacks clerk. Patrons do not enter the stacks but ask at the counter; the clerk finds the book, hands it over, and keeps the loan and return records.
How to rememberManagement means managing: the DBMS carries "data manager" right in its name.
Exam points
ExamA DBMS is software that searches for or changes data in a database (データベース) at an application's request.
ExamThe purpose of using a DBMS is to let many users and programs share the same data at the same time without breaking its consistency.
An RDBMS (Relational Database Management System) is a DBMS that manages a database based on the relational data model (関係データモデル), which holds data in the form of tables.
Product no.
Product name
Unit price
P01
Notebook
150
P02
Ballpoint pen
120
P03
Eraser
80
Each row of a table is one item of data (a record) and each column is one field, with column names and data types fixed in advance. Giving two tables a field in common, such as the product number, lets you link them and retrieve data across both. An RDBMS is operated with a language called SQL.
AnalogyIt is like setting up several spreadsheet sheets with the column headings decided first, then matching rows across them by a shared number.
How to rememberR stands for Relational. In the relational data model a table itself is called a "relation," so read it as "a DBMS that manages data in tables."
Exam points
ExamThe relational data model (関係データモデル) represents data as tables, where one row is one record and one column is one field.
NoSQL is an umbrella term for databases that hold data in forms other than the tables of the relational data model.
NoSQL (examples of common types)
Key-value store (KVS)
Document-oriented database
Graph-oriented database
The name is usually read as "Not only SQL," and it refers not to one product but to several types that hold data in different ways. Many of these types do not require table columns to be fixed in advance, and they are used for data whose shape varies or for large volumes of data spread across many servers.
AnalogyIf an RDBMS is manuscript paper with a fixed grid, NoSQL is a stationery shelf holding plain notebooks, flashcards, sticky notes and more.
How to rememberNo is usually read not as "no" but as "Not only." Read that way, the name does not reject SQL; it admits ways of holding data other than tables.
Exam points
Mix-upNoSQL is not a specific product name but an umbrella term for the types of databases that do not use tables.
RDBMS vs. NoSQL
Aspect
RDBMS
NoSQL
Key differenceHow data is held
Tables of the relational data model (rows and columns)
A key-value store (キーバリューストア) is a NoSQL type that saves a key, used to look up data, together with its content, the value, as one pair.
Key
Value
session:7731
Logged-in user's details
cart:2048
Shopping cart contents
img:logo
Image data
Specify a key and the one matching value comes back; the mechanism is that simple, so reads and writes are fast. Because the DBMS does not define the form of what is inside a value, it is a poor fit for searches that use a field inside the value as the condition.
AnalogyIt is like a cloakroom that works with numbered tags. Give the tag number and your item comes right out, but you cannot ask the staff to find it by what is inside.
How to rememberIt has the same shape as a dictionary entry: headword, then definition. The headword is the key and the definition is the value.
Exam points
Mix-upA key-value store (キーバリューストア) specializes in retrieving a value by its key, while searches that use the inside of a value as the condition suit a document-oriented database (ドキュメント指向データベース) better.
KVS is short for key-value store, formed from the initials of Key-Value Store.
It means the same thing as a key-value store, and texts use either the Japanese name (キーバリューストア) or the abbreviation. Its trait of holding data as key-value pairs applies just the same.
How to rememberExpand K (Key), V (Value) and S (Store) in order and you have the full name.
A document-oriented database (ドキュメント指向データベース) is a NoSQL type that saves each document that has fields, such as JSON or XML, as one record.
Document
Fields it has
Member 1
Name, email address
Member 2
Name, phone number, favorite genre
Each document may carry different fields, so there is no need to align columns as in a table. Because the DBMS can read the fields inside a document, you can also search using a field's value as the condition.
AnalogyRather than a fixed application form, it is like a binder of free-form cards, each with different boxes filled in depending on the person.
How to rememberA document is a piece of paperwork: one sheet is one record, just as it is.
Exam points
Mix-upIn a document-oriented database (ドキュメント指向データベース) each record may have different fields, which differs from an RDBMS table whose columns are fixed first.
Key-Value Store vs. Document-Oriented Database
Aspect
Key-Value Store
Document-Oriented Database
Shape of one record
A key-value pair
A document with fields
Key differenceHandling of contents
The DBMS does not interpret what is inside a value
A graph-oriented database (グラフ指向データベース) is a NoSQL type that saves data as nodes (points) and the connections between data as edges (lines).
← Scroll the figure sideways →
"Graph" here does not mean a line chart but a network of points joined by lines. Because it stores the connections themselves as data, it is good at following links through many steps, such as friends of friends or routes from station to station.
AnalogyIt is like saving a relationship chart as is, with each person's name circled and lines drawn between people who are connected.
How to rememberA graph here means not bars or lines on a chart but a rail map of stations (points) and tracks (lines).
Exam points
Mix-upAn RDBMS expresses relationships by linking tables through shared fields, while a graph-oriented database (グラフ指向データベース) holds the connections directly as edges.
Key points
A database is a collection of data organized for a purpose and stored to cut duplication and allow sharing.
A DBMS supports sharing so that consistency holds even when many users use the same data at once, and it also handles failure recovery and access rights management.
An RDBMS is based on the relational data model, manages data in tables made of rows and columns, and is operated with SQL.
NoSQL is an umbrella term for databases that do not rely on tables, and each type holds data in its own way, such as key-value pairs, documents, or nodes and edges.