Introduction to Databases

Similar documents
Introduction to Databases

Relational Databases Lecture 2

The Critical-Path Algorithm

PHP Queries and HTML Forms Lecture 23

Relational Databases

XPath Lecture 34. Robb T. Koether. Hampden-Sydney College. Wed, Apr 11, 2012

Minimal Spanning Trees

Aggregation. Lecture 7 Section Robb T. Koether. Hampden-Sydney College. Wed, Jan 29, 2014

Recursive Descent Parsers

XPath. Lecture 36. Robb T. Koether. Wed, Apr 16, Hampden-Sydney College. Robb T. Koether (Hampden-Sydney College) XPath Wed, Apr 16, / 28

Street-Routing Problems

Insertions, Deletions, and Updates

The Decreasing-Time Algorithm

The Traveling Salesman Problem Brute Force Method

Solving Recursive Sequences by Iteration

while Loops Lecture 13 Sections Robb T. Koether Wed, Sep 26, 2018 Hampden-Sydney College

XML Attributes. Lecture 33. Robb T. Koether. Hampden-Sydney College. Wed, Apr 25, 2018

Stack Applications. Lecture 27 Sections Robb T. Koether. Hampden-Sydney College. Wed, Mar 29, 2017

Density Curves Sections

Sampling Distribution Examples Sections 15.4, 15.5

Recursive Sequences. Lecture 24 Section 5.6. Robb T. Koether. Hampden-Sydney College. Wed, Feb 27, 2013

Rotations and Translations

XQuery FLOWR Expressions Lecture 35

Recursive Sequences. Lecture 24 Section 5.6. Robb T. Koether. Hampden-Sydney College. Wed, Feb 26, 2014

Webpage Navigation. Lecture 27. Robb T. Koether. Hampden-Sydney College. Mon, Apr 2, 2018

Data Mining & Data Warehouse

DB Basic Concepts. Rab Nawaz Jadoon DCS. Assistant Professor. Department of Computer Science. COMSATS IIT, Abbottabad Pakistan

The Traveling Salesman Problem Nearest-Neighbor Algorithm

LR Parsing - Conflicts

Scope and Parameter Passing

Triggers. Lecture 14. Robb T. Koether. Hampden-Sydney College. Wed, Feb 14, 2018

Form Validation. Lecture 25. Robb T. Koether. Hampden-Sydney College. Wed, Mar 23, 2018

The Coefficient of Determination

Scheduling and Digraphs

Recursion. Lecture 2 Sections Robb T. Koether. Hampden-Sydney College. Wed, Jan 17, 2018

The Pairwise-Comparison Method

The Class Construct Part 1

Boolean Expressions. Lecture 31 Sections 6.6, 6.7. Robb T. Koether. Hampden-Sydney College. Wed, Apr 8, 2015

Scope and Parameter Passing

jquery Lecture 34 Robb T. Koether Wed, Apr 10, 2013 Hampden-Sydney College Robb T. Koether (Hampden-Sydney College) jquery Wed, Apr 10, / 29

Pointers. Lecture 1 Sections Robb T. Koether. Hampden-Sydney College. Wed, Jan 14, 2015

AJAX. Lecture 26. Robb T. Koether. Fri, Mar 21, Hampden-Sydney College. Robb T. Koether (Hampden-Sydney College) AJAX Fri, Mar 21, / 16

Data Mining. Associate Professor Dr. Raed Ibraheem Hamed. University of Human Development, College of Science and Technology

Basic PHP. Lecture 19. Robb T. Koether. Hampden-Sydney College. Mon, Feb 26, 2108

XML and AJAX Lecture 28

The Traveling Salesman Problem Cheapest-Link Algorithm

Nondeterministic Programming in C++

The Graphics Pipeline

The string Class. Lecture 21 Sections 2.9, 3.9, Robb T. Koether. Wed, Oct 17, Hampden-Sydney College

