《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 8 Complex Data Types

Outline Semi-Structured Data ■Object Orientation Textual Data ■Spatial Data Database System Concepts-7th Edition 8.2 ©Silberscha乜,Korth and Sudarshan
Database System Concepts - 7 8.2 ©Silberschatz, Korth and Sudarshan th Edition Outline ▪ Semi-Structured Data ▪ Object Orientation ▪ Textual Data ▪ Spatial Data

Semi-Structured Data Many applications require storage of complex data,whose schema changes often The relational model's requirement of atomic data types may be an overkill E.g.,storing set of interests as a set-valued attribute of a user profile may be simpler than normalizing it Data exchange can benefit greatly from semi-structured data Exchange can be between applications,or between back-end and front-end of an application Web-services are widely used today,with complex data fetched to the front-end and displayed using a mobile app or JavaScript JSON and XML are widely used semi-structured data models Database System Concepts-7th Edition 8.3 ©Silberscha乜,Korth and Sudarshan
Database System Concepts - 7 8.3 ©Silberschatz, Korth and Sudarshan th Edition Semi-Structured Data ▪ Many applications require storage of complex data, whose schema changes often ▪ The relational model’s requirement of atomic data types may be an overkill • E.g., storing set of interests as a set-valued attribute of a user profile may be simpler than normalizing it ▪ Data exchange can benefit greatly from semi-structured data • Exchange can be between applications, or between back-end and front-end of an application • Web-services are widely used today, with complex data fetched to the front-end and displayed using a mobile app or JavaScript ▪ JSON and XML are widely used semi-structured data models

Features of Semi-Structured Data Models ■Flexible schema Wide column representation:allow each tuple to have a different set of attributes,can add new attributes at any time 。} Sparse column representation:schema has a fixed but large set of attributes,by each tuple may store only a subset Multivalued data types ·Sets,multisets E.g.,:set of interests {'basketball,'La Liga','cooking','anime',jazz') Key-value map (or just map for short) Store a set of key-value pairs E.g.,{(brand,Apple),(ID,MacBook Air),(size,13),(color,silver)) Operations on maps:put(key,value),get(key),delete(key) ·,Arrays Widely used for scientific and monitoring applications Database System Concepts-7th Edition 8.4 ©Silberscha乜,Korth and Sudarshan
Database System Concepts - 7 8.4 ©Silberschatz, Korth and Sudarshan th Edition Features of Semi-Structured Data Models ▪ Flexible schema • Wide column representation: allow each tuple to have a different set of attributes, can add new attributes at any time • Sparse column representation: schema has a fixed but large set of attributes, by each tuple may store only a subset ▪ Multivalued data types • Sets, multisets ▪ E.g.,: set of interests {‘basketball, ‘La Liga’, ‘cooking’, ‘anime’, ‘jazz’} • Key-value map (or just map for short) ▪ Store a set of key-value pairs ▪ E.g., {(brand, Apple), (ID, MacBook Air), (size, 13), (color, silver)} ▪ Operations on maps: put(key, value), get(key), delete(key) • , Arrays ▪ Widely used for scientific and monitoring applications

Features of Semi-Structured Data Models ■Arrays Widely used for scientific and monitoring applications E.g.,readings taken at regular intervals can be represented as array of values instead of(time,value)pairs ■[5,8,9,11]instead of{(1,5),(2,8),(3,9),(4,11)} Multi-valued attribute types Modeled using non first-normal-form(NFNF)data model Supported by most database systems today Array database:a database that provides specialized support for arrays E.g.,compressed storage,query language extensions etc Oracle GeoRaster,PostGIS,SciDB,etc Database System Concepts-7th Edition 8.5 ©Silberscha乜,Korth and Sudarshan
Database System Concepts - 7 8.5 ©Silberschatz, Korth and Sudarshan th Edition Features of Semi-Structured Data Models ▪ Arrays • Widely used for scientific and monitoring applications • E.g., readings taken at regular intervals can be represented as array of values instead of (time, value) pairs ▪ [5, 8, 9, 11] instead of {(1,5), (2, 8), (3, 9), (4, 11)} ▪ Multi-valued attribute types • Modeled using non first-normal-form (NFNF) data model • Supported by most database systems today ▪ Array database: a database that provides specialized support for arrays • E.g., compressed storage, query language extensions etc • Oracle GeoRaster, PostGIS, SciDB, etc

