Who, where, when. Database Management Systems (LIX022B05) Literature. Evaluation. Lab Sessions. About this course. After this course...

Similar documents
Informatics 1: Data & Analysis

Informatics 1: Data & Analysis

CS 525 Advanced Database Organization - Spring 2017 Mon + Wed 1:50-3:05 PM, Room: Stuart Building 111

Introduction to Databases Fall-Winter 2010/11. Syllabus

Chapter 1: Introduction

Logical database design

CS 4604: Introduction to Database Management Systems. B. Aditya Prakash Lecture #1: Introduction

Course: Database Management Systems. Lê Thị Bảo Thu

What s a database anyway?

Introduction to Databases Fall-Winter 2009/10. Syllabus

CMPT 354 Database Systems I. Spring 2012 Instructor: Hassan Khosravi

Avi Silberschatz, Henry F. Korth, S. Sudarshan, Database System Concept, McGraw- Hill, ISBN , 6th edition.

Database Management Systems CS Spring 2017

San José State University College of Science / Department of Computer Science Introduction to Database Management Systems, CS157A-3-4, Fall 2017

CSE 544 Principles of Database Management Systems

Database systems. Jaroslav Porubän, Miroslav Biňas, Milan Nosáľ (c)

; Spring 2008 Prof. Sang-goo Lee (14:30pm: Mon & Wed: Room ) ADVANCED DATABASES

LECTURE1: PRINCIPLES OF DATABASES

15CS53: DATABASE MANAGEMENT SYSTEM

9/8/2018. Prerequisites. Grading. People & Contact Information. Textbooks. Course Info. CS430/630 Database Management Systems Fall 2018

Course and Contact Information. Course Description. Course Objectives

SRM UNIVERSITY FACULTY OF ENGINEERING AND TECHNOLOGY SCHOOL OF COMPUTING DEPARTMENT OF CSE COURSE PLAN

Databases TDA357/DIT620. Niklas Broberg

G64DBS Database Systems. G64DBS Module. Recommended Textbook. Assessment. Recommended Textbook. Recommended Textbook.

Relational Model. Nisa ul Hafidhoh

Course and Contact Information. Course Description. Course Objectives

B.C.A DATA BASE MANAGEMENT SYSTEM MODULE SPECIFICATION SHEET. Course Outline

CS430/630 Database Management Systems Spring, Betty O Neil University of Massachusetts at Boston

Database Management System Implementation. Who am I? Who is the teaching assistant? TR, 10:00am-11:20am NTRP B 140 Instructor: Dr.

Course Logistics & Chapter 1 Introduction

CS425 Fall 2016 Boris Glavic Chapter 2: Intro to Relational Model

CSC 407 Database System I COURSE PARTICULARS COURSE INSTRUCTORS COURSE DESCRIPTION

Fundamentals of Database Systems (INSY2061)

Database Principle. Zhuo Wang Spring

Database Technology Introduction. Heiko Paulheim

BBM371- Data Management. Lecture 1: Course policies, Introduction to DBMS

Specific Objectives Contents Teaching Hours 4 the basic concepts 1.1 Concepts of Relational Databases

CPS352 Database Systems Syllabus Fall 2012

1. Data Model, Categories, Schemas and Instances. Outline

CS143: Relational Model

Introduction to Database Systems CSE 444. Lecture #1 March 26, 2007

CSE 132A Database Systems Principles

Lecture2: Database Environment

COMP-421: Database Systems. Joseph D silva McConnel Engg. 102

Introduction: Database Concepts Slides by: Ms. Shree Jaswal

CS425 Fall 2016 Boris Glavic Chapter 1: Introduction

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

ADVANCED DATABASES ; Spring 2015 Prof. Sang-goo Lee (11:00pm: Mon & Wed: Room ) Advanced DB Copyright by S.-g.

Databases 1. Daniel POP

COMP.3090/3100 Database I & II. Textbook

ASSIGNMENT NO 2. Objectives: To understand and demonstrate DDL statements on various SQL objects

Chapter 2 Introduction to Relational Models

Fundamentals of Database Systems

CMPUT 291 File and Database Management Systems

Chapter 2: Intro to Relational Model

Database System Concepts and Architecture

CT13 DATABASE MANAGEMENT SYSTEMS DEC 2015

An Effective Methodology for an Upper-level Fundamentals of Database Systems Course

Introduction to Database S ystems Systems CSE 444 Lecture 1 Introduction CSE Summer

Relational Database Systems 2 1. System Architecture

Textbook(s) and other required material: Raghu Ramakrishnan & Johannes Gehrke, Database Management Systems, Third edition, McGraw Hill, 2003.