The Plurality-with-Elimination Method

Outline. Databases and DBMS s. Recent Database Applications. Earlier Database Applications. CMPSCI445: Information Systems.

Basic PHP Lecture 17

Boxplots. Lecture 17 Section Robb T. Koether. Hampden-Sydney College. Wed, Feb 10, 2010

Specular Reflection. Lecture 19. Robb T. Koether. Hampden-Sydney College. Wed, Oct 4, 2017

Linked Lists. Lecture 16 Sections Robb T. Koether. Hampden-Sydney College. Wed, Feb 22, 2017

Magnification and Minification

Selections. Lecture 4 Sections Robb T. Koether. Hampden-Sydney College. Wed, Jan 22, 2014

Integer Overflow. Lecture 8 Section 2.5. Robb T. Koether. Hampden-Sydney College. Mon, Jan 27, 2014

Implementing Linked Lists

Building the Abstract Syntax Trees

Regular Expressions. Lecture 10 Sections Robb T. Koether. Hampden-Sydney College. Wed, Sep 14, 2016

PHP Querying. Lecture 21. Robb T. Koether. Hampden-Sydney College. Fri, Mar 2, 2018

Introduction to Compiler Design

The Normal Distribution

Abstract Data Types. Lecture 23 Section 7.1. Robb T. Koether. Hampden-Sydney College. Wed, Oct 24, 2012

Pointer Arithmetic. Lecture 4 Chapter 10. Robb T. Koether. Hampden-Sydney College. Wed, Jan 25, 2017

Total Orders. Lecture 41 Section 8.5. Robb T. Koether. Hampden-Sydney College. Mon, Apr 8, 2013

Displaying Distributions - Quantitative Variables

Views. Lecture 15 Section 5.3. Robb T. Koether. Hampden-Sydney College. Mon, Feb 18, 2013

Function Definition Syntax Tree

Recognition of Tokens

Binary Tree Applications

Functional Dependencies and Normal Forms

Course Web Site. 445 Staff and Mailing Lists. Textbook. Databases and DBMS s. Outline. CMPSCI445: Information Systems. Yanlei Diao and Haopeng Zhang

Views. Lecture 15. Robb T. Koether. Fri, Feb 16, Hampden-Sydney College. Robb T. Koether (Hampden-Sydney College) Views Fri, Feb 16, / 28

Functional Dependencies and Normal Forms

XSLT. Lecture 38. Robb T. Koether. Mon, Apr 21, Hampden-Sydney College. Robb T. Koether (Hampden-Sydney College) XSLT Mon, Apr 21, / 26

Operators. Lecture 12 Section Robb T. Koether. Hampden-Sydney College. Fri, Feb 9, 2018

CMPSCI445: Information Systems

The Graphics Pipeline

Database Management System. Fundamental Database Concepts

Basic CSS Lecture 17

Data Warehousing (1)

List Iterators. Lecture 27 Section Robb T. Koether. Hampden-Sydney College. Wed, Apr 8, 2015

The CYK Parsing Algorithm

Friends and Unary Operators

Ambient and Diffuse Light

Views. Lecture 15 Section 5.3. Robb T. Koether. Hampden-Sydney College. Mon, Feb 18, 2013

List Iterators. Lecture 34 Section Robb T. Koether. Hampden-Sydney College. Wed, Apr 24, 2013

Programming Languages

Programming Languages

MySQL Creating a Database Lecture 3

Pointers. Lecture 2 Sections Robb T. Koether. Hampden-Sydney College. Fri, Jan 18, 2013

Mipmaps. Lecture 35. Robb T. Koether. Hampden-Sydney College. Wed, Nov 18, 2015

Stack Applications. Lecture 25 Sections Robb T. Koether. Hampden-Sydney College. Mon, Mar 30, 2015

The Projection Matrix

PHP Arrays. Lecture 18. Robb T. Koether. Hampden-Sydney College. Mon, Mar 4, 2013

