* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Introduction to Databases Lecture 1 Chapters 1 - 2 Robb T. Koether
Microsoft SQL Server wikipedia , lookup
Entity–attribute–value model wikipedia , lookup
Serializability wikipedia , lookup
Microsoft Access wikipedia , lookup
Commitment ordering wikipedia , lookup
Extensible Storage Engine wikipedia , lookup
Oracle Database wikipedia , lookup
Encyclopedia of World Problems and Human Potential wikipedia , lookup
Global serializability wikipedia , lookup
Navitaire Inc v Easyjet Airline Co. and BulletProof Technologies, Inc. wikipedia , lookup
Open Database Connectivity wikipedia , lookup
Functional Database Model wikipedia , lookup
Ingres (database) wikipedia , lookup
Microsoft Jet Database Engine wikipedia , lookup
Versant Object Database wikipedia , lookup
Relational model wikipedia , lookup
Concurrency control wikipedia , lookup
ContactPoint wikipedia , lookup
Clusterpoint wikipedia , lookup
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 Query User Robb T. Koether (Hampden-Sydney College) DBMS Introduction to Databases Optimized query Database Wed, Jan 15, 2014 10 / 23 Databases Response User Robb T. Koether (Hampden-Sydney College) Response DBMS Introduction to Databases Database 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