‹

08 · Databases

08 · Databases

08 · ​ฐานข้อมูล

This chapter is the floor that turns storage into memory — the layer between raw persistence below and every application above that needs to be told the truth.

​ชั้นนี้​เปลี่ยน​พื้นที่​เก็บ​ข้อมูล (storage) ​ให้​กลายเป็น​ความจำ — ​คั่น​ระหว่าง​ความคงอยู่​ของ​ข้อมูล (persistence) ​แบบ​ดิบ​ด้านล่าง ​กับ​ทุก​แอปพลิเคชัน​ด้านบน​ที่​ต้อง​ได้รับ​ความจริง

How does civilization remember reliably?

​อารยธรรม​จดจำ​สิ่ง​ต่างๆ ​ได้​อย่าง​น่าเชื่อถือ​ได้​อย่างไร

Before 1970, asking a computer a question it had not been built to answer meant writing a new program, and that program had to know where the answer physically lived: which file, in which order, chained to which other record by which pointer. Reorganize the storage to make one report faster and every program that touched those records broke. Businesses were accumulating data far faster than they could accumulate programmers to chase it around the disk.

​ก่อน​ปี 1970 ​ถาม​คำถาม​ที่​คอมพิวเตอร์​ไม่​ได้​ถูก​สร้าง​มา​ให้​ตอบ ​แปล​ว่า​ต้อง​เขียน​โปรแกรม​ใหม่ ​และ​โปรแกรม​นั้น​ต้อง​รู้​ว่า​คำตอบ​อยู่​ตรงไหน​ใน​ทางกายภาพ — ​ไฟล์​ไหน ​เรียงลำดับ​แบบ​ไหน ​ผูก​กับ record ​อื่น​ด้วย pointer ​ตัว​ไหน ​จัด​ที่เก็บ​ข้อมูล​ใหม่​เพื่อให้​รายงาน​หนึ่ง​เร็ว​ขึ้น ​ทุก​โปรแกรม​ที่​แตะ record ​เหล่านั้น​พัง​หมด ​ธุรกิจ​สะสม​ข้อมูล​เร็ว​กว่า​ที่จะ​หา​โปรแกรมเมอร์​มา​ไล่ตาม​มัน​ไป​ทั่ว​ดิสก์​ได้​ทัน

Then an IBM mathematician at the San Jose Research Laboratory published a paper whose first sentence was a declaration of independence: "Future users of large data banks must be protected from having to know how the data is organized in the machine (the internal representation)" (Codd, CACM 13(6), 1970). Edgar Codd's proposal was to model data as relations — mathematical sets of tuples, with no order, no pointers, no physical trace of the disk in them at all. What a user sees is a table. What a table is made of is nobody's business but the system's.

​นัก​คณิตศาสตร์​ของ IBM ​ที่ San Jose Research Laboratory ​ตีพิมพ์​เปเปอร์​ที่​ประโยค​แรก​คือ​คำประกาศ​อิสรภาพ: "​ผู้ใช้​ธนาคาร​ข้อมูลขนาดใหญ่​ในอนาคต​ต้อง​ได้รับ​การปกป้อง​จาก​การต้อง​รู้​ว่า​ข้อมูล​ถูก​จัดระเบียบ​อย่างไร​ใน​เครื่อง (internal representation)" ("Future users of large data banks must be protected from having to know how the data is organized in the machine (the internal representation)") (Codd, CACM 13(6), 1970) Edgar Codd ​เสนอ​ให้​มอง​ข้อมูล​เป็น relations — ​เซต​ทาง​คณิตศาสตร์​ของ tuple ​ไม่​มี​ลำดับ ​ไม่​มี pointer ​ไม่​มี​ร่องรอย​ทางกายภาพ​ของ​ดิสก์​เหลืออยู่​เลย ​ผู้ใช้​เห็น​ตาราง ​ส่วน​ตาราง​ประกอบ​ขึ้น​จาก​อะไร​ไม่​ใช่​เรื่อง​ของ​ใคร​นอกจาก​ระบบ​เอง

That is the abstraction this floor sells, and the name for it is data independence. Everything else in the chapter exists to make it affordable.