Databases: Introduction

Outline. Database Management Systems (DBMS) Database Management and Organization. IT420: Database Management and Organization

Relational Database Systems 2 1. System Architecture

CMPT 354: Database System I. Lecture 1. Course Introduction

CS34800 Information Systems. Course Overview Prof. Walid Aref January 8, 2018

Data Modelling and Databases. Exercise Session 7: Integrity Constraints

City University of Hong Kong Course Syllabus. offered by Department of Computer Science with effect from Semester A 2017/18

CMPSCI 645 Database Design & Implementation

Introduction to Data Management CSE 344. Lecture 1: Introduction

CAS CS 460/660 Introduction to Database Systems. Fall

Database Management Systems MIT Introduction By S. Sabraz Nawaz

Quick Facts about the course. CS 2550 / Spring 2006 Principles of Database Systems. Administrative. What is a Database Management System?

Relational Database Systems Part 01. Karine Reis Ferreira

Can you name one application that does not need any data? Can you name one application that does not need organized data?

Course and Contact Information. Catalog Description. Course Objectives

San José State University Computer Science Department CS157A: Introduction to Database Management Systems Sections 5 and 6, Fall 2015

COURSE OVERVIEW THE RELATIONAL MODEL. CS121: Relational Databases Fall 2017 Lecture 1

DATABASE MANAGEMENT SYSTEM SUBJECT CODE: CE 305

COURSE OVERVIEW THE RELATIONAL MODEL. CS121: Introduction to Relational Database Systems Fall 2016 Lecture 1

LIS 2680: Database Design and Applications

CSE 303: Database. Teaching Staff. Lecture 01. Lectures: 1 st half - from a user s perspective. Lectures: 2 nd half - understanding how it works

COMP-421: Database Systems. Joseph D silva McConnel Engg. 102

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

COMP3311 Database Systems

Concepts Of Database Management 7th Edition Solution Manual

Course Book Academic Year

SRM UNIVERSITY FACULTY OF ENGINEERING AND TECHNOLOGY SCHOOL OF COMPUTING DEPARTMENT OF CSE COURSE PLAN

Database Systems ( 資料庫系統 ) Practicum in Database Systems ( 資料庫系統實驗 ) 9/20 & 9/21, 2006 Lecture #1

CS317 File and Database Systems

TEACHING & ASSESSMENT PLAN

Concepts Of Database Management 7th Edition Pratt

AAAF (School of CS, Manchester) Advanced DBMSs / 19

Course Design Document: IS202 Data Management. Version 4.5

CMPSCI445: Information Systems

CS317 File and Database Systems

CS 245: Database System Principles

Chapter 1: Introduction

CompSci 516 Database Systems. Lecture 2 SQL. Instructor: Sudeepa Roy

Conceptual Design. The Entity-Relationship (ER) Model

Transcription:

Who, where, when base Management Systems (LIX022B05) Instructor: Çağrı Çöltekin c.coltekin@rug.nl Information science/informatiekunde Fall 2012 Course bases (LIX022B05) 2012/13 Instructor Çağrı Çöltekin Email c.coltekin@rug.nl Lectures Mon 13:00 15:00, A weg 30, room 103 Labs Wed 15:00 17:00, 1312.0107 MB Office hours Wed 13:00 15:00, H1311.0426 Course page http://www.let.rug.nl/coltekin/db2012/ Ç. Çöltekin, Informatiekunde bases 1/32 Literature Evaluation Textbook: base System Concepts by A. Silberschatz, H. F. Korth and S. Sudarshan. McGraw-Hill (2010), 978-007-128959-7 (6th international ed.) More References: base Management Systems by Ramakrishnan & Gehrke A First Course in base Systems by Ullman & Widom Fundamentals of base Systems by Elmasri & Navathe base Systems: The Complete Book by Garcia-Molina, Ullman & Widom base Systems: A Practical Approach to Design, Implementation, and Management by Connolly & Begg Grading: Homework assignments: Homeworks & labs 30% Final exam (Tentamination) 70% Six homeworks: a homework each week (except this week) Homeworks will be combination of theoretical questions with some practical (mostly SQL) exercises. Practical part of the homeworks will be related to the lab exercises. You have a week for each homework: no extensions! Evaluation will be based on best five homework scores. Ç. Çöltekin, Informatiekunde bases 2/32 Ç. Çöltekin, Informatiekunde bases 3/32 Lab Sessions About this course Homework assignments: You need an account on siegfried.let.rug.nl. If you do not have an account apply to A. da Costa Room: 1313.336 Mo-Thu, 10:30-12:00 and 14:00-15:30 You also need a MySQL user account and a database for the exercises. No programming, mostly exercises with SQL. This is an introductory course on database management systems. The particular focus will be on relational database management systems. No initial knowledge of databases required. There is no programming in this course. We will have a practical focus, but the theories behind the relational database design practices and queries are also introduced. Ç. Çöltekin, Informatiekunde bases 4/32 Ç. Çöltekin, Informatiekunde bases 5/32 After this course... Time plan You should be able to develop a conceptual data model that reflects an organization s database requirements convert the conceptual data model into a relational database schema apply normalization techniques identify data integrity and security requirements be able to construct complex SQL queries be familiar with fundamentals of database administration, performance and optimization gain hands-on experience with a database management system (MySQL) Week Lecture (Mon) Lab (Wed) 1 No Lab this week. 2 Conceptual DB design, E-R diagrams DB Design with E-R diagrams 3 Logical DB design, normalization Implement a DB in MySQL 4 SQL 1: simple queries Query exercises 5 SQL 2: more complex More query exercises queries 6 SQL 3:views, indexes, access control... Query optimization, Indexes, DBA tasks 7 Summary & introduction to SQL and programming Q&A Ç. Çöltekin, Informatiekunde bases 6/32 Ç. Çöltekin, Informatiekunde bases 7/32