Recursive Linked Lists

Pointers. Lecture 2 Sections Robb T. Koether. Hampden-Sydney College. Mon, Jan 20, 2014

DTDs and XML Attributes

Transcription:

Introduction to Databases Lecture 1 Chapters 1-2 Robb T. Koether Hampden-Sydney College Wed, Jan 15, 2014 Robb T. Koether (Hampden-Sydney College) Introduction to Databases Wed, Jan 15, 2014 1 / 23

1 Overview of the Course 2 Databases 3 Benefits of Databases 4 The Concurrency Problem 5 Assignment Robb T. Koether (Hampden-Sydney College) Introduction to Databases Wed, Jan 15, 2014 2 / 23

Outline 1 Overview of the Course 2 Databases 3 Benefits of Databases 4 The Concurrency Problem 5 Assignment Robb T. Koether (Hampden-Sydney College) Introduction to Databases Wed, Jan 15, 2014 3 / 23

Overview of the Course Relational databases Basics Normal forms Triggers Views Robb T. Koether (Hampden-Sydney College) Introduction to Databases Wed, Jan 15, 2014 4 / 23

Overview of the Course Dynamic web pages HTML CSS PHP Javascript AJAX JQuery Robb T. Koether (Hampden-Sydney College) Introduction to Databases Wed, Jan 15, 2014 5 / 23

Overview of the Course Semistructured databases XML XPath XSLT Robb T. Koether (Hampden-Sydney College) Introduction to Databases Wed, Jan 15, 2014 6 / 23

Project Develop a social network application for the web. Robb T. Koether (Hampden-Sydney College) Introduction to Databases Wed, Jan 15, 2014 7 / 23

Outline 1 Overview of the Course 2 Databases 3 Benefits of Databases 4 The Concurrency Problem 5 Assignment Robb T. Koether (Hampden-Sydney College) Introduction to Databases Wed, Jan 15, 2014 8 / 23

Databases Definition (Database) A database (DB) is a collection of related data. Definition (Database Management System) A database management system (DBMS) is a program that accepts queries into a database and returns responses. Definition (Query) A query is a request that is sent to a DBMS instructing it to perform an operation on a database. A query may retrieve, insert, delete, or update data in the database. Robb T. Koether (Hampden-Sydney College) Introduction to Databases Wed, Jan 15, 2014 9 / 23

Databases Optimized User Query DBMS query Database Robb T. Koether (Hampden-Sydney College) Introduction to Databases Wed, Jan 15, 2014 10 / 23

Databases Response Response User DBMS Database Robb T. Koether (Hampden-Sydney College) Introduction to Databases Wed, Jan 15, 2014 10 / 23

Databases Characteristics of a DBMS. Limited redundancy Restricted access (privileges and views) Persistent storage Efficiency Backup and recovery Multiple users (concurrency) Data integrity Robb T. Koether (Hampden-Sydney College) Introduction to Databases Wed, Jan 15, 2014 11 / 23

Databases As we will see, it can be quite tedious to enter the queries through a command line. Often the user is actually an application program or a webpage, in which the queries are preprogrammed. After our initial study of databases, we will design webpages that will automatically query the underlying database. Robb T. Koether (Hampden-Sydney College) Introduction to Databases Wed, Jan 15, 2014 12 / 23

Outline 1 Overview of the Course 2 Databases 3 Benefits of Databases 4 The Concurrency Problem 5 Assignment Robb T. Koether (Hampden-Sydney College) Introduction to Databases Wed, Jan 15, 2014 13 / 23

Benefits of Databases A few of the benefits of using a database: The user does not need to have knowledge of how the data is stored. He works through a user-friendly interface. Different users can be given different views of the data. Each user may be unaware of the views that other users have. Data can be easily shared among users. Robb T. Koether (Hampden-Sydney College) Introduction to Databases Wed, Jan 15, 2014 14 / 23

