What s a database anyway?

Similar documents
Databases TDA357/DIT620. Niklas Broberg

Introduction to Databases Fall-Winter 2010/11. Syllabus

Introduction to Databases Fall-Winter 2009/10. Syllabus

Introduction. Example Databases

Introduction. Who wants to study databases?

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

CSE 344 JANUARY 3 RD - INTRODUCTION

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

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

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

Introduction to CS 4604

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

Introduction to Database Systems CSE 444. Lecture 1 Introduction

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

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

Chapter 1 Introduction

CAS CS 460/660 Introduction to Database Systems. Fall

Course Introduction. CSC343 - Introduction to Databases Manos Papagelis

Introduction to Data Management CSE 344. Lecture 1: Introduction

Lecture Notes CPSC 321 (Fall 2018) Today... Survey. Course Overview. Homework. HW1 (out) S. Bowers 1 of 8

EECS3421 Introduction to Database Management Systems. Thanks to John Mylopoulos and Ryan Johnson for material in these slides

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

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

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

Introduction to Data Management (Database Systems) CSE 414

CMPS 182: Introduction to Database Management Systems. Instructor: David Martin TA: Avi Kaushik. Syllabus

Fundamentals of Database Systems

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

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

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

CS 245: Database System Principles

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

Your New App. Motivation. Data Management is Universal. Staff. Introduction to Data Management (Database Systems) CSE 414. Lecture 1: Introduction

Department of Accounting & Law, School of Business. State University of New York at Albany. Acc 682 Analysis & Design of Accounting Databases

LIS 2680: Database Design and Applications

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

Overview of the Class and Introduction to DB schemas and queries. Lois Delcambre

Course and Contact Information. Course Description. Course Objectives

Database Management Systems MIT Introduction By S. Sabraz Nawaz

Course and Contact Information. Course Description. Course Objectives

Database Principle. Zhuo Wang Spring

CSE 544 Principles of Database Management Systems

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

Introduction to Database Systems. Motivation. Werner Nutt

Introduction to Information Systems SSC, Semester 6

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

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

Database Management Systems CS Spring 2017

Lecture 0: Overview of cs1106/cs6503

Course Requirements. Prerequisites Miscellaneous

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

CS317 File and Database Systems

Course Book Academic Year

Ministry of Higher Education and Scientific research

BIS Database Management Systems.

MIS Database Systems.

CS425 Fall 2016 Boris Glavic Chapter 1: Introduction

Course Design Document: IS202 Data Management. Version 4.5

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

CS157a Fall 2018 Sec3 Home Page/Syllabus

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

Introduction to Data Management. Lecture #2 (Big Picture, Cont.) Instructor: Chen Li

CSC 355 Database Systems

Introduc)on to Database Systems CSE 444. Lecture #1 March 29, 2010

CMPSCI 645 Database Design & Implementation

CMPUT 391 Database Management Systems. Fall Semester 2006, Section A1, Dr. Jörg Sander. Introduction

Databases 1. Daniel POP

Databases: Why? Databases: What? Databases: How? DATABASE DESIGN I - 1DL300

CS313D: ADVANCED PROGRAMMING LANGUAGE

Overview of Data Management

Fundamentals of Information Systems, Seventh Edition

CSE 132A. Database Systems Principles

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

San José State University Science/Computer Science Database Management System I

Introduction to Data Management. Lecture #2 (Big Picture, Cont.)

COMP.3090/3100 Database I & II. Textbook

D.Hemavathi & R.Venkatalakshmi, Assistant Professor, SRM University, Kattankulathur

IST659 Fall 2018 M004 Class Syllabus. Data Administration Concepts and Database Management

Mini-Project, Exam, Etc

Introduction. Random things to do after this course. Course roadmap. CPS 116 Introduction to Database Systems

BD - Databases

CMPUT 291 File and Database Management Systems

CS 564: DATABASE MANAGEMENT SYSTEMS. Spring 2018

Chapter 1: Introduction

Lecture 4. Database design IV. INDs and 4NF Design wrapup