​นามธรรม (abstraction) ​ที่​ชั้นนี้​ขาย​คือ​สิ่ง​นั้น ​และ​ชื่อ​ของ​มัน​คือ data independence ​ทุกอย่าง​ที่​เหลือ​ใน​บท​นี้​มี​อยู่​เพื่อ​ทำให้​มัน​มี​ต้นทุน​ที่​จ่าย​ไหว

It is expensive because a question phrased against an idealized table gives the machine no plan. Codd saw the consequence and stated it precisely: the power of such a query language "lies in its descriptive ability (not its computing ability)" — you describe the answer you want, not the route to it. Somebody must still supply the route. That somebody became the query optimizer, and the technique that made it work was published by Pat Selinger's group in 1979 out of IBM's System R prototype: enumerate the possible access paths, estimate the cost of each from statistics about the data, and pick the cheapest (Selinger et al., SIGMOD 1979). It is an unglamorous idea with an enormous consequence — the reason a modern analyst can write nine lines of SQL over a billion rows and get an answer, while the equivalent hand-written traversal would take a week and be wrong. System R also produced the language: Donald Chamberlin and Raymond Boyce's SEQUEL, in 1974 (SIGFIDET workshop), later renamed SQL because another company already held the trademark on the word.

​ราคา​ของ​มัน​สูง ​เพราะ​คำถาม​ที่​เขียน​เทียบ​กับ​ตาราง​ใน​อุดมคติ​ไม่​ได้​บอก​แผนการ​ทำงาน​อะไร​กับ​เครื่อง​เลย Codd ​เห็นผล​ที่​ตามมา​และ​พูด​ไว้​ชัด​ว่า ​พลัง​ของ​ภาษา​คิว​รี (query) ​แบบนี้ "​อยู่​ที่​ความสามารถ​ใน​การบรรยาย (​ไม่​ใช่​ความสามารถ​ใน​การคำนวณ)" — ​คุณ​บรรยาย​คำตอบ​ที่​ต้องการ ​ไม่​ใช่​เส้นทาง​ไปหา​มัน ​เส้นทาง​นั้น​ยัง​ต้อง​มี​ใคร​สัก​คน​จัดหา​ให้​อยู่ดี ​คน​นั้น​กลายเป็น query optimizer ​เทคนิค​ที่​ทำให้​มัน​ทำงาน​ได้​ตีพิมพ์​โดย​กลุ่ม​ของ Pat Selinger ​ใน​ปี 1979 ​จาก​ต้นแบบ System R ​ของ IBM: ​ไล่​ดู​เส้นทาง​การเข้าถึง​ข้อมูล​ที่​เป็นไปได้ ​ประเมิน​ต้นทุน​ของ​แต่ละ​เส้นทาง​จาก​สถิติ​ของ​ข้อมูล ​เลือก​เส้นทาง​ที่​ถูกที่​สุด (Selinger et al., SIGMOD 1979) ​ไอเดีย​ที่​ดู​ไม่​หวือหวา ​แต่​ผล​ของ​มัน​ใหญ่ — ​นักวิเคราะห์​ยุค​นี้​เขียน SQL ​เก้า​บรรทัด​บน​ข้อมูล​พัน​ล้าน​แถว​แล้ว​ได้​คำตอบ ​ในขณะที่​การไล่​ค้น​ด้วยมือ​แบบ​เทียบเท่า​กัน​กินเวลา​เป็น​สัปดาห์​และ​ยัง​ผิด System R ​ให้กำเนิด​ภาษา​ด้วย: SEQUEL ​ของ Donald Chamberlin ​กับ Raymond Boyce ​ใน​ปี 1974 (SIGFIDET workshop) ​ภายหลัง​เปลี่ยน​ชื่อ​เป็น SQL ​เพราะ​บริษัท​อื่น​ถือ​เครื่องหมายการค้า​ของ​คำ​นั้น​ไป​ก่อน