Benefits of Databases Online Catalog Sales Records Inventory Customer Salesman Manager Robb T. Koether (Hampden-Sydney College) Introduction to Databases Wed, Jan 15, 2014 15 / 23

Benefits of Databases Comprehensive Database (Catalog, Sales, Inventory) Customer Salesman Manager Robb T. Koether (Hampden-Sydney College) Introduction to Databases Wed, Jan 15, 2014 15 / 23

Various Roles Roles of various individuals involved. The database administrator (DBA) Oversees the entire system. The database designer Designs a database to meet the specs. The user Queries the database according to his needs. At various times in this course, we will be the database designer and the database user. Robb T. Koether (Hampden-Sydney College) Introduction to Databases Wed, Jan 15, 2014 16 / 23

Various Roles Roles of various individuals involved. The database administrator (DBA) Oversees the entire system. The database designer Designs a database to meet the specs. The user Queries the database according to his needs. At various times in this course, we will be the database designer and the database user. One other person involved is the person who built the DBMS. Robb T. Koether (Hampden-Sydney College) Introduction to Databases Wed, Jan 15, 2014 16 / 23

Outline 1 Overview of the Course 2 Databases 3 Benefits of Databases 4 The Concurrency Problem 5 Assignment Robb T. Koether (Hampden-Sydney College) Introduction to Databases Wed, Jan 15, 2014 17 / 23

Concurrency Multiple users accessing the very same data at the very same time leads to the concurrency problem. For example, Alice, a customer, requests the price of item #123. At the very same time, Bob, an employee, is updating the price of item #123. Which price will Alice see? Robb T. Koether (Hampden-Sydney College) Introduction to Databases Wed, Jan 15, 2014 18 / 23

Concurrency Multiple users accessing the very same data at the very same time leads to the concurrency problem. For example, Alice, a customer, requests the price of item #123. At the very same time, Bob, an employee, is updating the price of item #123. Which price will Alice see? It depends on who goes first, Alice or Bob. Robb T. Koether (Hampden-Sydney College) Introduction to Databases Wed, Jan 15, 2014 18 / 23

Concurrency More significantly, Alice, an airline employee goes online to select a list of passengers on flight #123. At the very same time, Bob, another airline employee, goes online to change the flight number from #123 to #456. Alice selects the first 50 names of passengers on flight #123. At that moment, the flight number is changed to #456. The last 50 names are not selected because the flight number was no longer #123. This type of conflict must be avoided. Robb T. Koether (Hampden-Sydney College) Introduction to Databases Wed, Jan 15, 2014 19 / 23

OLAP Definition (Database) Online analytical processing (OLAP) involves querying a database to obtain summary data, typical retrievals and aggregation. Most database applications fall into one of two categories: OLAP or OLTP. A typical OLAP application would be to get the total daily sales from online purchases. OLAP is computationally intensive (e.g., summing over millions of records). This is more like what we will do when we first study databases. Robb T. Koether (Hampden-Sydney College) Introduction to Databases Wed, Jan 15, 2014 20 / 23

OLTP Definition (Database) Online transaction processing (OLTP) involves many small queries, typically insertions. A typical OLTP application would be a database of online purchases. Each purchase is inserted into the database. OLTP is not computationally intensive. This is more like what we will do with PHP and Javascript. Robb T. Koether (Hampden-Sydney College) Introduction to Databases Wed, Jan 15, 2014 21 / 23

Outline 1 Overview of the Course 2 Databases 3 Benefits of Databases 4 The Concurrency Problem 5 Assignment Robb T. Koether (Hampden-Sydney College) Introduction to Databases Wed, Jan 15, 2014 22 / 23

Assignment Read Chapter 1 - Databases and Database Users. Read Chapter 2 - Database System Concepts and Architecture. Robb T. Koether (Hampden-Sydney College) Introduction to Databases Wed, Jan 15, 2014 23 / 23