Database Systems (INFR10070) Dr Paolo Guagliardo. University of Edinburgh. Fall 2016

Chapter 1: Introduction

ABD - Database Administration

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

IS 263 Database Concepts

Database Systems: Concepts, design, and implementation ISE 382 (3 Units)

DATABASE MANAGEMENT SYSTEMS. UNIT I Introduction to Database Systems

Introduction to Databases

CSC 261/461 Database Systems. Fall 2017 MW 12:30 pm 1:45 pm CSB 601

TEACHING & ASSESSMENT PLAN

Database Management System. Fundamental Database Concepts

B.H.GARDI COLLEGE OF MASTER OF COMPUTER APPLICATION. Ch. 1 :- Introduction Database Management System - 1

Why are you here? Introduction. Course roadmap. Course goals. What do you want from a DBMS? What is a database system? Aren t databases just

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

Database Systems. Bence Molnár

Transcription:

Lecture 1 Databases TDA357/DIT620 Pablo Picazo pablop@chalmers.se What s a database anyway? Structured Persistant Changable Digital A database is True to integrity constraints DBMS Database == Data collection managed by a specialized software called a Database Management System (DBMS) Why a whole course in Databases? Banking, ticket reservations, customer records, sales records, product records, inventories, employee records, address books, demographic records, student Databases are records, course plans, schedules, surveys, test suites, research data, genome everywhere! bank, medicinal records, time tables, news archives, sports results, e- commerce, user authentication systems, web forums, www.imdb.com, the world wide web, Examples Banking Drove the development of DBMS Industry Inventories, personnel records, sales Production Control Test data Research Sensor data (25GB/h for a car) Geographical data Laboratory information management systems Biological data (e.g. genome data) 1

Why not a file system? File systems are Structured Persistant Changable Digital Modern DBMS Handle persistent data Give efficient access to huge amounts of data Give a convenient interface to users Guarantee integrity constraints Handle transactions and concurrency but oh so inefficient! Database Management Systems Hierarchical databases: Easy to design if only one hierarchy Efficient access Low-level view of stored data Hard to write queries Network databases: Easy to design Efficient access Low-level view of stored data Very hard to write queries Database Management Systems Relational databases: Hard to design Use specialized storage techniques Efficient access Provides high-level views of stored data based on mathematical concepts Easy to write queries Not all data fit naturally into a tabular structure Other databases ( NoSQL ): Some based on semantic data models Object-oriented database management systems (OODBMS) XML-based, Key-value based, Relational DBMSs Very simple model Familiar tabular structure Has a good theoretical foundation from mathematics (set theory) Industrial strength implementations, e.g. Oracle, Sybase, MySQL, PostgreSQL, Microsoft SQL Server, DB2 (IBM mainframes) Large user community Database system studies 1. Design of databases, e.g. Entity-Relationship modelling relational data model dependencies and normalisation XML and its data model 2. Database programming, e.g. relational algebra data manipulation and querying in SQL application programs querying XML 3. Database implementation, e.g. indexes, transaction management, concurrency control, recovery, etc. 2

Course Objectives Course Objectives Design Design Construction Given a domain, know how to design a database that correctly models the domain and its constraints Applications Usage We want a database that we can use for scheduling courses and lectures. This is how it s supposed to work: Course Objectives Design Course Objectives Construction Entity-relationship (E-R) diagrams Functional Dependencies Normal Forms code name Course Of dept responsible day hour roomnr Lecture In Room name building Given a database schema with related constraints, implement the database in a relational DBMS Courses(code, name, dept, examiner) Rooms(roomNr, name, building) Lectures(roomNr, day, hour, course) roomnr -> Rooms.roomNr course -> Courses.code Course Objectives Construction SQL Data Definition Language (DDL) Course Objectives Usage CREATE TABLE Lectures ( lectureid INT PRIMARY KEY, roomid REFERENCES Rooms(roomId), day INT check (day BETWEEN 1 AND 7), hour INT check (hour BETWEEN 0 AND 23), course REFERENCES Courses(code), UNIQUE (roomid, day, hour) ); Know how to query a database for relevant data using SQL Know how to change the contents of a database using SQL Add a course Databases with course code TDA357, given by Give me all info about the course TDA357 3

