CPSC-608 Database Systems

Slides:



Advertisements
Similar presentations
Foundations of Relational Implementation n Defining Relational Data n Relational Data Manipulation n Relational Algebra.
Advertisements

CPSC 310/6031 CPSC 310 Database Systems CPSC 603 Database Systems and Applications Prof. Jennifer Welch.
CPSC-608 Database Systems Fall 2009 Instructor: Jianer Chen Office: HRBB 309B Phone: Notes #2.
CPSC-608 Database Systems Fall 2011 Instructor: Jianer Chen Office: HRBB 315C Phone: Notes #6.
CPSC-608 Database Systems Fall 2011 Instructor: Jianer Chen Office: HRBB 315C Phone: Notes #13.
CPSC-608 Database Systems Fall 2011 Instructor: Jianer Chen Office: HRBB 315C Phone: Notes #9.
CPSC-608 Database Systems Fall 2011 Instructor: Jianer Chen Office: HRBB 315C Phone: Notes #14.
CPSC-608 Database Systems Fall 2010 Instructor: Jianer Chen Office: HRBB 315C Phone: Notes 1.
Mgt 20600: IT Management & Applications Databases Tuesday April 4, 2006.
CPSC-608 Database Systems Fall 2010 Instructor: Jianer Chen Office: HRBB 315C Phone: Notes #6.
CPSC-608 Database Systems Fall 2011 Instructor: Jianer Chen Office: HRBB 315C Phone: Notes 1.
Database Management Systems (DBMS)
DATABASE MANAGEMENT SYSTEM ARCHITECTURE
Database System Concepts and Architecture Lecture # 3 22 June 2012 National University of Computer and Emerging Sciences.
Information storage: Introduction of database 10/7/2004 Xiangming Mu.
1 Introduction to databases concepts CCIS – IS department Level 4.
Database Technical Session By: Prof. Adarsh Patel.
CST203-2 Database Management Systems Lecture 2. One Tier Architecture Eg: In this scenario, a workgroup database is stored in a shared location on a single.
©Silberschatz, Korth and Sudarshan1.1Database System Concepts COMP319: Introduction Course Structure Course Assessment Review: DBMS Structure Review: Terminology.
Lecture2: Database Environment Prepared by L. Nouf Almujally 1 Ref. Chapter2 Lecture2.
1 CS 430 Database Theory Winter 2005 Lecture 2: General Concepts.
The University of Akron Dept of Business Technology Computer Information Systems The Relational Model: Concepts 2440: 180 Database Concepts Instructor:
INTRODUCTION TO DBS Database: a collection of data describing the activities of one or more related organizations DBMS: software designed to assist in.
DATABASE MANAGEMENT SYSTEM ARCHITECTURE
CPSC-608 Database Systems Fall 2015 Instructor: Jianer Chen Office: HRBB 315C Phone: Notes #8.
LECTURE TWO Introduction to Databases: Data models Relational database concepts Introduction to DDL & DML.
Fundamental of Database Systems
CPSC-310 Database Systems
Scholastic Dishonesty
CS 325 Spring ‘09 Chapter 1 Goals:
Introduction to DBMS Purpose of Database Systems View of Data
CPSC-310 Database Systems
CS4222 Principles of Database System
Datab ase Systems Week 1 by Zohaib Jan.
Chapter 2 Database Environment.
Chapter 2 Database System Concepts and Architecture
Chapter 2: Intro to Relational Model
Introduction To Database Systems
CPSC-608 Database Systems
Introduction What is a Database?.
CPSC-310 Database Systems
CPSC-608 Database Systems
Chapter 3: Intro to Relational Model
Chapter 2: Intro to Relational Model
CPSC-608 Database Systems
Chapter 2 Database Environment.
Introduction to Database Systems
Chapter 2 Database Environment Pearson Education © 2009.
Chapter 2 Database Environment.
Database Environment Transparencies
Data Model.
Introduction to DBMS Purpose of Database Systems View of Data
Chapter 2: Intro to Relational Model
Chapter 2: Intro to Relational Model
CPSC-608 Database Systems
Chapter 2 Database Environment Pearson Education © 2014.
Scholastic Dishonesty
CPSC-608 Database Systems
CPSC-608 Database Systems
CPSC-608 Database Systems
CPSC-608 Database Systems
CPSC-608 Database Systems
CPSC-608 Database Systems
CPSC-608 Database Systems
CPSC-608 Database Systems
CPSC-608 Database Systems
CPSC-608 Database Systems
Chapter 2 Database Environment Pearson Education © 2009.
Chapter 2 Database Environment Pearson Education © 2009.
CPSC-608 Database Systems
Presentation transcript:

CPSC-608 Database Systems Fall 2017 Instructor: Jianer Chen Office: HRBB 315C Phone: 845-4259 Email: chen@cse.tamu.edu Notes 2

Undergraduate Database A Quick Review on Undergraduate Database

