Skip to Content
Python 技術手冊 第三版
book

Python 技術手冊 第三版

by lex Martelli, Anna Martelli Ravenscroft, Steve Holden
January 2018
Intermediate to advanced
856 pages
17h 17m
Chinese
GoTop Information, Inc.
Content preview from Python 技術手冊 第三版
381
11
續存和資料庫
Python 支援數種保存資料(persisting data)的方式。其中一種方式,
序列化
serialization
,會將資料視為 Python 物件所成的一個群集(a
collection of Python objects)。這些物件可以被
序列化
serialized
,儲
存)為一個位元組資料流(byte stream),並在之後從這個位元組資料流
解序列化
deserialized
,載入並重新建立)回資料。
物件續存
object
persistence
則奠基於序列化之上,新增像是物件命名(object naming)的
功能。本章涵蓋支援序列化與物件續存的 Python 模組。
讓資料續存的另一種方式是將它儲存在一個資料庫(databaseDB)中,
有一種簡單的 DB 是使用
透過鍵值的存取
keyed access
來選擇性讀取或
更新資料特定部分的檔案格式(file formats)。本章涵蓋支援數個這種檔案
格式的 Python 標準程式庫模組,叫做
DBM
關聯式
DB
管理系統
relational DB management system
RDBMS),
PostgreSQL Oracle,提供一種更為強大的方式來儲存、搜尋和取
回(retrieving)續存的資料。關聯式 DB 仰賴
Structured Query Language
SQL)的方言來建立或變更一個 DB 的綱要(schema)、插入或更新 DB
中的資料,以及根據搜尋條件 ...
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

利用 Python 进行数据分析(原书第2版)

利用 Python 进行数据分析(原书第2版)

Wes McKinney

Publisher Resources

ISBN: 9789864766819