Docsity

Review of Database Systems: Relational Model, XML, Data Organization, Query & Transaction, Slides of Introduction to Database Management Systems

Toggle sidebar
bg1
1
2
Announcements
๎š™Homework #3 grades recorded
๎š™Homework #4 due today (December 2)
๎šƒWill be graded this weekend
๎šƒSample solution will be available at your demo
๎š™Remember to sign up for course project demo (see email)
๎š™Final exam next Friday (December 10) 7โ€“10pm
๎šƒComprehensive (everything up to todayโ€™s lecture, with emphasis
on the second half of the course, and materials exercised in
homework assignments)
๎šƒOpen book, open notes
๎šƒSame format as sample final exam
โ€ข Sample solution will be available at your demo
๎šƒNo time pressure (I promise!)
3
Review: relational basics
๎š™Relational model/algebra โ†’physical data independence
๎š™Entity-relationship design
๎š™Design theory (FDโ€™s, MVDโ€™s, 3NF, BCNF, 4NF) โ†’help eliminate
redundancy
๎š™SQL
๎šƒNULL and three-value logic โ†’nifty feature, big mess
๎šƒBag versus set semantics
๎šƒSFW (or SPJ) queries, subqueries, grouping and aggregation
๎šƒModifications
๎šƒConstraints โ†’the more you know the better you can do
๎šƒTriggers (ECA) โ†’โ€œactiveโ€ data
๎šƒViews โ†’logical data independence
๎šƒIndexes โ†’reintroduce redundancy to improve performance
๎šƒTransactions and isolation levels
4
Review: XML
๎š™Data model: well-formed vs. valid (DTD โ‰ˆschema)
๎š™Query languages
๎šƒXPath: (branching) path expressions (with conditions)
๎šƒXQuery: FLWR, subqueries in return (restructuring), quantified
expressions, aggregation, ordering
๎šƒXSLT: structural recursion with templates
๎š™Programming: SAX (one pass) vs. DOM (in memory)
๎š™Relational vs. XML
๎šƒTables vs. hierarchies (or graphs in general)
๎šƒStoring XML as relations
โ€ข Schema-oblivious: node/edge based, interval based, path based, etc.
โ€ข Schema-aware
โ†’Joins vs. path traversals
5
Review: physical data organization
๎š™Storage hierarchy (DC vs. Pluto) โ†’count I/Oโ€™s
๎š™Disk geometry: three components of access cost; random vs.
sequential I/O
๎š™Data layout
๎šƒRecord layout (handling variable-length fields, NULLโ€™s)
๎šƒBlock layout (NSM, PAX) โ†’inter-/intra-record locality
๎š™Access paths
๎šƒPrimary versus secondary indexes
๎šƒTree-based indexes: ISAM, B+-tree
๎šƒText indexes: inverted lists, signature files, tries
โ†’Again, reintroduce redundancy to improve performance
โ†’Fundamental trade-off: query versus update cost
6
Review: query processing, optimization
๎š™Processing
๎šƒScan-based algorithms
๎šƒSort- and hash-based algorithms (and their duality)
๎šƒIndex-based algorithms
๎šƒPipelined execution with iterators
๎š™Optimization (or โ€œgoodificationโ€?)
๎šƒHeuristics: push selections down; smaller joins first
โ†’Reduce the size of intermediate results
๎šƒCost-based
โ€ข Query rewrite: merge blocks to get a bigger search space
โ€ข Cost estimation: result size estimation; use statistics
โ€ข Search algorithm: dynamic programming (+ interesting orders)
7
Review: transaction processing
๎š™ACID properties
๎š™Concurrency control
๎šƒSerial and conflict-serializable schedules
๎šƒLocking-based: 2PL, strict 2PL
๎š™Recovery with logging
๎šƒSteal: requires undo logging
๎šƒNo force: requires redo logging
๎šƒWAL (log holds the truth)
๎šƒFuzzy checkpointing