Database is just another model of information processing (in disks) Then why study DB? Much more data, regular data techs would be very inefficient: How should data be stored? Operations are simpler & more specific: How do we take advantage of it? New programming languages for the above. (ACID) Reliability, security, consistency, currency π, σ, ρ, ∩, ⋃, \, ╳, ⋈, ⋈C SQL

How is Information Represented? How can everything be given by tables? Well, information consists of objects/items and relationships among items; An item has certain properties, which can be listed in a row. Thus, a collection of similar items can be given as a table, one row for an item; A relationship can be given by listing each item group that satisfies the relationship; High-level representation of information (E-R Diagram: read Chapter 4)

Table structures (terminologies) A relation schema gives the name of the relation and its attributes; A database schema gives the schemas for all relations in the database; Schemas affects how the data is stored; Database schemas are given and altered using database definition language (DDL); Only database administrator can use DDL.

What is a good DB schema?

What is a good DB schema? What is a good table structure? Fat or thin?

What is a good DB schema? What is a good table structure? Fat or thin? More important: how can tables guarantee information consistency?

What is a good DB schema? What is a good table structure? Fat or thin? More important: how can tables guarantee information consistency? There is a beautiful theory (functional dependency) for constructing a good database schema;

What is a good DB schema? What is a good table structure? Fat or thin? More important: how can tables guarantee information consistency? There is a beautiful theory (functional dependency) for constructing a good database schema; Read Chapter 3.

Database is just another model of information processing (in disks) Then why study DB? Much more data, regular data techs would be very inefficient: How should data be stored? Operations are simpler & more specific: How do we take advantage of it? New programming languages for the above. (ACID) Reliability, security, consistency, currency π, σ, ρ, ∩, ⋃, \, ╳, ⋈, ⋈C SQL

Database is just another model of information processing (in disks) Then why study DB? Much more data, regular data techs would be very inefficient: How should data be stored? Operations are simpler & more specific: How do we take advantage of it? New programming languages for the above. (ACID) Reliability, security, consistency, currency π, σ, ρ, ∩, ⋃, \, ╳, ⋈, ⋈C SQL

What are the operations?

What are the operations? Most DB operations are queries, e.g., “what is the balance of the account 12345?” which is involved in

What are the operations? Most DB operations are queries, e.g., “what is the balance of the account 12345?” which is involved in * identify relations that are related to the queried information;

What are the operations? Most DB operations are queries, e.g., “what is the balance of the account 12345?” which is involved in * identify relations that are related to the queried information; * search/organize the relations and collect the related information;

What are the operations? Most DB operations are queries, e.g., “what is the balance of the account 12345?” which is involved in * identify relations that are related to the queried information; * search/organize the relations and collect the related information; * edit and output the queried information.

What are the operations? Most DB operations are queries, e.g., “what is the balance of the account 12345?” which is involved in * identify relations that are related to the queried information; * search/organize the relations and collect the related information; * edit and output the queried information. Less often: modifications on relations;

What are the operations? Most DB operations are queries, e.g., “what is the balance of the account 12345?” which is involved in * identify relations that are related to the queried information; * search/organize the relations and collect the related information; * edit and output the queried information. Less often: modifications on relations; These operations are given by data manipulation language (DML)

What are the operations? The DML operations on relations can be implemented by the basic operations: * projection π and selection σ * set operations * joins * renaming ρ

What are the operations? The DML operations on relations can be implemented by the basic operations: * projection π and selection σ * set operations * joins * renaming ρ There is a beautiful (mathematical) theory (relational algebra) that sets the foundation for these basic operations;

What are the operations? The DML operations on relations can be implemented by the basic operations: * projection π and selection σ * set operations * joins * renaming ρ There is a beautiful (mathematical) theory (relational algebra) that sets the foundation for these basic operations; Read Chapters 2 and 5.

Database is just another model of information processing (in disks) Then why study DB? Much more data, regular data techs would be very inefficient: How should data be stored? Operations are simpler & more specific: How do we take advantage of it? New programming languages for the above. (ACID) Reliability, security, consistency, currency π, σ, ρ, ∩, ⋃, \, ╳, ⋈, ⋈C SQL

Database is just another model of information processing (in disks) Then why study DB? Much more data, regular data techs would be very inefficient: How should data be stored? Operations are simpler & more specific: How do we take advantage of it? New programming languages for the above. (ACID) Reliability, security, consistency, currency π, σ, ρ, ∩, ⋃, \, ╳, ⋈, ⋈C SQL

Database is just another model of information processing (in disks) Then why study DB? Much more data, regular data techs would be very inefficient: How should data be stored? Operations are simpler & more specific: How do we take advantage of it? New programming languages for the above. (ACID) Reliability, security, consistency, currency π, σ, ρ, ∩, ⋃, \, ╳, ⋈, ⋈C Will get back to this with more details. SQL

Database is just another model of information processing (in disks) Then why study DB? Much more data, regular data techs would be very inefficient: How should data be stored? Operations are simpler & more specific: How do we take advantage of it? New programming languages for the above. (ACID) Reliability, security, consistency, currency π, σ, ρ, ∩, ⋃, \, ╳, ⋈, ⋈C SQL