The second thing this floor hides is failure. Power dies mid-write; two clerks sell the same seat; a disk returns a page from last Tuesday. The abstraction offered is the transaction: a group of operations that either all happen or none do, that behaves as though no one else were running at the same time, and that once confirmed cannot be lost. Jim Gray set out these guarantees in 1981 (The Transaction Concept, VLDB); Theo Härder and Andreas Reuter gave them the acronym everyone now recites — atomicity, consistency, isolation, durability — in a 1983 survey that credits Gray for the substance (ACM Computing Surveys 15(4)). Note what a transaction really is: not a mechanism for avoiding failure, but a contract about what failure is allowed to look like from above. The machinery underneath fails constantly. The surface it offers admits only two outcomes.

​สิ่ง​ที่สอง​ที่​ชั้นนี้​ซ่อน​ไว้​คือ ​ความล้มเหลว (failure) ​ไฟ​ดับ​กลางคัน​ขณะ​เขียน​ข้อมูล ​เสมียน​สอง​คน​ขาย​ที่นั่ง​เดียวกัน ​ดิสก์​คืน​หน้า​ข้อมูล​ของ​วัน​อังคาร​ที่แล้ว​กลับมา ​สิ่ง​ที่​ยื่น​ให้​แทน​คือ ​ทรานแซกชัน (transaction): ​กลุ่ม​ของ​การปฏิบัติ​การที่เกิด​ขึ้น​ทั้งหมด​หรือไม่​เกิด​เลย ​ทำงาน​ราวกับ​ไม่​มี​ใคร​อื่น​ทำงาน​อยู่​พร้อมกัน ​และ​เมื่อ​ยืนยัน​แล้ว​ไม่​มี​วัน​สูญหาย Jim Gray ​วาง​การรับประกัน​เหล่านี้​ไว้​ใน​ปี 1981 (The Transaction Concept, VLDB) ​ส่วน Theo Härder ​กับ Andreas Reuter ​ตั้งชื่อ​ย่อ​ที่​ทุกคน​ท่อง​กัน​จนถึง​วันนี้ — atomicity, consistency, isolation, durability — ​ใน​งาน​สำรวจ​ปี 1983 ​ที่​ยก​เครดิต​เนื้อหา​ให้ Gray (ACM Computing Surveys 15(4)) ​ทรานแซกชัน​คือ​อะไร​กัน​แน่: ​ไม่​ใช่​กลไก​หลีกเลี่ยง​ความล้มเหลว ​แต่​เป็น ​สัญญา​ว่าความ​ล้มเหลว​ได้รับอนุญาต​ให้​มีหน้า​ตา​แบบ​ไหน​เมื่อ​มอง​จาก​ด้านบน ​กลไก​ด้านล่าง​พัง​อยู่​ตลอดเวลา ​ผิว (surface) ​ที่​มัน​ยื่น​ให้​ยอมรับ​ผลลัพธ์​แค่​สอง​แบบ

The mechanism that delivers that contract is the log, and it is the least intuitive idea on this floor. Durability is not achieved by writing the data carefully. It is achieved by writing the intention first, sequentially, to a file that is only ever appended — and only then touching the data pages, whenever it is convenient. If the machine dies, recovery reads the log and replays history: redo what was committed, undo what was not. The canonical treatment is ARIES (Mohan et al., ACM TODS 17(1), 1992), and the pattern escaped the database long ago — filesystems journal, message queues are logs wearing a different hat, and replication in chapter 10 is one machine reading another machine's log. The database's real heart is not the table. It is the append-only record of what it was told to do.

