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