Nested Data Types Hierarchical data is common in many applications JSON:JavaScript Object Notation ·Videly used today XML:Extensible Markup Language Earlier generation notation,still used extensively Database System Concepts-7th Edition 8.6 ©Silberscha乜,Korth and Sudarshan
Database System Concepts - 7 8.6 ©Silberschatz, Korth and Sudarshan th Edition Nested Data Types ▪ Hierarchical data is common in many applications ▪ JSON: JavaScript Object Notation • Widely used today ▪ XML: Extensible Markup Language • Earlier generation notation, still used extensively

JSON Textual representation widely used for data exchange Example of JSON data "ID":"22222", "name": "firstname:"Albert", "lastname:"Einstein" }, "deptname":"Physics", "children": {"firstname":"Hans","lastname":"Einstein"}, {"firstname":"Eduard","lastname":"Einstein"} ] } Types:integer,real,string,and Objects:are key-value maps,i.e.sets of (attribute name,value)pairs Arrays are also key-value maps(from offset to value) Database System Concepts-7th Edition 8.7 ©Silberschat乜,Korth and Sudarshan
Database System Concepts - 7 8.7 ©Silberschatz, Korth and Sudarshan th Edition JSON ▪ Textual representation widely used for data exchange ▪ Example of JSON data { "ID": "22222", "name": { "firstname: "Albert", "lastname: "Einstein" }, "deptname": "Physics", "children": [ {"firstname": "Hans", "lastname": "Einstein" }, {"firstname": "Eduard", "lastname": "Einstein" } ] } ▪ Types: integer, real, string, and • Objects: are key-value maps, i.e. sets of (attribute name, value) pairs • Arrays are also key-value maps (from offset to value)

JSON JSON is ubiquitous in data exchange today Widely used for web services Most modern applications are architected around on web services ■SQL extensions for JSON types for storing JSON data Extracting data from JSON objects using path expressions 。E.g.V->lD,orv.lD Generating JSON from relational data E.g.json.build_object('ID',12345,'name','Einstein') Creation of JSON collections using aggregation E.g.json_agg aggregate function in PostgreSQL Syntax varies greatly across databases ■JSON is verbose Compressed representations such as BSON(Binary JSON)used for efficient data storage Database System Concepts-7th Edition 8.8 @Silberschatz,Korth and Sudarshan
Database System Concepts - 7 8.8 ©Silberschatz, Korth and Sudarshan th Edition JSON ▪ JSON is ubiquitous in data exchange today • Widely used for web services • Most modern applications are architected around on web services ▪ SQL extensions for • JSON types for storing JSON data • Extracting data from JSON objects using path expressions ▪ E.g. V-> ID, or v.ID • Generating JSON from relational data ▪ E.g. json.build_object(‘ID’, 12345, ‘name’, ‘Einstein’) • Creation of JSON collections using aggregation ▪ E.g. json_agg aggregate function in PostgreSQL • Syntax varies greatly across databases ▪ JSON is verbose • Compressed representations such as BSON (Binary JSON) used for efficient data storage

XML XML uses tags to mark up text E.g. CS-101 Intro.to Computer Science Comp.Sci. 4 Tags make the data self-documenting Tags can be hierarchical Database System Concepts-7th Edition 8.9 @Silberschatz,Korth and Sudarshan
Database System Concepts - 7 8.9 ©Silberschatz, Korth and Sudarshan th Edition XML ▪ XML uses tags to mark up text ▪ E.g. CS-101 Intro. to Computer Science Comp. Sci. 4 ▪ Tags make the data self-documenting ▪ Tags can be hierarchical