​กลไก​ที่​ส่งมอบ​สัญญา​นั้น​คือ log ​และ​เป็น​ไอเดีย​ที่​เข้าใจยาก​ที่สุด​ใน​ชั้นนี้ ​ความทนทาน (durability) ​ไม่​ได้มา​จาก​การเขียน​ข้อมูล​อย่าง​ระมัดระวัง ​แต่​มาจาก​การเขียน ​เจตนา ​ก่อน ​เรียง​เป็นลำดับ ​ลง​ไฟล์​ที่​มี​แต่​การต่อท้าย (append) ​เท่านั้น ​ค่อย​ไป​แตะ​หน้า​ข้อมูลจริง​เมื่อไหร่​ก็ได้​ที่​สะดวก ​ถ้า​เครื่อง​ตาย ​การกู้​คืน​อ่าน log ​แล้ว​เล่น​ประวัติศาสตร์​ซ้ำ: ​ทำ​สิ่ง​ที่ commit ​แล้ว​ซ้ำ​อีกครั้ง (redo) ​ย้อน​สิ่ง​ที่​ยัง​ไม่ commit ​กลับ (undo) ​แนวทาง​มาตรฐาน​คือ ARIES (Mohan et al., ACM TODS 17(1), 1992) ​และ​แพตเทิร์น​นี้​หลุด​ออกจาก​ฐานข้อมูล​ไป​นาน​แล้ว — filesystem ​ทำ journal, message queue ​ก็​คือ log ​ที่​สวมหน้ากาก​คนละ​แบบ ​และ​การทำสำเนา (replication) ​ใน​บท​ที่ 10 ​ก็​คือ​เครื่อง​หนึ่ง​อ่าน log ​ของ​อีก​เครื่อง​หนึ่ง ​หัวใจ​จริง​ของ​ฐานข้อมูล​ไม่​ใช่​ตาราง ​แต่​คือ​บันทึก​แบบ​ต่อท้าย​อย่าง​เดียว (append-only) ​ของ​สิ่ง​ที่​มัน​ถูก​สั่ง​ให้​ทำ

The one place the physical world is allowed to show through is the index, and the shape it takes is dictated by hardware two floors down. Rudolf Bayer and Edward McCreight's B-tree, from a Boeing report in 1970 and Acta Informatica in 1972 (Bayer & McCreight), is deliberately wide and shallow — hundreds of children per node, so that one node fills one disk page and a lookup among billions of rows costs three or four fetches instead of thirty. It is chapter 02's bargain, paid at industrial scale: build the structure now, in space and in write cost, to make a future question cheap. And it is where the abstraction leaks. Two logically identical queries can differ by four orders of magnitude in time because one has an index and the other does not — the surface says what, but the bill is denominated in how.

​จุด​เดียว​ที่​โลก​ทางกายภาพ​ได้รับอนุญาต​ให้​โผล่​ผ่าน​มา​คือ ​ดัชนี (index) ​และ​ฮาร์ดแวร์​ที่อยู่​สองชั้น​ด้านล่าง​เป็นตัว​กำหนด​รูปทรง​ของ​มัน B-tree ​ของ Rudolf Bayer ​กับ Edward McCreight ​จาก​รายงาน​ของ Boeing ​ปี 1970 ​และ Acta Informatica ​ปี 1972 (Bayer & McCreight) ​กว้าง​และ​ตื้น​โดยตั้งใจ — ​แต่ละ​โหนด​มีลูก​ได้​เป็น​ร้อย ​หนึ่ง​โหนด​เต็ม​พอดี​หนึ่ง​หน้า​ดิสก์ ​การค้นหา​ท่ามกลาง​ข้อมูล​นับ​พัน​ล้าน​แถว​จึง​เสีย​แค่​สาม​หรือ​สี่​ครั้ง​ใน​การดึง​ข้อมูล ​แทนที่จะ​เป็น​สามสิบ​ครั้ง ​นี่​คือ​ข้อแลกเปลี่ยน (trade-off) ​ของ​บท​ที่ 02 ​ที่​จ่าย​กัน​ใน​ระดับ​อุตสาหกรรม: ​สร้าง​โครงสร้าง​ไว้​ตอนนี้ ​ทั้ง​พื้นที่​และ​ต้นทุน​การเขียน ​เพื่อให้​คำถาม​ในอนาคต​ถูก​ลง ​และ​นี่​คือ​จุด​ที่ abstraction ​รั่ว ​คิว​รี (query) ​สอง​ตัว​ที่​เหมือนกัน​ทุกอย่าง​ใน​เชิง​ตรรกะ ​ใช้เวลา​ต่างกัน​ได้​ถึง​สี่​ระดับ​ขนาด (order of magnitude) ​เพราะ​ตัว​หนึ่ง​มี index ​อีก​ตัว​ไม่​มี — ​ผิว (surface) ​บอก​แค่ ​อะไร ​แต่​บิล​คิด​เป็น ​อย่างไร

The people are worth a moment. Codd's employer was slow to build what he described, having a large and profitable investment in the older hierarchical system it would replace (Wade & Chamberlin, IEEE Annals, 2012); the relational model reached customers partly through others, and Codd received the Turing Award in 1981 for a paper his own company had spent a decade arguing with (ACM).