Database is just another model of information processing (in disks) Then why study DB? Much more data, regular data techs would be very inefficient: How should data be stored? Operations are simpler & more specific: How do we take advantage of it? New programming languages for the above. (ACID) Reliability, security, consistency, currency π, σ, ρ, ∩, ⋃, \, ╳, ⋈, ⋈C SQL Will be studied in graduate database

Process of Database Development Description of the database application High-level representation of the database (E-R diagram) Chapter 4 Converting the E-R diagram into relations (tables) Developing database operations (using DML) Chapter 4 Chapters 6-8 Relation normalization Developing database application user interface Chapter 3 Chapter 9 Defining database schema (using DDL) Testing Chapter 2

Process of Database Development Description of the database application High-level representation of the database (E-R diagram) Chapter 4 Converting the E-R diagram into relations (tables) Developing database operations (using DML) Chapter 4 Chapters 6-8 Relation normalization Developing database application user interface Chapter 3 Chapter 9 Defining database schema (using DDL) Testing Chapter 2

Process of Database Development Description of the database application High-level representation of the database (E-R diagram) Chapter 4 Converting the E-R diagram into relations (tables) Developing database operations (using DML) Chapter 4 Chapters 6-8 Relation normalization Developing database application user interface Chapter 3 Chapter 9 Defining database schema (using DDL) Testing Chapter 2

Process of Database Development Description of the database application High-level representation of the database (E-R diagram) Chapter 4 Converting the E-R diagram into relations (tables) Developing database operations (using DML) Chapter 4 Chapters 6-8 Relation normalization Developing database application user interface Chapter 3 Chapter 9 Defining database schema (using DDL) Testing Chapter 2

Process of Database Development Description of the database application High-level representation of the database (E-R diagram) Chapter 4 Converting the E-R diagram into relations (tables) Developing database operations (using DML) Chapter 4 Chapters 6-8 Relation normalization Developing database application user interface Chapter 3 Chapter 9 Defining database schema (using DDL) Testing Chapter 2

Process of Database Development Description of the database application High-level representation of the database (E-R diagram) Chapter 4 Converting the E-R diagram into relations (tables) Developing database operations (using DML) Chapter 4 Chapters 6-8 Relation normalization Developing database application user interface Chapter 3 Chapter 9 Defining database schema (using DDL) Testing Chapter 2

Process of Database Development Description of the database application High-level representation of the database (E-R diagram) Chapter 4 Converting the E-R diagram into relations (tables) Developing database operations (using DML) Chapter 4 Chapters 6-8 Relation normalization Developing database application user interface Chapter 3 Chapter 9 Defining database schema (using DDL) Testing Chapter 2

Process of Database Development Description of the database application High-level representation of the database (E-R diagram) Chapter 4 Converting the E-R diagram into relations (tables) Developing database operations (using DML) Chapter 4 Chapters 6-8 Relation normalization Developing database application user interface Chapter 3 Chapter 9 Defining database schema (using DDL) Testing Chapter 2

Process of Database Development Description of the database application High-level representation of the database (E-R diagram) Chapter 4 Converting the E-R diagram into relations (tables) Developing database operations (using DML) Chapter 4 Chapters 6-8 Relation normalization Developing database application user interface Chapter 3 Chapter 9 Defining database schema (using DDL) Testing Chapter 2

Process of Database Development Description of the database application High-level representation of the database (E-R diagram) Chapter 4 Converting the E-R diagram into relations (tables) Developing database operations (using DML) Chapter 4 Chapters 6-8 Relation normalization Developing database application user interface Chapter 3 Chapter 9 Defining database schema (using DDL) Testing Chapter 2

Database is just another model of information processing (in disks) Then why study DB? Much more data, regular data techs would be very inefficient: How should data be stored? Operations are simpler & more specific: How do we take advantage of it? New programming languages for the above. (ACID) Reliability, security, consistency, currency π, σ, ρ, ∩, ⋃, \, ╳, ⋈, ⋈C Back to this with more details. SQL

SQL: Structured Query language

SQL: Structured Query language a very-high-level language.

SQL: Structured Query language a very-high-level language. * say “what to do” rather than “how to do it.”

SQL: Structured Query language a very-high-level language. * say “what to do” rather than “how to do it.” * avoid a lot of data-manipulation details needed in procedural languages like C++ or Java.

SQL: Structured Query language a very-high-level language. * say “what to do” rather than “how to do it.” * avoid a lot of data-manipulation details needed in procedural languages like C++ or Java. Database management system figures out the “best” way to execute queries * called “query optimization”

SQL: Structured Query language a very-high-level language. * say “what to do” rather than “how to do it.” * avoid a lot of data-manipulation details needed in procedural languages like C++ or Java. Database management system figures out the “best” way to execute queries * called “query optimization” For both data definition and data manipulation.