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

Similar documents
DATABASE DESIGN I - 1DL300

DATABASTEKNIK - 1DL116

Introduction to Database Technology Elmasri/Navathe ch 1-2 Padron-McCarthy/Risch ch 1 Sobhan Badiozamany Silvia Stefanova Department of Information Te

Database Systems Concepts *

Database System Concepts and Architecture. Copyright 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Copyright 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2-1

Database System Concepts and Architecture

Databases and Database Management Systems

DATABASE TECHNOLOGY - 1DL124

Database System Concepts and Architecture

DATABASE DESIGN I - 1DL300

What is Data? ANSI definition: Volatile vs. persistent data. Data. Our concern is primarily with persistent data

What is Data? Volatile vs. persistent data Our concern is primarily with persistent data

DATABASE MANAGEMENT SYSTEMS. UNIT I Introduction to Database Systems

Database Management System. Fundamental Database Concepts

DATABASE TECHNOLOGY - 1DL124

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

DATABASE CONCEPTS. Dr. Awad Khalil Computer Science & Engineering Department AUC

UNIT I. Introduction

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

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

Database Management Systems MIT Introduction By S. Sabraz Nawaz

Introduction: Database Concepts Slides by: Ms. Shree Jaswal

Course Logistics & Chapter 1 Introduction

Chapter 1 Database System Concepts and Architecture. Nguyen Thi Ai Thao

Copyright 2004 Pearson Education, Inc.

Database Management System

CS425 Fall 2016 Boris Glavic Chapter 1: Introduction

DATABASE TECHNOLOGY. Spring An introduction to database systems

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

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

COMP3311 Database Systems

Databases 1. Daniel POP

SE352b: Roadmap. SE352b Software Engineering Design Tools. W5: Database Technology. Database Technology

Chapter 1: Introduction

CSE 3241: Database Systems I Databases Introduction (Ch. 1-2) Jeremy Morris

Introduction to Database Systems. Motivation. Werner Nutt

CMSC 424 Database design Lecture 2: Design, Modeling, Entity-Relationship. Book: Chap. 1 and 6. Mihai Pop

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

Introduction to Database Concepts. Department of Computer Science Northern Illinois University January 2018

Chapter 1: Introduction

Database Systems Overview. Truong Tuan Anh CSE-HCMUT

Overview of Data Management

The functions performed by a typical DBMS are the following:

Introduction. Example Databases

Databases and Database Systems

Introduction to Databases

COSC 304 Introduction to Database Systems. Database Introduction. Dr. Ramon Lawrence University of British Columbia Okanagan

CSE2004 Database Management Systems

DATABASTEKNIK - 1DL116

Review for Exam 1 CS474 (Norton)

Introduction Database Concepts

Practical Database Design Methodology and Use of UML Diagrams Design & Analysis of Database Systems

LECTURE1: PRINCIPLES OF DATABASES

Bottom line: A database is the data stored and a database system is the software that manages the data. COSC Dr.

John Edgar 2

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

Basant Group of Institution

An Introduction to Databases and Database Management Systems.

Relational Database Systems Part 01. Karine Reis Ferreira

Mahathma Gandhi University

Elena Baralis and Tania Cerquitelli 2013 Politecnico di Torino 1

Databases TDA357/DIT620. Niklas Broberg

CSE 132A. Database Systems Principles

What s a database anyway?

Chapter 1 Introduction

Database Systems Introduction SL01

Chapter 1: Introduction

Data, Databases, and DBMSs

Introduction to Data Management. Lecture #2 Intro II & Data Models I

DATABASE DESIGN II - 1DL400

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

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

1/19/2012. Finish Chapter 1. Workers behind the Scene. CS 440: Database Management Systems

Chapter 1: Introduction

Introduction and Overview

Overview of Data Management

CSC 355 Database Systems

Introduction to Database Systems (1)

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

DATABASE DESIGN I - 1DL300

Copyright 2007 Ramez Elmasri and Shamkant B. Navathe. Slide 1-1

Database Applications (15-415)

Chapter 1: Introduction

Fundamentals of Databases

Upon completion of this Unit, the students will be introduced to the following

Chapter 1 Chapter-1

Database Technology Introduction. Heiko Paulheim

Where is Database Management System (DBMS) being Used?

Data Base Concepts. Course Guide 2

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

For many companies, information systems cost 40 percent of overall costs.

Fundamentals of Database Systems (INSY2061)

Data Modeling using ER Model

Chapter 1: Introduction. Chapter 1: Introduction

Introduction to Databases CS348

Introduction: Databases and. Database Users

1 Introduction. File system versus DBS. Why Database systems? Reading and Writing Random Access Files in Java (taken from Java API)

CSE 544 Principles of Database Management Systems

Assignment Session : July-March

Transcription:

Databases: Why? DATABASE DESIG I - DL300 Spring 202 An introductury course on database systems http://www.it.uu.se/edu/course/homepage/dbastekn/vt2 Erik Zeitler Uppsala Database Laboratory Department of Information Technology, Uppsala University, Uppsala, Sweden Extremely prevalent Web sites, banking, telecom, sensors, retail, science and engineering, You are using a database every day hour Database Management Systems (DBMS) provide efficient, reliable, convenient, and safe multi-user storage of and access to massive amounts of persistent data. 202-0-6 202-0-6 2 Databases: What? Massive Terabytes per day Persistent Safe Hardware software power users Multi-user Concurrency control Convenient Physical data independence High-level declarative query language Efficient 000 s of queries and/or updates per second Reliable 99.99999% Data model Set of records, graph, XML Schema vs data types variables values Data definition language (DDL) Set up schema Databases: How? Data manipulation language (DML)/Query Language (QL) Query and modify 202-0-6 3 202-0-6 4

Key DB people DL300 in a nutshell DBMS implementer Builds system (works at Oracle, IBM, Microsoft, Uppsala University) DB designer Establish schema DL400 DB application developer Programs that operate on DB DB Administrator (DBA) Operations & Maintenance Tuning & Optimization DL300 3 LECTURES Course intro Overview of DB technology DB terminology ER-modeling Relational model and relational algebra ER-to-relational mapping and ormalization SQL Transactions, Concurrency control Recovery techniques Intro to storage and index structures 3 ASSIGMETS To be done in pairs:. ormalization 2. DB Design and ER modeling 3. SQL in RDBMS Queries and views JDBC API access to RDBMS FIAL EXAM Skrivsalen Mon March 5 o books allowed 202-0-6 5 202-0-6 6 Lecturers Erik Zeitler (main teacher) room 320 Silvia Stefanova room 39 Anne Peters room 2005 Personnel Assistants Mikael Lax phone 47 7345 room 306 Lars Melander phone 47 05 room 36 Minpeng Zhu phone 47 355 room 30 Friendly reminders from the Student Office. ot admitted?. Swedish students: Go to www.antagning.se DL300 sen anmälan 2. Master students: Go to your study counsellor 3. Exchange students: Ulrika Jaresund 2. Make sure you are registered (registration deadline January 29). Studentportalen (all) 2. Registered before, want to register again? Student Office it-kansli@it.uu.se (re-register) 3. Master students: Study counsellor 4. Exchange students: Ulrika Jaresund 3. Want to quit the course? Inform the Student Office! (it-kansli@it.uu.se) If less than 3 weeks have passed since the course started, the course registration will be removed. After 3 weeks a "course intermission" will be reported to UPPDOK instead. 4. Don t forget to sign up for the final exam firstname.lastname@it.uu.se 202-0-6 7 202-0-6 8

The database market (Computer Sweden May 24, 2002) Introduction to Database Terminology Elmasri/avathe chs -2 Padron-McCarthy/Risch ch Erik Zeitler Department of Information Technology Uppsala University, Uppsala, Sweden 202-0-6 9 202-0-6 0 DBMS deployment plans (Gartner 2008) Outline of a database system 202-0-6 202-0-6 2

Database? Database management system? A database (DB) is a more or less well-organized collection of related data. The information in a database... represents information within some sub-area of reality (i.e. objects, characteristics and relationships between objects) is logically connected A database management system (DBMS) is one (or several) program that provides functionality for users to develop, use, and maintain a database. Thus, a DBMS is a general software system for defining, populating (constructing), manipulating and sharing databases for different types of applications. Also supports protection (system and security) and maintenance to evolve the system. has been organized for a specific group of users and applications 202-0-6 3 202-0-6 4 Database system? Database vs files A database system consists of... the physical database (instance) a database management system one or several database languages (means for communicating with the database) one or several application program(s) A database system makes a simple and efficient manipulation of large data sets possible. DB in comparison to conventional file management: data model data abstraction meta-data in catalog program-data and program-operation independence multiple views of data sharing data multiuser transactions high-level language for managing data in the database The term DB can refer to both the content and to the system (the answer to this ambiguity is governed by the context). 202-0-6 5 202-0-6 6

