70 likes | 200 Vues
This overview explores the foundational concepts of relational databases, focusing on their set-theoretic basis, schema structure, and core functionalities like selection, projection, and relational algebra. We discuss the unique benefits of declarative calculus, normalization, and integrity constraints. Additionally, we touch on object-relational databases, highlighting the complexity of data types, integration of object IDs, and challenges in optimization. This examination provides insights into the evolution of data management practices and the balance between traditional relational models and emerging NoSQL trends.
E N D
Relational DBs • Basics
Formally understood • Set theoretic • Originally defined with an algebra, with Selection, Projection, Join, and Union/Difference/Intersection • Declarative calculus that is based on the algebra and supports large grained queries • Clean implementation spec • Unambiguous optimization - with its own algebra of query parse tree transformations
Structure • Schema based - we can leverage this to address volume • Tables, rows, columns, domains • Keys (PK and CK) • FKs • Triggers as a catch-all integrity constraint • Normalization for formal table minimization
Semantics are in queries • Relational algebra compliant • Queries written in declarative calculus • Set-oriented • Programmers tend to follow PK/FK pairs • Query results are legal tables (Views)
Also we get • Fixed size tuples for easy row-optimization • 2P transactions • Table, Row distribution • Two language based, with lowest common denominator semantics • Security • Checkpointing • Powerful query optimizers
Object-relational DBs • This runs somewhat counter to NoSQL trends - we make the data types even more complex • We make domains out of type constructors • Object IDs • A row can be a tuple - or an object, with an object ID and a tuple, making all relational DBs also O-R
Object-oriented DBs • No tuple rows • Blend SQL and the app language • This avoids lowest common denominator semantics • These bombed, as relational DBs were not O-O • And they are tough to optimize