BBM 371 – Data Management Lecture 3: Basic Concepts of DBMS 06.10.2015 Prepared by: Ebru Akçapınar Sezer, Gönenç Ercan.

Slides:



Advertisements
Similar presentations
1 Introduction to Database Systems CSE444 Instructor: Scott Vandenberg University of Washington Winter 2000.
Advertisements

Database Management Systems 1 Ramakrishnan & Gehrke Introduction to Database Systems Chapter 1 Instructor: Mirsad Hadzikadic.
Chapter 1 Instructor: Murali Mani Database Management Systems.
1 541: Database Systems S. Muthu Muthukrishnan. 2 Some Data Collections I Have Played With….  Wireless call detail records.  U. S. Patents.  AskJeeves.
Database Management Systems, R. Ramakrishnan and J. Gehrke1 Introduction to Database Systems Chapter 1 Instructor: Wang-Chien Lee
Database: A collection of related data [Elmasri]. A database represents some aspect of real world called “miniworld” [Elmasri] or “enterprise” [Ramakrishnan].
Introduction to Database Systems Ch. 1, Ch. 2 Mr. John Ortiz Dept. of Computer Science University of Texas at San Antonio.
ETEC 100 Information Technology
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Database Management Systems Chapter 1 Instructor: Deborah Strahman
Database Management Systems, R. Ramakrishnan and J. Gehrke1 Introduction to Database Systems Chapter 1 Instructor: Johannes Gehrke
CMPT 354, Simon Fraser University, Fall 2008, Martin Ester 1 Database Systems I Introduction.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Database Management Systems Chapter 1.
On Database Systems.
1 Introduction to Database Systems Ref. Ramakrishnan & Gehrke Chapter 1.
1 CENG 302 Introduction to Database Management Systems Nihan Kesim Çiçekli URL:
Introduction overview of DBMS
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Database Management Systems Chapter 1 Instructor: Ethan Jackson
Introduction overview of DBMS
CSCD34 - Data Management Systems,- A. Vaisman1 CSC D34 - Data Management Systems Instructor: Alejandro Vaisman University of Toronto.
CSC343H – Introduction to Databases
Database System Concepts and Architecture Lecture # 3 22 June 2012 National University of Computer and Emerging Sciences.
CSC 411/511: DBMS Design 1 1 Dr. Nan WangCSC411_L1_Overview 1 Overview of Database Systems (Chapter 1)
Database Management Systems 1 Introduction to Database Systems Instructor: Xintao Wu Ramakrishnan & Gehrke.
CST203-2 Database Management Systems Lecture 2. One Tier Architecture Eg: In this scenario, a workgroup database is stored in a shared location on a single.
CS6530 Graduate-level Database Systems Prof. Feifei Li.
 DATABASE DATABASE  DATABASE ENVIRONMENT DATABASE ENVIRONMENT  WHY STUDY DATABASE WHY STUDY DATABASE  DBMS & ITS FUNCTIONS DBMS & ITS FUNCTIONS 
1 Introduction to Database Systems. 2 Database and Database System / A database is a shared collection of logically related data designed to meet the.
1 CS862 - Advanced Database Systems Sang H. Son
Database Management Systems 1 Ramakrishnan & Gehrke Introduction to Database Systems Chpt 1 Instructor: Xintao Wu.
Database Management Systems 1 Ramakrishnan & Gehrke Introduction to Database Systems Chpt 1 Instructor: Weichao Wang.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Database Management Systems Chapter 1 Overview of Database Systems.
Database Organization and Design
INFS614, Dr. Brodsky, GMU1 Database Management Systems INFS 614 Instructor: Professor Alex Brodsky
ICS 321 Fall 2009 Introduction to Database Systems Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.
 Three-Schema Architecture Three-Schema Architecture  Internal Level Internal Level  Conceptual Level Conceptual Level  External Level External Level.
