第8章データ管理
Parallel and Distributed Processing並列処理と分散処理
Many databases including NoSQL use parallel processing, a technique in which multiple processors work simultaneously on different tasks or different parts of a task to enable concurrent processing of large amounts of data. Distributed database systems distribute data and data retrieval functionality over multiple data sources or locations. Figure 8.13 shows different architectures of distributed databases. In shared-memory architecture, multiple interconnected processors that run the DBMS software share the same central storage and secondary storage. With shared-disk architecture, each processor has its central storage but shares secondary storage with other processors using a Network Attached Storage (NAS) or Storage Area Network (SAN). In shared-nothing architecture, each processor has its central storage and hard disk units, and data sharing occurs through the processors communicating with one another over the network.
英語のヒント
NoSQLを含む多くのデータベースは、並列処理を使う。これは、複数のプロセッサーが、異なる作業や一つの作業の異なる部分に同時に取り組み、大量のデータを並行して処理できるようにする手法である。分散データベースシステムは、データとデータ取得の機能を、複数のデータ源や場所へ分散する。図8.13に、分散データベースの異なるアーキテクチャーを示す。共有メモリアーキテクチャーでは、相互接続された複数のプロセッサーがDBMSソフトウェアを実行し、同じ主記憶と補助記憶を共有する。共有ディスクアーキテクチャーでは、各プロセッサーが独自の主記憶を持つ一方、ネットワーク接続ストレージ(NAS)やストレージエリアネットワーク(SAN)を使い、ほかのプロセッサーと補助記憶を共有する。非共有アーキテクチャーでは、各プロセッサーが独自の主記憶とハードディスク装置を持つ。プロセッサー同士がネットワークを通じて通信することで、データを共有する。

attribution: Copyright Rice University, OpenStax, under CC BY 4.0 license · CC BY 4.0 · Source出典
Figure 8.13 The different distributed architectures are shared-memory architecture, shared-disk architecture, and shared-nothing architecture. (attribution: Copyright Rice University, OpenStax, under CC BY 4.0 license)
図8.13 分散アーキテクチャーには、共有メモリ、共有ディスク、非共有という種類がある。(出典:著作権 Rice University、OpenStax、CC BY 4.0ライセンス)
Scalability is the measure of a system’s ability to scale (increase or decrease) the performance and/or cost in response to any system change. Scalability can be achieved through vertical scalability, where the capacity of each node can be increased, and horizontal scalability in which more nodes can be added. Parallel databases focus on data distribution for performance and intraquery versus interquery parallelism. Federated databases use nodes in a shared-nothing architecture, each running an independent DBMS instance with horizontal data fragmentation.
英語のヒント
スケーラビリティは、システムの変化に応じて性能や費用を拡大・縮小できる能力の尺度である。各ノードの能力を増やす垂直スケーラビリティと、ノードを追加する水平スケーラビリティによって実現できる。並列データベースは、性能を高めるためのデータ分散と、問い合わせ内並列性および問い合わせ間並列性に重点を置く。連合型データベースは非共有アーキテクチャーのノードを使い、各ノードで独立したDBMSインスタンスを実行するとともに、データを水平分割する。
In distributed query processing, the optimizer should not only consider the elements of a stand-alone setting but also the properties of respective fragments, communication costs, and location of the data in the network. Metadata may also be distributed, both globally (across all nodes) and locally (within a single node). Query optimization is needed.
英語のヒント
分散問い合わせ処理では、最適化器は単独の環境の要素だけでなく、各断片の性質、通信費用、ネットワーク内でのデータの位置も考慮しなければならない。メタデータも、全ノードにまたがる大域的な分散と、単一ノード内の局所的な分散の両方があり得る。問い合わせ最適化が必要である。
Recovery回復
The activity of setting the database in a consistent state without any data loss in the event of a failure or when any problem occurs is called database recovery. System failure occurs when a system goes down in the middle of a transaction, and media failure occurs when a database file or the device storing the database file stops working. There are many recovery techniques such as mirroring by adding two complete copies of the database, transaction logs by recording the transitions’ changes, shadow paging by dividing the database into pages, and backups. Backups are the most-used method for recovery and include immediate backup and archival backup. An immediate backup stores the copies in disks, and an archival backup stores the data in different servers/sites.
英語のヒント
障害や何らかの問題が生じたとき、データを失わずにデータベースを一貫した状態へ戻す作業を、データベース回復という。トランザクションの途中でシステムが停止すると、システム障害となる。データベースファイル、またはそれを格納する装置が動かなくなると、媒体障害となる。回復手法には、データベースの完全なコピーを二つ追加するミラーリング、トランザクションの変更を記録するトランザクションログ、データベースをページに分割するシャドーページング、バックアップなどがある。バックアップは、最もよく使われる回復方法であり、即時バックアップとアーカイブバックアップがある。即時バックアップではコピーをディスクへ保存し、アーカイブバックアップではデータを別のサーバーや場所へ保存する。
Securityセキュリティ
Using a set of controls to secure data, guaranteeing a high level of confidentiality, is considered database security. Security issues facing a database include human errors such as password sharing and weak passwords; SQL injection, which involves the use of SQL attack strings in database queries; overflow attacks, which writes a large amount of data to a fixed-length block of the memory, causing overflow; Denial of Service Attacks (DoS) that use a large amount of requests to crash the server; and internal and external attacks (Figure 8.14).
英語のヒント
一連の制御によってデータを保護し、高い機密性を確保することが、データベースセキュリティである。データベースが直面するセキュリティ上の問題には、パスワードの共有や弱いパスワードなどの人為的な誤り、問い合わせ内に攻撃用SQL文字列を使うSQLインジェクション、固定長のメモリブロックへ大量のデータを書き込んであふれさせるオーバーフロー攻撃、大量の要求でサーバーを停止させるサービス拒否攻撃(DoS)、内部・外部からの攻撃がある(図8.14)。

