Skip to content

Database and DBMS Basics, and Types of NoSQL

低頻~39 min8 terms7 past questions

Goals of this unit

  • Explain the difference between a database (a collection of data) and a DBMS (the software that manages it).
  • State why a DBMS is used and name the main functions it handles.
  • Tell apart an RDBMS, which manages data in tables, and the types of NoSQL, which are not bound to tables, by how each holds data.
Terms at a glance (8)
TermIn one lineHow data is held
データベースA collection of data organized and stored so it can be sharedAny method (it is the data itself)
DBMSSoftware that manages a database and stands between it and its usersManages and operates on data (not the collection of data itself)
RDBMSA DBMS that manages data in tables based on the relational data modelTables of rows and columns, linked to one another by shared fields
NoSQLAn umbrella term for databases that do not use the tables of the relational data modelVaries by type
キーバリューストアA NoSQL type that holds data as key-value pairsOne value per key
KVSAbbreviation of key-value storeSame as a key-value store
ドキュメント指向データベースA NoSQL type that holds documents such as JSON as single recordsEach document may have different fields
グラフ指向データベースA NoSQL type that holds the connections between data as nodes and edgesA network of points and lines

Terms

データベースDatabase

Open in glossary データベース

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.

1 past questions on this term データベース

A DBMS (Database Management System) is software that manages a database and reads and writes data on behalf of users and applications.

  1. Application
  2. DBMS
  3. 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.

3 past questions on this term DBMS

Database vs. DBMS

AspectDatabaseDBMS
Key differenceWhat it isA collection of organized, stored dataSoftware that manages the database
RoleHolds the shared contentHandles reading, writing and protecting data

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 nameUnit price
P01Notebook150
P02Ballpoint pen120
P03Eraser80

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.

2 past questions on this term RDBMS

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

AspectRDBMSNoSQL
Key differenceHow data is heldTables of the relational data model (rows and columns)Forms other than tables (varies by type)
How fields are definedColumns are fixed in advanceMany types need not fix them first
ScopeA DBMS that manages data in tablesAn umbrella term for several types

キーバリューストアKey-Value Store

Open in glossary キーバリューストア

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.

KeyValue
session:7731Logged-in user's details
cart:2048Shopping cart contents
img:logoImage 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.

ドキュメント指向データベースDocument-Oriented Database

Open in glossary ドキュメント指向データベース

A document-oriented database (ドキュメント指向データベース) is a NoSQL type that saves each document that has fields, such as JSON or XML, as one record.

DocumentFields it has
Member 1Name, email address
Member 2Name, 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

AspectKey-Value StoreDocument-Oriented Database
Shape of one recordA key-value pairA document with fields
Key differenceHandling of contentsThe DBMS does not interpret what is inside a valueThe DBMS can read the fields inside a document
SearchLook up by keyCan search using field values as conditions

グラフ指向データベースGraph-Oriented Database

Open in glossary グラフ指向データベース

A graph-oriented database (グラフ指向データベース) is a NoSQL type that saves data as nodes (points) and the connections between data as edges (lines).

友人

友人

友人

利用者A

利用者B

利用者C

"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.

Check questions

4 past questions from this unit

Start the check questions

All past questions in this topic