Course Objectives Usage SQL Data Manipulation Language (DML) Course Objectives Applications INSERT INTO Courses VALUES ( TDA357, Databases, CS, Mickey ); Querying with SQL SELECT * FROM Courses WHERE code = TDA357 ; Know how to connect to and use a database from external applications We want a GUI application for booking rooms for lectures Course Objectives Applications JDBC // Assemble the SQL command for inserting the // newly booked lecture. String myinsert = INSERT INTO Lectures + VALUES ( + room +, + day +, + hour +, + course + ) ; // Execute the SQL command on the database Statement stmt = mydbconn.createstatement(); stmt.executeupdate(myinsert); Course Objectives - Summary You will learn how to design a database construct a database from a schema use a database through queries and updates use a database from an external application Course organisation Course organisation: Lectures 7 weeks (Week 44-50: 31 October - 15 December) Lectures Exercise sessions Project with lab sessions Exam Week 44 (This week) Mon Tue Wed Thu Fri 4

Course organisation: Lectures Course organisation: Exercises Week 45-end Mon Tue Wed Thu Fri Week 45-end Mon Tue Wed Thu Fri 1 1+1LH Course organisation: Labs About the rooms and campuses Week 45-end Mon Tue Wed Thu Fri Sat Sun 3 1LH 3 3 3 deadline Large amount of students (~200) Necessarily splitting over several rooms for labs/exercises Rooms change often! Check your schedules Doodles!! Who prefers exercise/lab session at Johanneberg/Lindholmen? Lab Assignment Write a student portal application in Java Part I: Design Given a domain description, design a database schema using an E-R diagram. Part II: Design Given a domain description, find and act on the functional dependencies of the domain to fix the schema from Part I. Part III: Construction and Usage Implement the schema from Part II in PostgreSQL. Insert relevant data. Create views to support key operations. Part IV: Construction Create triggers to support key operations. Part V: Interfacing from external Application (tests objective S7) Write a Java application that uses the database from Part III. Lab Assignment (cont.) - The assignment is graded and is a requirement to pass the course - Groups of 2 students - First 4 tasks are graded using the Fire system, deadline each time on Sunday - The final task is assessed on/before the last lab session. As soon as you have the Assignment, make a demo before the last session 5

Course Book "Database Systems: The Complete Book, 2E", by Hector Garcia-Molina, Jeffrey D. Ullman, and Jennifer Widom Approx. chapters 1-12 Alternative versions "First Course in Database Systems, A, 3/E" by Jeffrey D. Ullman and Jennifer Widom "Database Systems: The Complete Book", by Hector Garcia-Molina, Jeffrey D. Ullman, and Jennifer Widom Approx. chapters 1-8 Web Resources - Website (Google TDA357, first hit) http://www.cse.chalmers.se/edu/course/tda357/ht2017/ - Slides of lectures + prev years (even course notes) - Exercise sessions + solutions - Lab assignment - Extra information - Old exam questions and solutions - Google group https://groups.google.com/group/tda357-ht2017 - Announcements, questions/answers, other information - Sign up TODAY! Teaching staff - Lecturer/Course responsible: Pablo Picazo - Professor/Examiner: Graham Kemp - Course assistants: - Markus Aronsson (mararon@chalmers.se) - Herbert Lange (herbert.lange@cse.gu.se) - Timon Lapawczyk (timon.lapawczyk@gmail.com) - Selpi (selpi@chalmers.se) - Andrea Vezzosi (vezzosi@chalmers.se) - Hamid Ebadi (hamid.ebadi@chalmers.se) - Evgeny Kotelnikov (evgenyk@chalmers.se) TODO for you Locate the course website Sign up the Google group Find a lab partner Failure is the key to success Success is made of 99% failure make lots of mistakes and learn from them but stop before the exam! 6

Break! In part 2: Relations 7