Example of Data in XML P-101 Cray Z.Coyote Route 66,Mesa Flats,Arizona 86047,USA Acme Supplies 1 Broadway,New York,NY,USA RS1 Atom powered rocket sled 2 199.95 ... 429.85 Database System Concepts-7th Edition 8.10 ©Silberscha乜,Korth and Sudarshan
Database System Concepts - 7 8.10 ©Silberschatz, Korth and Sudarshan th Edition Example of Data in XML ▪ P-101 Cray Z. Coyote Route 66, Mesa Flats, Arizona 86047, USA Acme Supplies 1 Broadway, New York, NY, USA RS1 Atom powered rocket sled 2 199.95 … 429.85 …

XML Cont. XQuery language developed to query nested XML structures Not widely used currently SQL extensions to support XML ·Store XML data Generate XML data from relational data Extract data from XML data types Path expressions See Chapter 30(online)for more information Database System Concepts-7th Edition 8.11 ©Silberscha乜,Korth and Sudarshan
Database System Concepts - 7 8.11 ©Silberschatz, Korth and Sudarshan th Edition XML Cont. ▪ XQuery language developed to query nested XML structures • Not widely used currently ▪ SQL extensions to support XML • Store XML data • Generate XML data from relational data • Extract data from XML data types ▪ Path expressions ▪ See Chapter 30 (online) for more information
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 7 Normalization.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 6 Database Design Using the E-R Model.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 5 Advanced SQL.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 4 Intermediate SQL.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 31 Information Retrieval.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 30 XML.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 3 Introduction to SQL.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 29 Object-Based Databases.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 28 Advanced Relational Database Design.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 27 Formal-Relational Query Languages.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 26 Blockchain Databases.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 25 Advanced Application Development.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 24 Advanced Indexing.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 23 Parallel and Distributed Transaction Processing.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 22 Parallel and Distributed Query Processing.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 21 Parallel and Distributed Storage.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 20 Database System Architectures.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 2 Intro to Relational Model.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 19 Recovery System.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 18 Concurrency Control.pptx
- 《数据库系统概念 Database System Concepts》原书教学资源(第七版,PPT课件讲稿,英文版)Chapter 9 Application Development.pptx
- 计算机科学与技术教学资源(参考文献)The generalized Cholesky factorization method for saddle point problems.pdf
- 计算机科学与技术教学资源(参考文献)Inverse updating and downdating for weighted linear least squares using M-invariant reflections.pdf
- 计算机科学与技术教学资源(参考文献)Analysis of peaks and plateaus in a Galerkin/minimal residual pair of methods.pdf
- 计算机科学与技术教学资源(参考文献)Perturbation analysis for the generalized Cholesky factorization.pdf
- 计算机科学与技术教学资源(参考文献)STABILITY OF THE MATRIX FACTORIZATION FOR SOLVING BLOCK TRIDIAGONAL SYMMETRIC INDEFINITE LINEAR SYSTEMS.pdf
- 计算机科学与技术教学资源(参考文献)A Convergent Restarted GMRES Method For Large Linear Systems.pdf
- 计算机科学与技术教学资源(参考文献)Properties and Computations of Matrix Pseudospectra.pdf
- 计算机科学与技术(参考文献)A Novel Constrained Texture Mapping Method Based on Harmonic Map.pdf
- 计算机科学与技术(参考文献)A Robust and Fast Non-local Algorithm for Image Denoising.pdf
- 计算机科学与技术(参考文献)Efficient View Manipulation for Cuboid-Structured Images.pdf
- 计算机科学与技术(参考文献)Ensemble of trusted firmware services based on TPM.pdf
- 计算机科学与技术(参考文献)Fuzzy Quantization Based Bit Transform for Low Bit-Resolution Motion Estimation.pdf
- 计算机科学与技术(参考文献)Image Completion based on Views of Large Displacement.pdf
- 计算机科学与技术(参考文献)Image and Video Retexturing.pdf
- 计算机科学与技术(参考文献)Learning-Based 3D Face Detection Using Geometric Context.pdf
- 计算机科学与技术(参考文献)Multi-view Video Summarization.pdf
- 计算机科学与技术(参考文献)Mesh-Guided Optimized Retexturing for Image and Video.pdf
- 计算机科学与技术(参考文献)Object Tracking Using Learned Feature Manifolds.pdf
- 计算机科学与技术(参考文献)PG_2012_Photo_Optimization.pdf