Next... Today Next half-semester course base-driven web technology, will cover: A more practical approach to the subjects in this course. Some programming for web applications (PHP). Using relational databases from web applications. More/practical topics including transaction processing security performance What is a database? and database management system ()? Why use a? Why not use a? Ways of organizing data Common DB architectures : tables, keys, queries. Ç. Çöltekin, Informatiekunde bases 8/32 Ç. Çöltekin, Informatiekunde bases 9/32 What is a database? What is a database management system? A database is a collection of related data. A company database: employees, departments, salaries,... A bank database: customers, accounts, loans, credits,... Airline flight reservation database: flights, seats, tickets,... A library catalog: books, authors,... University student database: students, instructors, grades,... A database of DNS records: domain names, IP addresses,... The collection of documents in Wikipedia: documents, authors, revisions,... The phone book on your mobile phone: contacts, phone numbers, email addresses,...... A database management system () is a general purpose software system for creating, maintaining and sharing data. A, allows creating a database allows populating the database and manipulating the data enables queries on the data stored in the database enforces data integrity provides data access control Ç. Çöltekin, Informatiekunde bases 10/32 Ç. Çöltekin, Informatiekunde bases 11/32 Why use a Why not use a? Insulation between program and data Multiple views of the same data Sharing data in multi-user environments The overhead of Specialized data access Controlling redundancy Enforcing data integrity Access control Efficient query processing Cost of Simple and well-defined read-only data Real-time systems Single-user environments. Backup and recovery Multiple user interfaces Ç. Çöltekin, Informatiekunde bases 12/32 Ç. Çöltekin, Informatiekunde bases 13/32 architectures Typical roles in a environment Self-contained (or serverless) Client/server Multi tier (or three tier) Application programmer app. server base designer base administrator Ç. Çöltekin, Informatiekunde bases 14/32 Ç. Çöltekin, Informatiekunde bases 15/32

Relational s Types of s In this course we will focus on relational database management systems (R), where data and the relations between the data is organized in the form of tables (or, relations). Book 0553383043 A Wizard of Earthsea 1968 192 name Author Douglas Adams 0330258648 Isaac Asimov 055338256X Ursula K. LeGuin 0553383043 genre Genre author comedy 0330258648 sci-fi 0330258648 fantasy 0553383043 Relational data model and Rs are the dominant method of modeling and managing databases. However, it is not the only way. Historical precursors: Hierarchical Network Somewhat new: Object-oriented or object-relational.. and becoming popular: So-called NoSQL databases covering a wide range of methods of organizing data. Ç. Çöltekin, Informatiekunde bases 16/32 Ç. Çöltekin, Informatiekunde bases 17/32 Hierarchical databases Network databases Initial s followed a hierarchical data organization. All records in a hierarchical database is organized according to a hierarchy. course 1 student 1 student 2 dept 1 Main problem: data replication. course 2 student 2 student 3 Although this is a serious problem for typical database applications. The hierarchical databases are preferable, and still popular, for certain applications (e.g. DNS, LDAP). To overcome the replication problem with the hierarchical databases, network databases allow arbitrary links (representing relations) between the data records. course 1 student 1 student 2 Main problem: complexity. dept 1 course 2 student 3 Ç. Çöltekin, Informatiekunde bases 18/32 Ç. Çöltekin, Informatiekunde bases 19/32 Object-based databases NoSQL databases With the popularity of object-oriented programming languages, object oriented database management systems are suggested. Object relational: extension of relational database systems to support object-oriented notions like user-defined data types, inheritance, encapsulation etc. Object oriented: supports objects from an object-oriented programming language to be stored in a database. The object-based databases are still not standardized, and relational databases are still the dominant approach to standard database applications. A large range of database management system that are collectively called NoSQL databases has (re)gained popularity in recent years. Examples include: Key-value stores (Berkeley DB) Document stores (Apache CouchDB) Graph (FlockDB) Tabular (Google BigTable) Tuple store (Apache River) Ç. Çöltekin, Informatiekunde bases 20/32 Ç. Çöltekin, Informatiekunde bases 21/32 Structure of a relational database Anatomy of a table (or relation) Column names Columns (attributes, fields) A relational database consists of multiple relations, or tables. Information is broken into multiple tables. The relevant information is accessed through references between tables. A bad database design results in problems such as data replication, or inconsistency. Rows (records, tuples) 0330258648 The Hitchhiker s... 1979 180 0553383043 A Wizard of... 1968 192 Domain of an attribute is the set of allowed values the attribute can take. Ç. Çöltekin, Informatiekunde bases 22/32 Ç. Çöltekin, Informatiekunde bases 23/32