Introduction to Database Systems1. 2 Basic Definitions Mini-world Some part of the real world about which data is stored in a database. Data Known facts.
Database Environment Chapter 2. Data Independence Sometimes the way data are physically organized depends on the requirements of the application. Result:
1 What Is a DBMS?  A very large, integrated collection of data.  Models real-world enterprise.  Entities (e.g., students, courses)  Relationships (e.g.,
DATABASE MANAGEMENT SYSTEM ARCHITECTURE
Database Systems Lecture 1. In this Lecture Course Information Databases and Database Systems Some History The Relational Model.
Database Management Systems, R. Ramakrishnan and J. Gehrke1 Introduction to Database Systems Chapter 1 Instructor: Johannes Gehrke
-ebru a.s ATTRIBUTE: Description of entities For employee entity number, name, deptno, age, adr, salary..etc are attributes. RECORD: Stores whole.
CpSc 8620: DBMS Design Introduction. 2 Attribution Materials and lecture notes in this course are adapted from various sources, including the authors.
1 CS462- Database Systems Sang H. Son
Database Management Systems.  Instructor: Yrd. Doç. Dr. Cengiz Örencik   Course material.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Why do you learn database?? Chapter 0.
Chapter 1: Introduction. 1.2 Database Management System (DBMS) DBMS contains information about a particular enterprise Collection of interrelated data.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Database Management Systems Chapter 1.
SQL IMPLEMENTATION & ADMINISTRATION Introduction to Databases & SQL.
1 CENG 351 CENG 351 Introduction to Data Management and File Structures Department of Computer Engineering METU.
Database Management Systems 1 Ramakrishnan & Gehrke Introduction to Database Systems Chpt 1 Instructor: Xin Zhang.
Introduction: Databases and Database Systems Lecture # 1 June 19,2012 National University of Computer and Emerging Sciences.
1 Database Management Systems Introduction Instructor: Oliver Schulte
COP Introduction to Database Structures
Introduction to Database Systems Chapter 1
Introduction to Database Systems
Instructor: Elke Rundensteiner
Database Management Systems Chapter 1
Introduction to Database Systems
Overview of Database Systems Chpt 1
Instructor: Murali Mani
Database Management Systems Chapter 1
DATABASE SYSTEM.
Database Management Systems
Database Management Systems CSE594
Sang H. Son CS6750: Database Systems The slides for this text are organized into chapters. This lecture covers Chapter 1. Chapter 1: Introduction.
Introduction to Database Systems
Database Management Systems Chapter 1
Data Independence Applications insulated from how data is structured and stored. Logical data independence: Protection from changes in logical structure.
Introduction to Database Systems Chpt 1
Presentation transcript:

BBM 371 – Data Management Lecture 3: Basic Concepts of DBMS Prepared by: Ebru Akçapınar Sezer, Gönenç Ercan

Some terms ► ATTRIBUTE: Description of entities ► For employee entity: number, name, deptno, age, adr, salary..etc are attributes. ► RECORD: Stores whole information of an entity ► Fixed /variable length records ► Fixed/variable type records ► FILE: Organization of whole data’s of one entity set ► Employee file keeps all employee’s record ► KEY: One or more field to used for retrieve or sort file ► Primary Key: One or more field which can take unique value for an entity ► External Key: Key which is composed aspects of physical storage of record

Entity: Student ► Students( sid: string, name: string, login: string, age: integer, gpa: real ) Sidnameloginagegpa Attribute Record FILE Data about entity

Continues.... ► Operation on Files: ► Read ► Write ► Types Of Access ► Sequential ► Random (Direct)

What Is a DBMS? ► A very large, integrated collection of data. ► Models real-world enterprise. ► Entities (e.g., students, courses) ► Relationships (e.g., Tarkan is taking CENG302) ► A Database Management System (DBMS) is a software package designed to store and manage databases. ► Well known commercial DBMS products: Oracle, DB2, Sybase etc. Data about entity

What Is a DBMS? ► A Database Management System (DBMS) is a software package designed to store and manage databases. ► With DBMS ► Supports large volumes ► Data independence and efficient access. ► Reduced application development time. ► Data integrity and security. ► Concurrent access, recovery from crashes.

Typical DBMS use in Applications from internet

Typical table creation in DBMS (example) from internet

Sample Tables

Sample Query in DBMS from internet

FAKULTE, BOLUM, OGRELM && references CREATE TABLE FAKULTE (FNO NUMBER(2) PRIMARY KEY, FADI CHAR(30) NOT NULL, DEK-SNO CHAR(6) NULL REFERENCE OGRELM(SNO)); CREATE TABLE BOLUM( BNO NUMBER(3) PRIMARY KEY, BADI CHAR(30) NOT NULL, FNO NUMBER(2) NOT NULL REFERENCE FAKULTE(FNO), BB-SNO CHAR(6) NULL REFERENCE OGRELM(SNO)); FNOFADIDEK-SNO FAKULTE OGRELM SNO reference BNOBADIFNOBB-SNO reference BOLUM

Sample SQL Queries CREATE VIEW KMALZEME AS SELECT MKODU, ADI FROM MALZEME WHERE MKODU NOT IN (SELECT MKODU FROM TUKETİM); INSERT INTO BOLUM VALUES (356,’Bilgisayar Müh.’, ‘1234’); SELECT SNO, ADI FROM PERSONEL WHERE UCRETİ>1000;

Structure of a DBMS ► A typical DBMS has a layered architecture. ► The figure does not show the concurrency control and recovery components. ► This is one of several possible architectures; each system has its own variations. Query Optimization and Execution Relational Operators Files and Access Methods Buffer Management Disk Space Management DB These layers must consider concurrency control and recovery

Schema for the DBMS levels ► External (Sub) Schema ► defines the external view of data as seen by a user or program ► Conceptual Schema ► defines the logical view of data as seen by all users and programs ► Physical (Internal) Schema ► defines the physical view of data as seen by a DBMS

Conceptual Layer Physical Layer Base Tables Stored Tables... External Layer View

database Name (20 characters) Address (40 characters) NID (10 char) Designation (15 char) A.B.C. De Silva |222, Galle Road, Colombo | V|Senior Lecturer Employee record Physical View The DBMS must know – exact physical location – precise physical structure

database Employee Address 222, Galle Road, Colombo Name A.B.C. De Silva Designation Senior Lecturer NID V Logical View The user/application must know – existence – logical reference

Table Conceptual Layer ► The conceptual model is a logical representation of the entire contents of the database. ► The conceptual model is made up of base tables. ► Base tables are “real” in that they contain physical records.

database Lecturer Department Dept. of Computer Science Name A.B.C. De Silva Designation Senior LecturerAge 35 External View ► The user/application see ► authorised data ► own format

External View cont. ► External Views Allows to ► hide unauthorised data ► e.g. salary, dob ► provide user view ► e.g. view employee name, designation, department data taken from employee and department files ► derive new attributes ► e.g. age derived from dob or nid

Exp: University Database ► Conceptual schema: ► Students(sid: string, name: string, login: string, age: integer, gpa:real) ► Courses(cid: string, cname:string, credits:integer) ► Enrolled(sid:string, cid:string, grade:string) ► Physical schema: ► Relations stored as unordered files. ► Index on first column of Students. ► External Schema (View): ► Course_info(cid:string,grade:integer)

Data Independence ► Applications insulated from how data is structured and stored. ► Logical data independence: Protection from changes in logical structure of data. ► Physical data independence: Protection from changes in physical structure of data. * One of the most important benefits of using a DBMS!

People who deal with databases ► Database implementers ► End users and DBMS vendors ► DB application programmers ► E.g. smart webmasters ► Database administrator (DBA) ► Designs logical /physical schemas ► Handles security and authorization ► Data availability, crash recovery ► Database tuning as needs evolve Must understand how a DBMS works!

Important Reason for looking ‘inside’ db ► DBA’s must know underlying technology to make decision (System installing, parameter setting) ► Decide best configuration of an application ► Data security and integrity ► Data processing