attribution: Copyright Rice University, OpenStax, under CC BY 4.0 license · CC BY 4.0 · Source出典
Figure 8.14 SQL injection gives attackers access to confidential client data such as teacher data. (attribution: Copyright Rice University, OpenStax, under CC BY 4.0 license)
図8.14 SQLインジェクションにより、攻撃者は教員のデータなど、顧客の機密データへアクセスできるようになる。(出典:著作権 Rice University、OpenStax、CC BY 4.0ライセンス)
To secure the database, there are many methods such as discretionary access control, which may grant or reject object access using a set of policies; mandatory access control, which restricts the ability to grant or reject access to resource objects; statistical database security, which focuses on the protection of statistical values stored in the database; encryption, which converts the data into secret code to hide the true meaning; and public key infrastructure, which is a set of roles and policies needed to manage the database.
英語のヒント
データベースを保護する方法は多い。任意アクセス制御は、一連の方針に基づいてオブジェクトへのアクセスを許可または拒否する。強制アクセス制御は、資源オブジェクトへのアクセスを許可・拒否できる権限を制限する。統計データベースセキュリティは、格納された統計値の保護に重点を置く。暗号化は、データを秘密の符号へ変え、本来の意味を隠す。公開鍵基盤は、データベース管理に必要な役割と方針の集合である。
LINK TO LEARNING学習リンク
There are many places on the Internet where you can learn more about programming and databases. For example, should you want to build your own website, you will need to know something about structured query language (SQL), which is a standard language for accessing and manipulating databases. Visit an introduction to SQL (https://openstax.org/r/76IntroSQL) to help you better understand SQL, what SQL can do, and how to use SQL when building a website.
英語のヒント
インターネットには、プログラミングやデータベースについて詳しく学べる場所が多くある。たとえば自分のウェブサイトを作りたいなら、データベースへのアクセスと操作のための標準言語であるSQLについて、ある程度知る必要がある。SQL入門(https://openstax.org/r/76IntroSQL)を読み、SQLとは何か、何ができるか、ウェブサイトを作る際にどう使うかについて理解を深めよう。