數(shù)據(jù)庫系統(tǒng)概論新技術(shù)篇55講課件_第1頁
數(shù)據(jù)庫系統(tǒng)概論新技術(shù)篇55講課件_第2頁
數(shù)據(jù)庫系統(tǒng)概論新技術(shù)篇55講課件_第3頁
數(shù)據(jù)庫系統(tǒng)概論新技術(shù)篇55講課件_第4頁
數(shù)據(jù)庫系統(tǒng)概論新技術(shù)篇55講課件_第5頁
已閱讀5頁,還剩10頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認(rèn)領(lǐng)

文檔簡介

1、第8講開源數(shù)據(jù)庫系統(tǒng)8.1 概述8.2 PostgreSQL的學(xué)習(xí)、使用與定制8.3 PostgreSQL的主題分析An Introduction to Database System8.2PostgreSQL的學(xué)習(xí)、使用與定制8.2.1三步法可用于各種開源數(shù)據(jù)庫的理解、掌握8.2.2總結(jié)An Introduction to Database System三步法v學(xué)習(xí)實例系統(tǒng)v多層次使用v做的“板凳”An Introduction to Database SystemStep1-學(xué)習(xí)實例系統(tǒng)vv理解代碼樹生成并安裝系統(tǒng)=靜態(tài)特征=了解進程結(jié)構(gòu)運行并使用PG=動態(tài)特征=學(xué)習(xí)PG系統(tǒng)級開發(fā)的ABC

2、DEvvvAn Introduction to Database System代碼結(jié)構(gòu)backendaccessvPG (source Insight)bootstrapcatalogcommandsexecutorliblibpqmainnodesoptimizerparserpoportpostmasterregexrewritesnowballstoragetcoptsearchutilsAn Introduction to Database System<DIR><DIR><DIR><DIR>config contrib doc srcb

3、ackendbinincludeinterfacesmakefilesplporttemplatetesttimezonetoolstutorial代碼模塊示例服務(wù)器管理器-src/backend/postmaster/vnnnnnnn主nautovacuum.c bgwriter.c pgarch.c pgstat.c postmaster.c syslogger.c walwriter.c-src/backend/main/main.cvv系統(tǒng)實用工具-src/bin/nninitdb/initdb.cpg_ctl/pg_ctl.cAn Introduction to Database S

4、ystem生成+安裝v閱讀安裝手冊nPG的手冊很詳細 - 多個平臺v簡明安裝步驟-Linux/Unix1.2.3.4.5.6.7.8.9.10.11.12./configuremakesumake install adduser postgresmkdir /usr/local/pgsql/datachown postgres /usr/local/pgsql/datasu - postgres/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data/usr/local/pgsql/bin/postgres -D /usr/local/pgsql

5、/data >logfile 2>&1 &/usr/local/pgsql/bin/createdb test/usr/local/pgsql/bin/psql testAn Introduction to Database System進程結(jié)構(gòu)v 動態(tài)特征n1:1psqlapp1appkautovacuumlauncherstatisticscollectorbgwriter進程postmaster(postgres)walwritepostgrespostgrespostgresAn Introduction to Database System系統(tǒng)啟動vpos

6、tgres opts1.2.3.4.保存環(huán)境變量設(shè)置本地化檢查命令行參數(shù) 進入不同執(zhí)行模式-boot:(bootstrap)初始化數(shù)據(jù)庫-describe-config:顯示系統(tǒng)配置-single:單用戶模式執(zhí)行<default>:啟動多用戶模式An Introduction to Database System數(shù)據(jù)庫創(chuàng)建和初始化v 數(shù)據(jù)庫初始化n initdbn bootstrap模式:postgres boot n BKI命令:share/postgres.bkiv 思想:如何從無到有An Introduction to Database System運行和維護-Client

7、Appv 數(shù)據(jù)庫創(chuàng)建(fromTemplate)n createdb optsn createuser optsv 空間整理(GC)n vacuumdb optsv 數(shù)據(jù)導(dǎo)出/導(dǎo)入(backup)n pg_dump optsn pg_restore optsAn Introduction to Database System學(xué)習(xí)系統(tǒng)級開發(fā)的ABCDEA.B.C.設(shè)計多進程體系多模式運行-滿足不同需求充分利用各種工具-sh/awk/perl/bison/flexD.可擴展性考慮E.源代碼結(jié)構(gòu)清晰An Introduction to Database SystemStep2-多層次使用v的教學(xué)用D

8、BMS(L1)概論的實習(xí)系統(tǒng)psql + pg-bennv開發(fā)使用數(shù)據(jù)庫的應(yīng)用系統(tǒng)(L2)nC/S或B/A/Sv個人代碼倉庫(codestore) (L3)nn典型數(shù)據(jù)結(jié)構(gòu)-list/hash/queue算法案例-memcxt, dynahashAn Introduction to Database SystemStep3-做的“板凳”v 簡單定制-不同選項的執(zhí)行碼eg. configure -enable-debugv高級定制-修改元數(shù)據(jù)表1.2.增加built-in 定義-eg. cur_role(某個.c文件)修改系統(tǒng)表-eg. pg_proc(catalog/pg_proc.h)v模塊定制-擴展子系統(tǒng)eg. 增強管理器(smgr, storage manager)Magnet disk + SSD + flash + .An Introduction to

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論