Skip to Content
Bad Data 技術手冊
book

Bad Data 技術手冊

by Q. Ethan McCallum
September 2013
Intermediate to advanced
264 pages
5h
Chinese
GoTop Information, Inc.
Content preview from Bad Data 技術手冊
156
|
第十二章:當資料庫攻擊時:何時要堅持使用檔案的守則
將檔案視為你的資料儲存
有時,你最好不要使用資料庫,而使用檔案系統來當成你的資料儲存。考慮以下的事項:
檔案很簡單!
簡單性與普遍性是很難在科技產品中找到的好處。當你使用檔案時,你就不用擔心一些
繁文縟節。
檔案可以用在任何事物上
幾乎所有的東西都需要知道要如何處理你的資料。工具程式需要被教導,以理解要如何
從你的檔案中抽出結構。這通常並不是個嚴重的障礙。若你跟隨一些常見的規範,例如
使用常見且一致的分隔字元,那麼就沒事了。
將它與傳統的資料庫系統比較,你通常都需要一個特定的適配器(adapter),也就是
可能要擁有它自己的 API。若你使用一個抽象層,如物件關聯對應(object-relational
mapperORM),那麼你就需要瞭解它獨特的語法。近期的資料庫通常會提供 HTTP
API,但這仍然比開啟並且讀取檔案要來的更累人。
讓所有的東西都能夠讀取你的資料,讓身為資料管理者的你的生活更簡單。它很簡單能
夠在程式語言以及工具之間置換(也許你想要用 R
ggplot2
來繪圖,Python NLTK
來作自然語言處理,Octave 來作矩陣運算,以及 Fortran 來作有效率的數值運算)。
Hadoop 以及其他 MapReduce 的實作也通常都能夠使用檔案來運作。這樣很簡單就能用
特定的方式來處理資料。一行的 Python 程式碼可以(暫時的)建立一個網站伺服器:
python -m SimpleHTTPServer 8080 ...
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

RxJava反应式编程

RxJava反应式编程

Tomasz Nurkiewicz, Ben Christensen
高效能PYTHON程式設計

高效能PYTHON程式設計

Micha Gorelick, Ian Ozsvald
Kubernetes编程

Kubernetes编程

Michael Hausenblas, Stefan Schimanski

Publisher Resources

ISBN: 9789862768952