​คนใน​เรื่อง​นี้​คุ้มค่า​ที่จะ​แวะ​ดู​สักครู่ ​นายจ้าง​ของ Codd ​เอง​ช้า​ที่จะ​สร้าง​สิ่ง​ที่​เขา​บรรยาย​ไว้ ​เพราะ​มีเงิน​ลงทุน​ก้อน​ใหญ่​ที่​ยัง​ทำกำไร​อยู่​ใน​ระบบ hierarchical ​รุ่นเก่า​ที่​มัน​จะ​เข้ามา​แทนที่ (Wade & Chamberlin, IEEE Annals, 2012) ​แบบจำลอง​เชิง​สัมพันธ์ (relational model) ​ไป​ถึง​มือ​ลูกค้า​ส่วนหนึ่ง​ผ่าน​คนอื่น ​และ Codd ​ได้รับ​รางวัล Turing Award ​ใน​ปี 1981 ​จาก​เปเปอร์​ที่​บริษัท​ของ​เขา​เอง​เถียง​ค้าน​มา​นาน​นับ​สิบ​ปี (ACM)

Which brings the story to the loosening. Around 2006–2007 two systems built for a scale the relational contract could not reach were published — Google's Bigtable (OSDI 2006) and Amazon's Dynamo (SOSP 2007) — and in June 2009 a San Francisco meetup gave the movement a name it would spend a decade regretting: NoSQL. The trade was explicit: give up joins, give up strong transactions across machines, and buy horizontal scale with the proceeds. What happened next is the interesting part. Having sold the guarantees, the industry discovered how much application code it takes to fake them, and most of these systems have been growing transactions and query languages back ever since. Chapter 10 explains why the guarantees were expensive in the first place — and why they can never be free once the data lives on more than one machine.

​เรื่อง​เดิน​มาถึง​ช่วง​ที่​สัญญา​นั้น​คลายตัว ​ราว​ปี 2006–2007 ​ระบบ​สอง​ตัว​ที่​สร้าง​มา​เพื่อ​สเกล​ที่​สัญญา​เชิง​สัมพันธ์​ไป​ไม่​ถึง​ถูก​ตีพิมพ์ — Bigtable ​ของ Google (OSDI 2006) ​กับ Dynamo ​ของ Amazon (SOSP 2007) — ​และ​ใน​เดือน​มิถุนายน 2009 ​งาน meetup ​ที่ San Francisco ​ตั้งชื่อ​ให้​ขบวนการ​นี้ ​ชื่อ​ที่​มัน​จะ​ต้อง​มา​นั่ง​เสียใจ​ไป​อีก​สิบ​ปี: NoSQL ​ข้อแลกเปลี่ยน​ถูก​พูด​ออกมา​ตรงๆ: ​ยอม​ไม่​มี join ​ยอม​ไม่​มี​ทรานแซกชัน (transaction) ​ที่​แข็งแรง​ข้าม​เครื่อง ​แล้ว​เอา​สิ่ง​ที่​ยอม​แลก​ไป​ซื้อ​สเกล​แนวนอน ​สิ่ง​ที่เกิด​ขึ้น​ต่อมา​คือ​ส่วน​ที่​น่าสนใจ ​พอ​ขาย​การรับประกัน​เหล่านั้น​ไป​แล้ว ​วงการ​ก็​ค้นพบ​ว่า​ต้อง​เขียน​โค้ด​ใน​แอปพลิเคชัน​มาก​แค่​ไหน​ถึง​จะ​ปลอม​มัน​ขึ้น​มา​ใหม่​ได้ ​และ​ระบบ​พวก​นี้​ส่วนใหญ่​ก็​งอก​ทรานแซกชัน​กับ​ภาษา​คิว​รี​กลับคืน​มา​ตั้งแต่​นั้น ​บท​ที่ 10 ​อธิบาย​ว่า​ทำไม​การรับประกัน​เหล่านี้​ถึง​แพง​ตั้งแต่แรก — ​และ​ทำไม​มัน​จะ​ไม่​มี​วัน​ฟรี ​เมื่อ​ข้อมูล​อยู่​บน​เครื่อง​มากกว่า​หนึ่ง​เครื่อง

