Docsity

Database Systems - Programming Language Translation - Lecture Slides, Slides of Programming Languages

Partial preview of the text

Download Database Systems - Programming Language Translation - Lecture Slides and more Slides Programming Languages in PDF only on Docsity!

Compiler Concepts for Database Systems

Overview

 Motivation and Background

 Database System Architecture

 Exploring its Capabilities  Focusing on Compiler-Related Concepts

 Compile Time Issues in Database Systems

 The SQL Query Language  Optimization Issues in Database Systems  Typing

 Runtime Issues in Database Systems

 Transaction Processing  Execution for Complex Joins

How Does it Compare to Java Environment?

Database Concepts - Summary

 Schema vs. Data

 Database-Structured Collection of Data Describing  Objects of Universe of Discourse being Modeling.  A Database Consists of Schema and Data  Schema: Describes the Intension (Type) of Objects  Data: Describes the Extension (Instances) of Objects

 What is Schema w.r.t. Compilers? What is Data?

What is a DBMS?

 Additional Functions:

 Interaction with File Manager  So that Details Related to Data Storage and Access are Removed From Application Programs  Integrity Enforcement  Guarantee Correctness, Validity, Consistency  Security Enforcement  Prevent Data From Illegal Uses  Concurrency Control  Control the Interference Between Concurrent Programs  Recovery from Failure  Query Processing and Optimization

 Again – What are Relevant Compiler Concepts?

DBMS Architecture

 DBMS Languages

 Data Definition Language (DDL)  Data Manipulation Language (DML)  From Embedded Queries or DB Commands Within a Program  “Stand-alone” Query Language

 Host Language:

 DML Specification (e.g., SQL) is Embedded in a “Host” Programming Language (e.g., Java, C++)

 DBMS Interfaces

 Menu-Based Interface  Graphical Interface  Forms-Based Interface  Interface for DBA (DB Administrator)

Components of a DBMS

ANSI/SPARC - Three Schema Architecture

 External Data Schema (Users’ view)

 Conceptual Data Schema (Logical Schema)

 Internal Data Schema (Physical Schema)

 What are the Programming Language Analogies?

Conceptual Schema

 Another Example – A Programming Language Level Definition

External Schema

 Describes Parts of the Information in the Conceptual Schema in a form Convenient to a Particular User Group’s View

 Derived from the Conceptual Schema

 What is the View of the Outside World in OO?

 Akin to Public Interface

Internal Schema

 Describes How the Information Described in the Conceptual Schema is Physically Represented in a Database to Provide the Overall Best Performance

Internal Schema

 Another Example

 This Corresponds to Data Typing and Layout in Compilers from Runtime Environment! Docsity.com

Database Access Process

 What Does This Access Process Resemble?

 Akin to Runtime Execution Environment!

 A More Complex Activation Process! Docsity.com

Metadata vs. Data

 Recall Introspection and Reflection in Java where you Can “Look” into the Class Definitions Themselves!