版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、Define Database ObjectsCopyright 2001 Global Business Solutions, Inc.DefineDatabaseObjectsOBJECTIVESDefineTablespacesDefineTables andIndexesDefineSegments, Extents, andBlocksCopyright2001 GlobalBusinessSolutions, Inc.DefineDatabaseObjectsOverviewDatabaseTablespaceTables, indexes, etc.DatafilesSegmen
2、tExtentBlocksCopyright2001 GlobalBusinessSolutions, Inc.TablespacesLargest logicalunitofspaceConsist of oneormore datafilesSYSTEMtablespacemust existTablespaceCopyright2001 GlobalBusinessSolutions, Inc.TypesofTablespacesSystem/NonsystemOnline/OfflineRead-Write/Read-OnlyTransportableCopyright2001 Glo
3、balBusinessSolutions, Inc.Systemand NonsystemTablespacesSystemAtleastoneData DictionaryRollbackNonsystemFacilitatesAdministrationUser/Application Data, IndexesRollbackandTemporary SegmentsCopyright2001 GlobalBusinessSolutions, Inc.Onlineand OfflineTablespacesOnlineAvailabletoapplicationsTypicallytab
4、lespacesonlineOfflineNotavailable to users,even if database is availableUsefor maintenance,troubleshooting, or historicaldatanolongerneededOnlineOfflineCopyright2001 GlobalBusinessSolutions, Inc.Read-Write andRead-OnlyTablespacesRead-WriteCreate, alter,anddropdatabaseobjectsDefaultRead-OnlyCannotcre
5、ate or alter database objectsCandropcertain objectsCanreside on Wormdevice or CDROMEliminateredundant databackupsIdealforDataWarehouseapplications andLookuptablesRead-WriteRead-OnlyCopyright2001 GlobalBusinessSolutions, Inc.Tips forRead-OnlyTablespacesOrganizebymodificationrequirementsFrequencyofdat
6、achangeBackuprequirementSecurityrequirementUser requirementAssociated datafile cannotbe:Resized or haveautoextendset to onRenamed to anew datafile nameordirectoryOfflineCopyright2001 GlobalBusinessSolutions, Inc.Transportable TablespacesSystemTablespaceTransportableTablespaceSystemTablespaceExportIm
7、portCopyUtilityTransportableTablespaceSourceDatabaseTargetDatabaseCopyright2001 GlobalBusinessSolutions, Inc.Uses of TransportableTablespacesArchive OLTPand datawarehouse systemsTransferdata fromOLTPtodata warehousestaging systemsLoading datamartsfromcentral datawarehousesPublish dataMove index data
8、and avoid rebuildsCopyright2001 GlobalBusinessSolutions, Inc.TablesStoredinTablespacesOrganizedinrowsandcolumnsContain dataTablespaceTables, indexes, etc.DatafilesSegmentExtentBlocksCopyright2001 GlobalBusinessSolutions, Inc.TableDatatypesCHARVARCHAR2NUMBERDATALOBCustomersNameAddressPhone.George.123
9、Cherry555- 5555Copyright2001 GlobalBusinessSolutions, Inc.LargeObjectDatatypeStoreUnstructuredInformationText documentsStaticimagesVideoAudioCustomersNameAddress.PhotoGreetingGeorge.123 CherryCopyright2001 GlobalBusinessSolutions, Inc.LOBTypesCLOB storescharacterdataNCLOBstoresdouble-bytecharacter d
10、ataBLOB storesbinarydata:graphics, video,soundBFILEstorespointerstoexternalfilesExternalFileSystemCustomersNameHistoryPhotoGreetingGeorgeCopyright2001 GlobalBusinessSolutions, Inc.ExternalFileSystemLOBLocatorsLOBdatastoredseparatefromnon-LOB dataBFILEdata storedseparatefrom databaseTablespace ATable
11、NameAdd* (LocatorspointtoLOBand BFILE Locations)Tablespace BCopyright2001 GlobalBusinessSolutions, Inc.TemporaryTablesStoresession/transactionspecificdataShow dataonlytocreatingsessionDiscard dataoncommit or preserve datauntilsessionendsTablespace ATemp01Temp02Copyright2001 GlobalBusinessSolutions,
12、Inc.CustomersIndex# Name1 AcmeInc.2 Zacharys3 Maries4 ChimneyIndexesOptimizequeriesROWID(Block#.Row#.File#)StoredindependentoftablesConsume minimalspaceReduceI/OIndexonWHEREclausecolumnsCustomersTable# NameAddre.3 Maries4456Si1 AcmeInc.1236 Ch4 Chimney9024F2 Zacharys1234 BrCopyright2001 GlobalBusine
13、ssSolutions, Inc.IndexTypesUniqueDuplicates notallowedNon-uniqueDuplicates allowedXCopyright2001 GlobalBusinessSolutions, Inc.IndexTypesSingleColumnIndexRowidOrderNoBlock#.Seq#.File#0070000000A .0004 .00030070000000A .0005 .0003OrderNo ItemNo Cust.006989 001 ABC 006989 002 XYZ006989 003 USA007000 00
14、1 USA007000 002 GBSI007000 003 TEST007000 004 XYZ007234 005 WESTORDER TABLECopyright2001 GlobalBusinessSolutions, Inc.IndexTypesMulti-ColumnConcatenated, compositeIndexRowidOrderNo ItemNo Block#.Seq#.File#006989 001 0000A.0005.0003006989 002 0000A.0006.0003OrderNo ItemNoCust.007000001USA007000002GBS
15、I007000003TEST007234005WEST006989001ABC006989002XYZORDERTABLECopyright2001 GlobalBusinessSolutions, Inc.BalancedIndexTree (B*Tree)ROOTBRANCHROWIDPOINTERDATASEGMENT0000020004000000020002001249930003001400149995000700090005000599970007200810090009999ROWID|1/4” RolledSheet|100Feet|5 Days|C.O.D.LEAFCopy
16、right2001 GlobalBusinessSolutions, Inc.BitmapIndexBitmapcreatedforeachcolumnvalueCommonUsageVery Large TablesLow-CardinalityColumnsFeaturesRequiresminimal storageImprovesperformanceFBILLLISAANNTED10010110MGENDERCopyright2001 GlobalBusinessSolutions, Inc.FunctionBasedIndexCreateonfunctions or express
17、ionsUser generatedPL/SQLSQLfunctions (non-aggregate)Externalprogram (C callout)600500300250900660550330275990SALARY*1.10SALARYFunction-BasedSingleSQL SELECTsalary, salary*1.10 FROMemployees;Copyright2001 GlobalBusinessSolutions, Inc.PartitionDataDecomposetables andindexesEach partitioncanbestored in
18、 differenttablespaceCustomerCustNoCustNameState1KodakNYOracleCAUSSteelPA6QuestWA7MotorolaTXCustomersALINCustomersKSNYCustomersOHWYCopyright2001 GlobalBusinessSolutions, Inc.Advantages of PartitionsReducetimefordataloadsandindexcreationIncreaseavailabilityofmission-criticaldatabasesCreatepartition in
19、dependenceEnableconcurrentoperations on separate partitionsExecute queriesonpartitionsinstead of fulltablescanCopyright2001 GlobalBusinessSolutions, Inc.Advantages of PartitionsControl datastorageacrossphysicaldevicesMaintainpartitiontransparencyProgramsdonotneedtoreferencepartitionsProgramscantakea
20、dvantageofpartitionsCopyright2001 GlobalBusinessSolutions, Inc.EquipartitionsDatabaseobjects havesamelogicalpartitionsExamplesMasterand detailtableTableandindexOrderTableItem TableCustomerTableCustomerbyStateCopyright2001 GlobalBusinessSolutions, Inc.GlobalPartitionedIndexesCanimproveperformanceCanc
21、ontainkeys fromall partitionsofcorrespondingtableCustomerSalesIndexCustomersALINCustomersKSNYCustomersOHWYCopyright2001 GlobalBusinessSolutions, Inc.IndexOrganizedTablesData storedwith B*TreeindexTablemust haveprimarykey, which actsasindexAppropriateforcomplexorunstructureddataSpatialOLAPDataDataDat
22、a90009999DataDataDataDataDataData3001400149990000020004000DataDataData5000700090005000799900002999Copyright2001 GlobalBusinessSolutions, Inc.Tablespace andDatafileRelationshipTablespaceTables, indexes, etc.DatafilesSegmentExtentA tablespaceiscreatedwith oneormoredatafilesDatafilesare madeupofblocksB
23、locksCopyright2001 GlobalBusinessSolutions, Inc.Storage ObjectandSegmentRelationshipCreateastorage objectintablespaceTables, indexes, etc.are preallocatedtosegmentsSegmentExtentSegmentMySegmentBlocksCopyright2001 GlobalBusinessSolutions, Inc.DatabaseSegmentsSetofextentscontaining specific types of d
24、ataBootstrapSegmentTemporarySegmentRollbackSegmentIndexSegmentDataSegmentExtentExtentExtentCopyright2001 GlobalBusinessSolutions, Inc.Data SegmentsStoresrowsforTablesTablefeaturesContainsuser dataContainsData DictionarydataRowFeaturesContain unlimitednumberofrowsSpan blocks(chaining)Columns storedsi
25、de by sideBootstrapSegmentRollbackSegmentIndexSegmentDataSegmentCopyright2001 GlobalBusinessSolutions, Inc.IndexSegmentsCreated foreveryindexExistasseparatephysicalsegmentsfrom datasegmentUsually muchsmallerthan associateddatasegmentBootstrapSegmentRollbackSegmentIndexSegmentIndexSegmentCopyright200
26、1 GlobalBusinessSolutions, Inc.RollbackSegmentsRecordbefore image of modified dataAllowchanges to be undonebeforecommitSupport readconsistencySupport dataconcurrencySupport database recoveryA SYSTEMrollbacksegment is requiredBootstrapSegmentRollbackSegmentIndexSegmentRollbackSegmentCopyright2001 Glo
27、balBusinessSolutions, Inc.RollbackSegment TypesPrivateMust includesegmentname in ROLLBACK_SEGMENTS parameterPublicA poolofrollbacksegmentsthatmaybeacquiredbyany instance mounting databaseDeferredCreated in SYSTEMtablespace whentablespacetakenoffline andtransactionscannot be rolledbackCopyright2001 G
28、lobalBusinessSolutions, Inc.RollbackSegment UsageUndo dataiswrittentosegmentEach extentsupportsmultipletransactionsEach transaction writestoitsown block(s)Ifextentfills, automaticallyextendsIfallextentsfill,segment wrapsIfsegment wraps,undo dataoverwrittenIfundo datanot available,erroroccurs“Snapsho
29、ttooold”“Cannot allocate extent”Copyright2001 GlobalBusinessSolutions, Inc.Read ConsistencyWhen query executes:Current timedeterminedBlockswithsame timereadNewerblocksreconstructedwith rollback segmentsCustomers# NameAddress1 AcmeInc.123Ch2 Zacharys1234Br3 Maries4456Si4 Chimney9024FSELECT*FROM custo
30、merUPDATEcustomer. .Copyright2001 GlobalBusinessSolutions, Inc.TemporarySegmentsProvide temporaryworkspaceCreated automaticallyfor joins,indexes,sortsCreated on diskwhenmemoryfullSizedbyDEFAULT STORAGEclause of tablespaceReclaimedbySMONBootstrapSegmentRollbackSegmentIndexSegmentTemporarySegmentCopyright2001 GlobalBusinessSolutions, Inc.BootstrapSegmentContainsdictionary definitions loadedonopenIsnotuseraccessibleResides in SYSTEMtablespaceRequiresnoDBAmaintenanceBootstrapSegmentRollbackSegmentIndexSegmentBootstrapSegmentCopyright2001 GlobalBusinessSolutions, I
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 球團(tuán)焙燒工崗前客戶服務(wù)考核試卷含答案
- 再生物資挑選工安全管理測試考核試卷含答案
- 麥芽制麥工安全文化模擬考核試卷含答案
- 碳化鈦制備工崗前安全行為考核試卷含答案
- 船舶貨運(yùn)員創(chuàng)新實(shí)踐競賽考核試卷含答案
- 知識(shí)傳遞關(guān)愛延續(xù)
- 2026年吉安市白鷺洲中學(xué)面向高校招聘教師15人備考題庫(含答案詳解)
- 企業(yè)環(huán)境與職業(yè)健康管理制度
- 2026四川成都市雙流區(qū)東升葛陌幼兒園教師招聘1人備考題庫及答案詳解1套
- 2025北京國藥控股系統(tǒng)紀(jì)檢(巡察)人員招聘備考題庫及一套完整答案詳解
- 北師大版七年級(jí)上冊數(shù)學(xué) 期末復(fù)習(xí)講義
- 2023年初級(jí)經(jīng)濟(jì)師《初級(jí)人力資源專業(yè)知識(shí)與實(shí)務(wù)》歷年真題匯編(共270題)
- 赤峰南臺(tái)子金礦有限公司金礦2022年度礦山地質(zhì)環(huán)境治理計(jì)劃書
- 氣穴現(xiàn)象和液壓沖擊
- 公民健康素養(yǎng)知識(shí)講座課件
- 銷軸連接(-自編)
- GB/T 15623.2-2003液壓傳動(dòng)電調(diào)制液壓控制閥第2部分:三通方向流量控制閥試驗(yàn)方法
- 英語音標(biāo)拼讀練習(xí)
- 新外研版八年級(jí)上冊總復(fù)習(xí)知識(shí)點(diǎn)歸納
- 江蘇省泰州市各縣區(qū)鄉(xiāng)鎮(zhèn)行政村村莊村名居民村民委員會(huì)明細(xì)及行政區(qū)劃代碼
- 文言文入門課課件
評論
0/150
提交評論