Connections

​เชื่อมโยง

Below: chapter 04 supplies the memory hierarchy that gives the B-tree its shape, and chapter 05 supplies the file, the process, and the crash-consistency problem in raw form — the database is what happens when one program takes those duties from the operating system and does them properly. Chapter 02 owns the data structures; chapter 03 explains why compressed columns and encoded pages work at all. Above: chapter 07 lives here permanently, since a schema is the hardest thing in any system to change; chapter 09 puts the client across a network; chapter 10 asks what survives of these guarantees when the machine is really many machines.

​ด้านล่าง: ​บท​ที่ 04 ​ให้​ลำดับชั้น​หน่วยความจำ (memory hierarchy) ​ที่​กำหนด​รูปทรง​ของ B-tree ​ส่วน​บท​ที่ 05 ​ให้​ไฟล์ ​โพรเซส (process) ​และ​ปัญหา crash consistency ​มา​ใน​รูป​ดิบๆ — ​ฐานข้อมูล​คือ​สิ่ง​ที่เกิด​ขึ้น​เมื่อ​โปรแกรม​หนึ่ง​รับหน้าที่​เหล่านั้น​มาจาก​ระบบปฏิบัติการ​แล้ว​ทำ​มัน​อย่าง​ถูกต้อง​จริงจัง ​บท​ที่ 02 ​เป็นเจ้าของ​โครงสร้าง​ข้อมูล ​บท​ที่ 03 ​อธิบาย​ว่า​ทำไม​คอลัมน์​ที่​บีบ​อัด​แล้ว​กับ​หน้า​ข้อมูล​ที่​เข้ารหัส​แล้ว​ถึง​ทำงาน​ได้​ตั้งแต่แรก ​ด้านบน: ​บท​ที่ 07 ​อยู่​ที่นี่​ถาวร ​เพราะสคี​มา (schema) ​คือ​สิ่ง​ที่​แก้​ยาก​ที่สุด​ใน​ระบบ​ใดๆ ​ก็ตาม ​บท​ที่ 09 ​พา client ​ข้าม​เครือข่าย​ไป ​บท​ที่ 10 ​ถาม​ว่าการ​รับประกัน​เหล่านี้​เหลือ​อะไร​อยู่​บ้าง ​เมื่อ​เครื่อง​จริงๆ ​แล้ว​คือ​เครื่อง​หลาย​เครื่อง

Open questions

​คำถาม​ที่​ยัง​เปิด​อยู่

Is the relational model a permanent floor or a fifty-year local maximum? Its critics have twice declared it obsolete — for objects in the 1990s, for scale in the 2000s — and it has twice absorbed the challenger. Second: the optimizer is now the least predictable component in most systems, capable of choosing catastrophically on stale statistics; learned optimizers are an active research front, but a mis-estimating model is harder to debug than a mis-estimating formula. Third, and least settled: the log is the one component every modern data system has converged on. If storage, queues, replication and stream processing are all logs underneath, is "the database" still the right unit of thought, or is it the log that is the floor and the database merely one view built over it?

