Plan for Intro to DB Systems I

Slides:



Advertisements
Similar presentations
Introduction to Databases Transparencies
Advertisements

Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 1.
Introduction and Conceptual Modeling
Chapter 1 Database and Database Users Dr. Bernard Chen Ph.D. University of Central Arkansas.
Chapter 1 Database and Database Users Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2008.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 1 Outline Types of Databases and Database Applications Basic Definitions Typical DBMS Functionality.
Introduction to Data bases concepts
Module Title? DBMS Introduction to Database Management System.
Database Technical Session By: Prof. Adarsh Patel.
Introduction: Databases and Database Users
1Mr.Mohammed Abu Roqyah. Introduction and Conceptual Modeling 2Mr.Mohammed Abu Roqyah.
1 Welcome: To the second learning sequence “ Data Base (DB) and Data Base Management System (DBMS) “ Recap : In the previous learning sequence, we discussed.
Chapter(1) Introduction and conceptual modeling. Basic definitions Data : know facts that can be recorded and have an implicit. Database: a collection.
Introduction to Database AIT632 Chapter 1 Sungchul Hong.
1-1 Chapter 1 Databases and Database Users 1.1 Introduction 1.2 An Example 1.3 Characteristics of the Database Approach 1.4 Actors on the Scene 1.5 Workers.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 1 Introduction: Databases and Database Users.
Copyright © 2004 Pearson Education, Inc. Chapter 1 Introduction and Conceptual Modeling.
Database System Concepts Introduction Purpose of Database Systems View of Data Data Models Data Definition Language Data Manipulation Language Transaction.
Advanced Databases COMP3017 Dr Nicholas Gibbins
Postgraduate Module Enterprise Database Systems Technological Educational Institution of Larisa in collaboration with Staffordshire University Larisa
CHAPTER 1: INTRODUCTION Purpose of Database Systems View of Data Data Models Data Definition Language Data Manipulation Language Storage Management Database.
Introduction: Databases and Database Systems Lecture # 1 June 19,2012 National University of Computer and Emerging Sciences.
10/3/2017.
Fundamental of Database Systems
Introduction to Databases Transparencies
Introduction to Databases
Chapter 1 Database and Database Users
Introduction to Databases Transparencies
Introduction to DBMS Purpose of Database Systems View of Data
Structured Query Language (SQL) DDL
CS4222 Principles of Database System
Introduction to Databases
Structured Query Language (SQL) DML
Database Management.
Datab ase Systems Week 1 by Zohaib Jan.
Introduction to Database Systems Part II
Outline Types of Databases and Database Applications Basic Definitions
Chapter 2 Database Environment.
“ Database (DB) and Database Management System (DBMS) “
Database and Database Users
Database Management:.
Chapter 1: Introduction
Introduction to Databases
Introduction to Databases Transparencies
Introduction to Databases
Introduction to Databases
SQL: Advanced Options, Updates and Views Lecturer: Dr Pavle Mogin
SQL: Structured Query Language DML- Queries Lecturer: Dr Pavle Mogin
9/22/2018.
Introduction to Databases
Introduction to Databases
Chapter 2 Database Environment.
Chapter 2 Database Environment Pearson Education © 2009.
Introduction to Databases
Database System Architecture
Introduction to DBMS Purpose of Database Systems View of Data
Introduction to Databases
Database (DB) and Database Management System (DBMS)
Introduction to Databases
Introduction to Databases
Chapter 1: Introduction
Introduction to Databases Transparencies
Chapter 2 Database Environment Pearson Education © 2014.
Chapter 1: Introduction
Chapter 1: Introduction
Chapter 1: Introduction
Terms: Data: Database: Database Management System: INTRODUCTION
Chapter 2 Database Environment Pearson Education © 2009.
Chapter 2 Database Environment Pearson Education © 2009.
Chapter 1: Introduction
Presentation transcript:

Introduction to Database Systems Part I Coordinator: Dr Hui Ma Lecturer: Dr Pavle Mogin

Plan for Intro to DB Systems I What is: A database Data A database management system (DBMS) Reading: Chapter 1

Definition of a Database A database is a collection of related data Essential database characteristics are: Represents an aspect of the real world (miniworld, UoD), We shall suppose it is well structured (even has a strict regular structure), Reflects (or should reflect) current state of the UoD, Has users and applications, Stored in a permanent (persistent) computer memory, and Managed by a Database Management System (DBMS) All these characteristics have to be met

What Is a Database? Real World Facts about the world and its behaviour represented in the content and operations of a database facts about the world in a database more facts some more rather long facts about the world in the databse facts about the world in a database more facts some more rather long facts about the world in the databse facts about the world in a database more facts some more rather long facts about the world in the databse facts about the world in a database more facts some more rather long facts about the world in the databse facts about the world in a database more facts some more rather long facts about the world in the databse Users Database facts about the world in a database more facts some more rather long facts about the world in the databse facts about the world in a database more facts facts about the world in a database more facts facts about the world in a database more facts facts about the world in a database facts about the world in a database more facts facts about the world in a database facts about the world in a database facts about the world in a database facts about the world in a database facts about the world in a database facts about the world in a database facts about the world in a database facts about the world in a database facts about the world in a database