More on relations Primary Key 0553383043 A Wizard of Earthsea 1968 null No two rows are identical. Order of rows and columns are not important. (NB. order may be important in some SQL statements) A domain is said to be atomic if the elements of the domain are considered indivisible. A special value null is allowed for unknown or inapplicable values. 0553383043 A Wizard of Earthsea 1968 192 A primary key, formed by one or more attributes, uniquely identifies a row in a table. In worst case, the values of all attributes in a row has to be unique. A candidate key is one with no redundant attributes. There may be more than one candidate keys. Choice of primary key is a database design decision. Ç. Çöltekin, Informatiekunde bases 24/32 Ç. Çöltekin, Informatiekunde bases 25/32 Foreign Key Book 0330258648 055338256X 05533830430553383043 A Wizard of Earthsea 1968 192 name Author Douglas Adams 03302586480330258648 Isaac Asimov 055338256X055338256X Ursula K. LeGuin 05533830430553383043 genre Genre comedy 03302586480330258648 sci-fi 03302586480330258648 sci-fi 05533830430553383043 Languages for creating, changing, querying Definition Language (DDL) allows creating relations that form a database. Manipulation Language (DML) allows changing the data in the database. A query language allows finding specific information in the database. The the standard language for all above purposes (and more) is called SQL. Others exist (e.g. QBE), but SQL is the language supported by all main Rs. A foreign key is used for cross-referencing in a R. The set of attributes that form the foreign key in a (referencing) table is the primary key of another (referenced) table. Ç. Çöltekin, Informatiekunde bases 26/32 Ç. Çöltekin, Informatiekunde bases 27/32 SQL: create/drop table To create a table: create table table name (attribute 1 domain 1,..., attribute N domain N, (constraint 1 ),... (constraint m )); create table book ( int, t i t l e varchar ( 5 0 ), year int, pages varchar ( 5 0 ), primary key ( ) ) ; To drop (remove) a table: drop table table name; drop table book ; SQL: insert/delete records To insert a new record: insert into table name (attribute 1,... attribute N ) values (value 1,... value N ); i n s e r t into book values ( 055338256X, I Robot, 1950, 2 7 2 ) ; To remove record(s): delete from table name where condition; delete from book where = 055338256X ; Ç. Çöltekin, Informatiekunde bases 28/32 Ç. Çöltekin, Informatiekunde bases 29/32 SQL: update records SQL: queries update table name set attribute 1 =value 1,..., attribute N =value N where condition; update book set t i t l e = I, Robot where = 055338256X ; select attribute 1,..., attribute N from table 1,..., table M where condition; Examples: s e l e c t, t i t l e from book where year > 1960; s e l e c t from i n s t r u c t o r where = 055338256X ; Ç. Çöltekin, Informatiekunde bases 30/32 Ç. Çöltekin, Informatiekunde bases 31/32

Summary / Next week Summary Today: A general introduction to databases and database management systems, relational databases and SQL. We will return to (almost) all subjects introduced today in later weeks. Wednesday: No lab this week. Obtain a database account on siegfried, or check if you already have one. Next Week: Conceptual databse design. Read Chapter 7. (We will not study Section 7.8 about extended E-R features). Ç. Çöltekin, Informatiekunde bases 32/32