1.98k likes | 1.99k Views
Dive into relational data models, constraints, algebra, SQL schema, and design principles. Learn SQL basics, constraints, querying, and advanced techniques for efficient database management.
E N D
Chapter 5 The Relational Data Model and Relational Database Constraints
Relational Model Concepts • Domains, Attributes, Tuples, and Relations • Characteristics of Relations • Relational Model Notation
Relational Model Constraints and Relational Database Schemas • Domain Constraints • Key Constraints and Constraints on Null Values • Relational Databases and Relational Database Schemas • Entity Integrity, Referential Integrity, and Foreign Keys • Other Types of Constraints
Update Operations and Dealing with Constraint Violations • The Insert Operation • The Delete Operation • The Update Operation
Chapter 6 The Relational Algebra and Relational Calculus
Unary Relational Operations: SELECT and PROJECT • The SELECT Operation • The PROJECT Operation • Sequences of Operations and the RENAME Operation
Relational Algebra Operations from Set Theory • The UNION, INTERSECTION, and MINUS Operations • The CARTESIAN PRODUCT (or CROSS PRODUCT) Operation
Binary Relational Operations: JOIN and DIVISION • The JOIN Operation • The EQUIJOIN and NATURAL JOIN Variations of JOIN • A Complete Set of Relational Algebra Operations • The DIVISION Operation
Additional Relational Operations • Aggregate Functions and Grouping • Recursive Closure Operations • OUTER JOIN Operations • The OUTER JOIN Operation
The Tuple Relational Calculus • Tuple Variables and Range Relations • Expressions and Formulas in Tuple Relational Calculus • The Existential and Universal Quantifiers • Example Queries Using the Existential Quantifier • Transforming the Universal and Existential Quantifiers • Using the Universal Quantifier • Safe Expressions
Chapter 7 Relational Database Design by ER- and EER-to-Relational Mapping
Relational Database Design Using ER-to-Relational Mapping • ER-to-Relational Mapping Algorithm • Discussion and Summary of Mapping for Model Constructs
Mapping EER Model Constructs to Relations • Mapping of Specialization of Generalization • Mapping of Shared Subclasses (Multiple Inheritance) • Mapping of Categories (Union Types)
Chapter 8 SQL-99: Schema Definition, Basic Constraints, and Queries
SQL Data Definition and Data Types • Schema and Catalog Concepts in SQL • The CREATE TABLE Command in SQL • Attribute Data Types and Domains in SQL
Specifying Basic Constraints in SQL • Specifying Attribute Constraints and Attribute Defaults • Specifying Key and Referential Integrity Constraints • Giving Names to Constraints • Specifying Constraints on Tuples Using CHECK
Schema Change Statements in SQL • The DROP Command • The ALTER Command
Basic Queries in SQL • The SELECT-FROM-WHERE Structure of Basic SQL Queries • Ambiguous Attribute Names, Aliasing, and Tuple Variables • Unspecified WHERE Clause and Use of the Asterisk • Tables as Sets in SQL • Substring Pattern Matching and Arithmetic Operators • Ordering of Query Results
More Complex SQL Queries • Comparisons Involving NULL and Three-Valued Logic • Nested Queries, Tuples, and Set/Multiset Comparisions • Correlated Nested Queries • The EXISTS and UNIQUE Functions in SQL • Explicit Sets and Renaming of Attributes in SQL • Joined Tables in SQL • Aggregate Functions in SQL • Grouping: The GROUP BY and HAVING Clauses • Discussion and Summary of SQL Queries
Insert, Delete, and Update Statements in SQL • The INSERT Command • The DELETE Command • The UPDATE Command
Chapter 9 More SQL: Assertions, Views, and Programming Techniques
Views (Virtual Tables) in SQL • Concept of a View in SQL • Specification of Views in SQL • View Implementation and View Update
Database Programming: Issues and Techniques • Approaches to Database Programming • Impedence Mismatch • Typical Sequence of Interaction in Database Programming
Embedded SQL, Dynamic SQL, and SQLJ • Retrieving Single Tuples with Embedded SQL • Retrieving Multiple Tuples with Embedded SQL Using Cursors • Specifying Queries at Runtime Using Dynamic SQL • SQLJ: Embedding SQL Commands in JAVA • Retrieving Multiple Tuples in SQLJ Using Iterators
Database Programming with Function Calls: SQL/CLI and JDBC • Database Programming with SQL/CLI Using C as the Host Language • JDBC: SQL Function Calls for JAVA Programming
Database Stored Procedures and SQL/PSM • Database Stored Procedures and Functions • SQL/PSM: Extending SQL for Specifying Persistent Stored Modules
Chapter 10 Functional Dependencies and Normalization for Relational Databases
Informal Design Guidelines for Relation Schema • Semantics of the Relation Attributes • Redundant Information in Tuples and Update Anomalies • Null Values in Tuples • Generation of Spurious Tuples • Summary and Discussion of Design Guidelines
Functional Dependencies • Definition of Functional Dependency • Inference Rules for Functional Dependencies • Equivalence of Sets of Functional Dependencies • Minimal Sets of Functional Dependencies
Normal Forms Based on Primary Keys • Normalization of Relations • Practical Use of Normal Forms • Definition of Keys and Attributes Participating in Keys • First Normal Form • Second Normal Form • Third Normal Form
General Definitions of Second and Third Normal Forms • General Definition of Second Normal Form • General Definition of Third Normal Form • Interpreting the General Definition of Third Normal Form
Chapter 11 Relational Database Design Algorithms and Further Dependencies
Properties of Relational Decompositions • Relation Decomposition and Insufficiency of Normal Forms • Dependency Preservation Property of a Decomposition • Lossless (Nonadditive) Join Property of a Decomposition • Testing Binary Decomposition for the Nonadditive Join Property • Successive Lossless (Nonadditive) Join Decompositions
Algorithms for Relational Database Schema Design • Dependency-Preserving Decomposition into 3NF Schemas • Lossless (Nonadditive) Join Decomposition into BCNF Schemas • Dependency-Preserving and Nonadditive (Lossless) Join Decomposition into 3NF Schemas • Problems with Null Values and Dangling Tuples • Discussion of Normalization Algorithms
Multivalued Dependencies and Fourth Normal Form • Formal Definition of Multivalued Dependency • Inference Rules for Functional and Multivalued Dependencies • Fourth Normal Form • Lossless (Nonadditive) Join Decomposition into 4NF Relations
Other Dependencies and Normal Forms • Template Dependencies • Domain-Key Normal Form