A Sample Database Student LName FName StudId Major Smith Susan 131313 Comp Bond James 007007 Math 555555 Grade StudId CourId 007007 C302 A+ C301 A M214 131313 B- 555555 C D E Course CName CourId Hours Dept DB Sys C302 2+1 Comp SofEng C301 2+0 DisMat M214 4+1 Math This is just a graphical representation of a part of a database. The real database would be stored on an computer memory device, by means of binary symbols. But neglecting this, that set of interrelated tables with data: represents an UoD, is well structured, can reflect changes, and we can imagine possible users and applications. So we shall consider it as a possible representation of a database.

Questions for You Is a book (like "Fundamentals of Database Systems") a database? Is an old style library card catalog a database? Is a bank statement a database

Definition of Data (Datum) Data is a value of a property of an individual UoD entity or a relationship (between two UoD objects) at a particular period of time Example If time is not recorded, it is assumed the value relates to the current time Entity Relationship UoD object(s) James James & CompSci Property Time Value Age Number of Points July 2010 July 2010 21 240

Assumptions Fundamental Assumptions of Data Management: Databases provide data for multiple application programs Data in databases is accessed and manipulated concurrently Data in databases is dynamic, that is, may change over time Data in databases is persistent The amount of data in databases can be huge

Amazon.com Database 20 million books, CDs, videos, DVDs, electronices, apparel and other items Occupies over 42 terabytes (1 terabytes = 1024GB) Stored on 200 different computers 15 million visitors access Amazon.com each day The database is continually updated as new books/items are added to the inventory and purchases are transacted 100 people are responsible for keeping the database up-to-date

Database Management System (DBMS) A Database Management System (DBMS) is a general purpose software system that facilitates: Defining (describing the structure), Populating by data (Constructing), Manipulating (querying, updating), Preserving consistency, Protecting from misuse, Recovering from failure, and Concurrent using of a database The product of database defining is called meta-data It is stored by DBMS as a small database called catalog or dictionary

A Simplified Database System Layout DB designer Users/ Programmers Database System Database Definition Application Programs/ Interactive Queries DBMS Query answer DDL Compiler Data Access Query Processor (query plan) Catalog (Meta-Data) Database

Typical DBMS Functionality Supports: Defining of a particular database in terms of its data types, structures, and constraints (contains DDL) Loading the initial database contents on a secondary storage medium Manipulating the database (contains DML): Retrieval: querying, generating reports Modification: insertions, deletions and updates Processing and Sharing by a set of concurrent users and application programs Keeps all data valid and consistent Protection or Security measures to prevent unauthorized access

Data Definition Example Defining a table in SQL: CREATE TABLE Course ( CourId char(4) CONSTRAINT cspk PRIMARY KEY, CName varchar NOT NULL, Points int NOT NULL CHECK (Points >= 0), Dept varchar );

Query and Insert Examples SELECT LName AS SURNAME, CName, Grade FROM Student s, Grades g, Course c WHERE FName = 'James' AND s.StudId = g.StudId AND c.CourId = g.CourId ; INSERT INTO Student (FName, LName, StudId) VALUES ('Ann', 'Bolen', 111111), ('Sharon', 'King' 121212);

Concurrency Control Example prg #1 A in prg #1 A in db prg #2 A in prg #2 Read A 2 2 2 2 Read A 2 A = A + 1 3 2 2 3 2 A = A + 1 3 Write A 3 3 3 It is the task of the DBMS and it’s concurrency control module to force database system to calculate correctly 3 Write A 3 Time The net result of executing these two programs is: 2 + 1 + 1 = 3

A Question for You What caused the error in the database processing example: Pavle made a mistake DBMS does not know to do arithmetic Wrong program design Comment: “The program was made by someone who didn’t do COMP 302!”

Advantages of Using Databases (1) Helps in: Controlling redundancy in data storage Investing less efforts in development and maintenance Sharing of data among multiple users Restricting unauthorized access to data Also, allows using sophisticated design techniques: Data normalization Denomalization: sometimes it is necessary to use controlled redundancy to improve the performance of queries

Advantages of Using Databases (2) Helps in: Providing backup and recovery services Providing multiple interfaces to different classes of users Representing complex relationships among data Enforcing integrity constraints on the database Referential integrity constraint Key or uniqueness constraint Attribute constraints Drawing inferences and actions using rules (active databases) E.g. triggers and stored procedures

Summary A database is a collection of related data that is well structured and stored permanently A data (datum) is a value of a real object’s (or a relationship’s) property in a perceived moment of time A DBMS is a set of programs that supports: Defining, Populating by data, Querying, Preserving consistency, Protecting from misuse, Recovering from failure, and Concurrent using of a database

Plan for the next lecture Data models Schemas and instances The three schema architecture Data independence Database users and languages Reading: chapter 2 of the textbook