1 Databases 2013/2014 Introduction. 2 The menu for today Organisational aspects Introduction to database technology The relational model.

Slides:



Advertisements
Similar presentations
Relational Database and Data Modeling
Advertisements

0 - 0.
The ANSI/SPARC Architecture of a Database Environment
Limitations of the relational model 1. 2 Overview application areas for which the relational model is inadequate - reasons drawbacks of relational DBMSs.
Rudolf Bayer Technische Universität München B-Trees and Databases, Past & Future.
OO databases 1 Object Oriented databases. OO databases 2 Developing OODBMS - motivation motivation more and more application areas require systems that.
Announcements Read 6.4 – 6.6 for Monday Homework 5, due Friday (today) Project Step 4, due Monday Research paper –List of sources - due 10/29.
Database System Concepts and Architecture
Introduction to Databases
Data Modeling Bayu Adhi Tama, ST., MTI. Thanks to Poniah, Elamasri, and Silberkatz.
Test B, 100 Subtraction Facts
Databases MMG508. DB Properties  Definition of a database: “A database is a collection of interrelated data items that are managed as a single unit”
Data Modeling and Database Design Chapter 1: Database Systems: Architecture and Components.
Database Systems: Design, Implementation, and Management Tenth Edition
Database Management Systems 1 Ramakrishnan & Gehrke Introduction to Database Systems Chapter 1 Instructor: Mirsad Hadzikadic.
Database Processing: Fundamentals, Design and Implementation, 9/e by David M. KroenkeChapter 1/1 Copyright © 2004 Please……. No Food Or Drink in the class.
IiWAS2002, Bandung, Indonesia Teaching and Learning Databases Dr. Stéphane Bressan National University of Singapore.
Fundamentals, Design, and Implementation, 9/e SI654 Database Application Design Instructor: Dragomir R. Radev Winter 2005.
Using Relational Databases and SQL Steven Emory Department of Computer Science California State University, Los Angeles Lecture 1: Introduction to Relational.
Chapter 2 Database Environment. Agenda Three-Level ANSI-SPARC Architecture Database Languages Data Models Functions of DBMS Components of DBMS Teleprocessing.
DATABASE APPLICATION DEVELOPMENT SAK 3408 Introduction (week 1)
1 Database Systems (Part I) Introduction to Databases I Overview  Objectives of this lecture.  History and Evolution of Databases.  Basic Terms in Database.
Introduction to Databases
1 Lecture 31 Introduction to Databases I Overview  Objectives of this lecture  History and Evolution of Databases  Basic Terms in Database and definitions.
Fundamentals, Design, and Implementation, 9/e Chapter 1 Introduction to Database Processing.
Dr. Mohamed Osman Hegazi
Lecture Two Database Environment Based on Chapter Two of this book:
Introduction to Database Systems
DBMS1 Database Management System (DBMS) Introductory Concepts Week-1.
Database Systems Dr. Don Goelman. Some History Early Systems 1960’s: ad-hoc programs give way to DBMSs (IDS – C.W. Bachman) 1970’s: two big developments.
Database Management System Lecture 2 Introduction to Database management.
Introduction to Database
Databases Illuminated
Database Lecture # 1 By Ubaid Ullah.
CSC2012 Database Technology & CSC2513 Database Systems.
Module Title? DBMS Introduction to Database Management System.
Introduction to Database Indra Budi CS - UI.
1 CS 430 Database Theory Winter 2005 Lecture 1: Introduction.
1 Overview of Databases. 2 Content Databases Example: Access Structure Query language (SQL)
Introduction to SQL Steve Perry
Database System Concepts and Architecture
Database Management Systems 1 Ramakrishnan & Gehrke Introduction to Database Systems Chpt 1 Instructor: Xintao Wu.
Introduction to Database Systems Fundamental Concepts Irvanizam Zamanhuri, M.Sc Computer Science Study Program Syiah Kuala University Website:
Dr. Mohamed Osman Hegazi 1 Database Systems Concepts Database Systems Concepts Course Outlines: Introduction to Databases and DBMS. Database System Concepts.
10/16/2015 1Yan Huang - Introduction Chapter 1: Introduction What is a DBMS? What is a DBMS? A little history of DB A little history of DB Major Components.
“INTRODUCTION TO DATABASE AND SQL”. Outlines 2  Introduction To Database  Database Concepts  Database Properties  What is Database Management System.
HND Agri DBMS Introduction MH Mohamed Nafas 1. Why DBMS? 2  Suppose we need to develop a Information system.  How do we  store the data? (use file.
What is a Database? SECTION 1. Database Technology and its Evolution Decades long evolution Early data processing systems Today's systems New technology.
Introduction to Database AIT632 Chapter 1 Sungchul Hong.
Dr. Mohamed Osman Hegazi
Copyright © 2003 Addison-Wesley Timeline for Database Systems Developments before 1960 transition from punched card and tape 1960s, from file management.
Introduction HNDIT DBMS 1. Database Management Systems Module code HNDIT Module title Database Management Systems Credits2HoursLectures15.
Database Systems Lecture 1. In this Lecture Course Information Databases and Database Systems Some History The Relational Model.
1 Database Environment. 2 Objectives of Three-Level Architecture u All users should be able to access same data. u A user’s view is immune to changes.
Chapter-1- Basic Concepts Reference: Prof. Mona Mursi Lecture notes
Chapter 1: Introduction. 1.2 Database Management System (DBMS) DBMS contains information about a particular enterprise Collection of interrelated data.
Normalization: A workshop for everybody! Database Normalization: A workshop for everybody! Part 1 Contents copyright Brent Friedman, Released under.
Introduction to Databases (1)
REV 00 Chapter 2 Database Environment DDC DATABASE SYSTEM.
REV 00 Chapter 2 Database Environment DDC DATABASE SYSTEM.
“Introduction To Database and SQL”
Chapter 2: Database System Concepts and Architecture - Outline
An Introduction to database system
Lecture 1 Introduction to Database
Introduction to Database Systems
Tools for Memory: Database Management Systems
“Introduction To Database and SQL”
Databases Databases 2017/2018 Introduction Introduction.
Chapter 1 Introduction to Database Processing
Advanced Database System
Presentation transcript:

1 Databases 2013/2014 Introduction

2 The menu for today Organisational aspects Introduction to database technology The relational model

About using laptops in classes 3

Organisation Hoorcollege Donderdag a.s. in Went-blauw, eenmalig Werkcolleges (beginnen volgende week dinsdag) Huiswerkopgaven (3x) Practica Opgave 1: casusbeschrijving, modelleren, schema-ontwerp Opgave 2: vulling van de database, SQL queries Voor elke opgave twee practicumsessies op tijden werkcollege 4

5 Introduction to database tech. What are databases? Relational data model (short version) Why should we look at databases? Short history of databases Some aspects of database technology Query languages Database applications: 4GL, constraints, reports ER-modeling Normalisation Transaction processing

6 What are databases? (1) Example: library system Books, readers, loans, reservations Loaning books, returning books, searching, making reservations, subscribing readers BookReader Loan

7 What are databases? (2) Manipulation of data using a query language For example SQL Integrated in a 4GL Often client/server architecture Application logic in the client SELECT Title FROM Book WHERE Author = ‘Kasparov’ Database server (DBMS) Client Database

8 What are databases? (3) Characteristics of a database environment Stable structure of data Large volumes (external memory, persistency) Good performance More than one user at a time Reliability and integrity of data Conceptual approach

9 Why look at databases? Databases are omnipresent Database technology is directly applicable Database technology is the backbone of most information systems Studying database technology provides insight in general principles of computer science Layered software architecture Application of predicate logic Mathematical modeling

10 (Pre)History of databases (1) Magnetic tapes were available in 1945 searching in external memory IBM introduced the RAMAC system in 1957 hard disk In 1961, Integrated Data Store was the first general DataBase Management Systeem (DBMS)

11 (Pre)History of databases (2) The Information Management System by IBM followed in the mid-sixties Hierarchical data model In the same era the Network Data model became popular (CODASYL standard) During the seventies, the commercial use of databases was rapidly growing Codd proposed the relational data model in 1970 The basis of almost all modern DBMSes

12 History of databases (3) In 1976, Chen introduced the Entity- Relationship (ER) model Conceptual modeling for databases Simplified the design of databases Query languages such as SEQUEL (SQL), QBE and QUEL were designed

13 History of databases (4) During the early eighties, the relational data model received widespread commercial attention In 1983, more than 100 RDBMSes existed DB2, ORACLE, SYBASE, INFORMIX, INGRES DBASE, PARADOX, MS-ACCESS SQL became a “standard” in 1986 SQL92/SQL2, SQL3, SQL2003: ANSI standards

14 History of databases (5) The first 4GL languages appeared during the eighties Object-oriented databases were introduced at the end of that decade Focus shifted to extending features and better performance Multimedia databases, web databases, parallel processing Core database technology is now quite “stable” Databases + …

15 Query languages From “how” to “what” SQL is declarative SELECT Name FROM Book, Loan, Reader WHERE Book.Title = ‘Fun-fishing’ AND Book.Bno = Loan.Bno AND Loan.Rno = Reader.Rno Book.Title := ‘Fun-fishing’; FIND FIRST Book USING Title; WHILE DB-Status = 0 DO BEGIN FIND FIRST Loan WITHIN Book_Loan; WHILE DB-Status = 0 DO BEGIN FIND OWNER WITHIN Reader_Loan; GET Reader; PRINT(Reader.Name); FIND NEXT Loan WITHIN Book_Loan; END; FIND NEXT Book USING Title; END

16 Database applications (1) PROCEDURE Loan; begin $today := call_system(‘current_date’); read($x); # read Rno if call(Rnocheck($x)) = 0 then begin message(“ticket invalid”); exit end; read($y); # read Bno while ($y <> EndOfLoan) do begin call(Register_loan($today, $x, $y)); read($y); end end {Loan} PROCEDURE Rnocheck($x); begin SELECT COUNT (*) FROM Reader WHERE Rno = $x; end {Rnocheck} PROCEDURE Register_loan ($today, $x, $y); begin INSERT INTO Loan VALUES ($y, $x, $today, NULL); end {Register_loan}

17 Database applications (2) CONSTRAINT constr1 (SELECT COUNT (*) FROM Loan WHERE Return_date IS NULL GROUP BY Rno) <= 6 ON VIOLATION … CONSTRAINT constr2 (SELECT COUNT (*) FROM Loan WHERE Return_date IS NULL GROUP BY Bno) <= 1 ON VIOLATION … CONSTRAINT constr3 (SELECT Bno FROM Loan) IS CONTAINED IN (SELECT Bno FROM Book) ON VIOLATION …

18 Database applications (3) Dear you have borrowed the following book from our We kindly request you to return this book as soon as possible. SELECT Name, Address, … FROM Loan, Reader, Book WHERE Loan.Rno = Reader.Rno AND Loan_date < ‘ ’ AND Return_date IS NULL

19 Database applications (4) Database server (DBMS) User interface Application programs Database SQLData File access  Sophisticated user ( DataBase Administrator, developer ) SQL Queries Updates Menus Screens Reports Naive user

20 ER modeling BookReader Loan (0, n)(0, m) Loan dateReturn date NameAddress RnoBno TitleAuthor Book(Bno, Author, Title) Reader(Rno, Name, Address) Loan(Bno, Rno, Loan_date, Return_date)

21 Normalisation (1) Why don’t we put everything in one table? Manageability Prevent redundancy and inconsistency Adequate representation (without NULLs) Normalisation “Vertical” splitting of tables Several distinct normal forms and algorithms

22 Normalisation (2)

23 Transaction processing (1) Transactions are important in case of crashes and simultaneous use of the database by multiple users Transactions transform multiple database operations into one single atomic operation (as seen from the outside) Read balance accno Read balance accno Withdraw € 50,- from Deposit € 50,- on Write balance accno Write balance accno CRASH!

24 Transaction processing (2) 1. Read balance accno Read balance accno Withdraw € 500,- from Withdraw € 500,- from Write balance accno Write balance accno Concurrency problem Solved by locking based techniques

25 Why relational databases? Software Engineering High level data specification and manipulation Philosophy with regard to system development Start with rigorous design of tables Stable; detailed inventarisation is possible Development of operations is secondary Difficult to analyse, rapid prototyping, continuous adaptation Successful application of computer science Set theory, predicate logic, optimisation, design theory