​แบบจำลอง​เชิง​สัมพันธ์ (relational model) ​เป็น​ชั้น​ถาวร ​หรือ​เป็น​แค่​จุดสูงสุด​เฉพาะที่ (local maximum) ​ที่อยู่​มา​ได้​ห้าสิบ​ปี ​ผู้วิจารณ์​ประกาศ​ว่า​มัน​ล้าสมัย​มา​แล้ว​สอง​ครั้ง — ​เรื่อง object ​ใน​ทศวรรษ 1990 ​เรื่อง​สเกล​ใน​ทศวรรษ 2000 — ​และ​มัน​กลืน​คู่แข่ง​เข้าไป​ได้​ทั้งสอง​ครั้ง ​ข้อ​สอง: query optimizer ​ตอนนี้​เป็น​ส่วนประกอบ​ที่​คาดเดา​ไม่​ได้มาก​ที่สุด​ใน​ระบบ​ส่วนใหญ่ ​เลือก​ผิดพลาด​ร้ายแรง​ได้​จาก​สถิติ​ที่​ล้าสมัย optimizer ​ที่​เรียนรู้​ได้ (learned optimizer) ​เป็นแนว​รบ​วิจัย​ที่​กำลัง​คึกคัก ​แต่​โมเดล​ที่​ประเมิน​ผิด​ดีบั๊ก​ยาก​กว่า​สูตร​ที่​ประเมิน​ผิด ​ข้อ​สาม ​และ​ยัง​ไม่​ลงตัว​ที่สุด: log ​คือ​ส่วนประกอบ​เดียว​ที่​ระบบข้อมูล​สมัยใหม่​ทุก​ตัว​มา​บรรจบ​กัน ​ถ้า storage, queue, replication ​และ stream processing ​ล้วน​เป็น log ​อยู่​ข้างใต้ "​ฐานข้อมูล" ​ยัง​เป็น​หน่วย​คิด​ที่​ถูกต้อง​อยู่​หรือเปล่า ​หรือว่า log ​ต่างหาก​ที่​เป็น​ชั้น ​ส่วน​ฐานข้อมูล​เป็น​แค่​มุมมอง​หนึ่ง​ที่​สร้าง​ซ้อน​อยู่​ข้างบน

Go deeper

​อ่าน​ต่อ

  • E. F. Codd, "A Relational Model of Data for Large Shared Data Banks," Communications of the ACM 13, no. 6 (1970): 377–387 — twelve pages that reorganized an industry; ACM DL.
  • Peter Bailis, Joseph M. Hellerstein & Michael Stonebraker, eds., Readings in Database Systems, 5th ed., 2015 — the field's own curated canon, with editorial commentary; free at redbook.io.
  • Abraham Silberschatz, Henry F. Korth & S. Sudarshan, Database System Concepts, 7th ed., McGraw-Hill, 2019 — the standard textbook if you want the mechanisms in full.
  • E. F. Codd, "A Relational Model of Data for Large Shared Data Banks," Communications of the ACM 13, no. 6 (1970): 377–387 — ​สิบสอง​หน้าที่​จัดระเบียบ​ทั้ง​อุตสาหกรรม​ใหม่; ACM DL.
  • Peter Bailis, Joseph M. Hellerstein & Michael Stonebraker, eds., Readings in Database Systems, 5th ed., 2015 — ​คัมภีร์​ที่​วงการ​คัดสรร​เอง ​พร้อม​คำอธิบาย​จาก​บรรณาธิการ; ​อ่าน​ฟรี​ที่ redbook.io.
  • Abraham Silberschatz, Henry F. Korth & S. Sudarshan, Database System Concepts, 7th ed., McGraw-Hill, 2019 — ​ตำราเรียน​มาตรฐาน ​ถ้า​ต้องการ​กลไก​แบบ​เต็ม​รูปแบบ.
บทถัดไป · 10 / 1609 · Networks
Size
Page
Font

The Tower of Abstractions — An Encyclopedia of the Computing Disciplines

❦
100 · The Map00 · แผนที่201 · Theory of Computation01 · ทฤษฎีการคำนวณ302 · Algorithms & Data Structures02 · อัลกอริทึมและโครงสร้างข้อมูล403 · Information & Coding03 · สารสนเทศและการเข้ารหัส504 · Computer Architecture04 · สถาปัตยกรรมคอมพิวเตอร์605 · Operating Systems05 · ระบบปฏิบัติการ706 · Languages & Compilers06 · ภาษาและคอมไพเลอร์807 · Software Engineering07 · วิศวกรรมซอฟต์แวร์908 · Databases08 · ฐานข้อมูล1009 · Networks09 · เครือข่าย1110 · Distributed Systems10 · ระบบกระจาย1211 · Security & Cryptography11 · ความปลอดภัยและวิทยาการรหัสลับ1312 · AI & Machine Learning12 · ปัญญาประดิษฐ์และการเรียนรู้ของเครื่อง1413 · HCI & Graphics13 · ปฏิสัมพันธ์มนุษย์–คอมพิวเตอร์ และกราฟิกส์1514 · The Frontier14 · พรมแดน1699 · Closing — The Tower, Seen Whole99 · ปิดเล่ม — หอคอยเมื่อมองทั้งหลัง