Advantages of using a database approach Efficient search and access of large data sets Controlling redundancy and inconsistency Access control Persistent storage Indexes and query processing Backup and recovery Multiple user interfaces Complex relationships Integrity constraints Active behaviour Enforcing standards, reducing application development time, flexibility to evolve system, up-to-date info Data model? Every DB has a data model hides the physical representation of data A data model is a formalism that defines a notation for describing data on an abstract level a set of operations to manipulate data represented using the data model Data models are used for data abstraction Enabling definition and manipulation of data on an abstract level. 202-0-6 7 202-0-6 8 Data models - examples Meta-data, i.e. data about data Examples of representational (implementation) data models within the database field are: Hierarchical (IMS) etwork (IDMS) Relational (ORACLE, DB2, SQL Server, InterBase, Mimer) Object-oriented (ObjectStore, Objectivity, Versant, Poet) Object-relational (Informix, Odapter, DB2) Conceptual data model ER-model - Entity-Relationship model (not an implementation model since there are no operations defined for the notation) Information about which information that exists and about how/where data is stored cf. variables names and data types of data items in a program names and sizes of files storage details of each file mapping information among schemas constraints Meta-data is stored in a system catalog (alt. term data dictionary). 202-0-6 9 202-0-6 20

Schema and instance Data independence To be able to separate data in the database and its description the terms database instance and database schema are used. The schema is created when a database is defined. A database schema is not changed frequently. The data in the database constitute an instance. Every change of data creates a new instance of the database. Reduces the connection between: the actual organization of data and how the users/application programs process data (or sees data.) Why? Data should be able to change without requiring a corresponding alteration of the application programs. Different applications/users need different views of the same data. 202-0-6 2 202-0-6 22 Data independence - how? Three-schema architecture By introducing a multi-level architecture where each level represents one abstraction level End End users users The three-schema architecture Introduced in 97 a.k.a. ASI/SPARC architecture for databases CODASYL Data Base Task Group. It consists of 3 levels: Internal level Conceptual level External level External level Conceptual level Internal level view view 2 logical Conceptual schema physical Internal schema view n Each level introduces one abstraction layer and has a schema that describes how representations should be mapped to the next lower abstraction level. Database Database instance instance 202-0-6 23 202-0-6 24

Logical database design. Make an ER diagram 2. Translate that ER diagram to a relational DB schema ename EMPLOYEE salary dname dno WORKS_I date ono DEPARTMET CARRIES ORDER Schemas for the entity types in the example above MAAGES sname EMPLOYEE(EAME, SALARY, DEPT) saddr SUPPLIER DEPARTMET(DO, DAME, MGR) SUPPLIER(SAME, SADDR) SUPPLIES ITEM(IO, IAME, DO) M price ORDER(OO, DATE, CUST) iname ITEM ino CUSTOMER(CAME, CADDR, BALACE) M ICLUDE quantity PLACED_BY CUSTOMER cname balance caddr Schemas for relationship types (M:) SUPPLIES(SAME, IO, PRICE) ICLUDE(OO, IO, QUATITY) Internal, conceptual and external schemas Internal schema: describes storage structures and access paths for the physical database. Abstraction level: files, index files etc. Is usually defined through the data definition language (DDL) of the DBMS. Conceptual schema: an abstract description of the physical database. Constitute one, for all users, common basic model of the logical content of the database. This abstraction level corresponds to the real world : object, characteristics, relationships between objects etc. The schema is created in the DDL according to a specific data model. External schema (or views): a (restricted) view over the conceptual schema A typical DB has several users with varying needs, demands, access privileges etc. and external schemas describes different views of the conceptual database with respect to what the different user groups would like to/are allowed to se. Some DBMS s have a specific language for view definitions (else the DDL is used). 202-0-6 25 202-0-6 26 An example database (Elmasri/avathe Figure.2) Views - example (Elmasri/avathe fig.4) 202-0-6 27 202-0-6 28

Possible data independence in the three-schema architecture. Logical data independence The possibility to change the conceptual schema without influencing the external schemas (views). e.g. add another field to a conceptual schema. 2. Physical data independence The possibility to change the internal schema without influencing the conceptual schema.. the effects of a physical reorganization of the database, such as adding an access path, is eliminated. view view 2 Conceptual schema Internal schema view n Database languages A generic term for a class of languages used for defining, communicating with or manipulating a database. In conventional programming languages, declarations and program sentences is implemented in one language. A database language includes several different languages. Storage Definition Language (SDL) - internal schema Data Definition Language (DDL) - conceptual schema View Definition Language (VDL) - external schema Data Manipulation Language (DML) In the DDL the database administrator define internal + conceptual schema database is designed. Subsequent schema modifications are also made in DDL. DB users and application programs use DML to retrieve, add, remove, or alter the data in the database the term Query Language is usually used as synonym to DML. 202-0-6 29 202-0-6 30 Classification criteria for DBMSs Physical two-tier client-server architecture Type of data model hierarchical, network, relational, object-oriented, object-relational Centralized vs. distributed DBMSs Homogeneous vs. heterogeneous DDBMSs Multidatabase systems Single-user vs. multi-user systems General-purpose vs. special-purpose DBMSs specific applications such as airline reservation and phone directory systems. Cost 202-0-6 3 202-0-6 32

Logical three-tier client/server architecture DBMS architecture 202-0-6 33 202-0-6 34