Skip to Content
数据库系统内幕
book

数据库系统内幕

by Alex Petrov
May 2020
Beginner to intermediate
319 pages
7h 3m
Chinese
China Machine Press
Content preview from 数据库系统内幕
18
|
第
1
章
们定义了一个包含用户数据的表,那么所有的用户名都将是相同的类型,并且属于同一
列。在逻辑上属于同一数据记录(通常由键标识)的值的集合构成一行。
对数据库进行分类的方法之一是按数据在磁盘上的存储方式进行分类:按行或按列进行
分类。表可以水平分区(将属于同一行的值存储在一起),也可以垂直分区(将属于同一
列的值存储在一起)。图 1-2 描述了这种区别:a)显示了按列分区的值,b)显示了按
行分区的值。
a) b)
图
1-2
:面向列和行的存储中的数据布局
面向行的数据库的例子很多:MySQL、PostgreSQL 和大多数传统的关系数据库。而两个
开源的、面向列数据存储的先驱则是 MonetDB 和 C-Store(C-Store 是 Vertica 的开源前身)。
1.3.1
面向行的数据布局
面向行的数据库
按记录或
行
来存储数据。它的布局非常接近表格的数据表示方法,即其
中每一行都具有相同的字段集合。例如,面向行的数据库可以有效地存储用户条目,其
中包含姓名、出生日期和电话号码:
| ID | Name | Birth Date | Phone Number |
| 10 | John | 01 Aug 1981 | +1 111 222 333 |
| 20 | Sam | 14 Sep 1988 | +1 555 888 999 |
| 30 | Keith | 07 Jan 1984 | +1 333 444 555 |
这种方法适用于如下的场景:数据记录(姓名、出生日期和电话号码)由多个字段组成 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

解密金融数据

解密金融数据

Justin Pauley

Publisher Resources

ISBN: 9787111655169