Partial preview of the text

Download Review of Database Systems: Relational Model, XML, Data Organization, Query & Transaction and more Slides Introduction to Database Management Systems in PDF only on Docsity!

2

Announcements

ย™ Homework #3 grades recorded

ย™ Homework #4 due today (December 2)

ยƒ Will be graded this weekend ยƒ Sample solution will be available at your demo

ย™ Remember to sign up for course project demo (see email)

ย™ Final exam next Friday (December 10) 7โ€“10pm

ยƒ Comprehensive (everything up to todayโ€™s lecture, with emphasis on the second half of the course, and materials exercised in homework assignments) ยƒ Open book, open notes ยƒ Same format as sample final exam

  • Sample solution will be available at your demo ยƒ No time pressure (I promise!)

3

Review: relational basics

ย™ Relational model/algebra โ†’ physical data independence ย™ Entity-relationship design ย™ Design theory (FDโ€™s, MVDโ€™s, 3NF, BCNF, 4NF) โ†’ help eliminate redundancy ย™ SQL ยƒ NULL and three-value logic โ†’ nifty feature, big mess ยƒ Bag versus set semantics ยƒ SFW (or SPJ) queries, subqueries, grouping and aggregation ยƒ Modifications ยƒ Constraints โ†’ the more you know the better you can do ยƒ Triggers (ECA) โ†’ โ€œactiveโ€ data ยƒ Views โ†’ logical data independence ยƒ Indexes โ†’ reintroduce redundancy to improve performance ยƒ Transactions and isolation levels

4

Review: XML

ย™ Data model: well-formed vs. valid (DTD โ‰ˆ schema)

ย™ Query languages

ยƒ XPath: (branching) path expressions (with conditions) ยƒ XQuery: FLWR, subqueries in return (restructuring), quantified expressions, aggregation, ordering ยƒ XSLT: structural recursion with templates

ย™ Programming: SAX (one pass) vs. DOM (in memory)

ย™ Relational vs. XML

ยƒ Tables vs. hierarchies (or graphs in general) ยƒ Storing XML as relations

  • Schema-oblivious: node/edge based, interval based, path based, etc.
  • Schema-aware โ†’ Joins vs. path traversals

5

Review: physical data organization

ย™ Storage hierarchy (DC vs. Pluto) โ†’ count I/Oโ€™s

ย™ Disk geometry: three components of access cost; random vs.

sequential I/O

ย™ Data layout

ยƒ Record layout (handling variable-length fields, NULLโ€™s) ยƒ Block layout (NSM, PAX) โ†’ inter-/intra-record locality

ย™ Access paths

ยƒ Primary versus secondary indexes ยƒ Tree-based indexes: ISAM, B+^ -tree ยƒ Text indexes: inverted lists, signature files, tries โ†’ Again, reintroduce redundancy to improve performance โ†’ Fundamental trade-off: query versus update cost

6

Review: query processing, optimization

ย™ Processing

ยƒ Scan-based algorithms ยƒ Sort- and hash-based algorithms (and their duality) ยƒ Index-based algorithms ยƒ Pipelined execution with iterators

ย™ Optimization (or โ€œgoodificationโ€?)

ยƒ Heuristics: push selections down; smaller joins first โ†’ Reduce the size of intermediate results ยƒ Cost-based

  • Query rewrite: merge blocks to get a bigger search space
  • Cost estimation: result size estimation; use statistics
  • Search algorithm: dynamic programming (+ interesting orders)

7

Review: transaction processing

ย™ ACID properties

ย™ Concurrency control

ยƒ Serial and conflict-serializable schedules

ยƒ Locking-based: 2PL, strict 2PL

ย™ Recovery with logging

ยƒ Steal: requires undo logging

ยƒ No force: requires redo logging

ยƒ WAL (log holds the truth)

ยƒ Fuzzy checkpointing