COSC 2307: Database Programming Lecture 1: Introduction Kalpdrum Passi Fall 2004 ( www.cs.laurentian.ca/kpassi/cosc2307.html )

Slides:



Advertisements
Similar presentations
Database Systems Chapter 2
Advertisements

Databases and Database Management Systems
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 1.
ICS (072)Database Systems Background Review 1 Database Systems Background Review Dr. Muhammad Shafique.
Databases and Database Users
Copyright © 2004 Pearson Education, Inc.. Chapter 2 Database System Concepts and Architecture.
Introduction to database technology (Based on Chapters 1-2 in Fundamentals of Database Systems by Elmasri and Navathe, Ed. 4)
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 1.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 2 Database System Concepts and Architecture.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 1.
Databases and Database Management Systems
Introduction and Conceptual Modeling
1 Chapter 2 Database Environment. 2 Chapter 2 - Objectives u Purpose of three-level database architecture. u Contents of external, conceptual, and internal.
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
Copyright © 2004 Pearson Education, Inc. Chapter 1 Introduction.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 2 Database System Concepts and Architecture.
Information storage: Introduction of database 10/7/2004 Xiangming Mu.
DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 1 Chapter 2: Database System Concepts and Architecture - Outline Data Models and Their.
Slide Chapter 2 Database System Concepts and Architecture.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 1.
Copyright © 2004 Pearson Education, Inc.. Chapter 2 Database System Concepts and Architecture.
Faculty of Information Science and Technology Mahanakorn University of Technology Topic 2 Database System Concepts and Architecture.
CSC271 Database Systems Lecture # 4.
Database System Concepts and Architecture Lecture # 2 21 June 2012 National University of Computer and Emerging Sciences.
Database System Concepts and Architecture
Introduction: Databases and Database Users
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Database System Concepts and Architecture.
2. Database System Concepts and Architecture
1Mr.Mohammed Abu Roqyah. Introduction and Conceptual Modeling 2Mr.Mohammed Abu Roqyah.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 1.
1 CSBP430 – Database Systems Chapter 2: Database System Concepts and Architecture Elarbi Badidi College of Information Technology United Arab Emirates.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 1.
Ihr Logo Fundamentals of Database Systems Fourth Edition El Masri & Navathe Chapter 2 Database System Concepts and Architecture.
Instructors: Churee Techawut Introduction to Database System Chapter 1 CS (204)321 Database System I.
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 technology (Based on Chapters 1-2 in Fundamentals of Database Systems by Elmasri and Navathe, Ed. 4)
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 1.
1Mr.Mohammed Abu Roqyah. Database System Concepts and Architecture 2Mr.Mohammed Abu Roqyah.
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.
Database System Concepts and Architecture
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 1.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 2- 1.
DataBase System Concepts and Architecture
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 2- 1.
Copyright © 2004 Pearson Education, Inc. Chapter 2 Database System Concepts and Architecture.
Database Systems – Concepts
PART I : Databases and Database Management Systems These Slides are based on chapters 1-2 of Fundamentals of : Database Systems by Elmasri and Navathe,
1 Chapter 2 Database Environment Pearson Education © 2009.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 1.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 1 Introduction: Databases and Database Users.
2) Database System Concepts and Architecture. Slide 2- 2 Outline Data Models and Their Categories Schemas, Instances, and States Three-Schema Architecture.
Copyright © 2004 Pearson Education, Inc. Chapter 1 Introduction and Conceptual Modeling.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 1.
Introduction: Databases and Database Systems Lecture # 1 June 19,2012 National University of Computer and Emerging Sciences.
Database Systems 主講人 : 陳建源 日期 :99/9/14 研究室 : 法 Chapter 2 Database System Concepts and Architecture.
ISC321 Database Systems I Chapter 2: Overview of Database Languages and Architectures Fall 2015 Dr. Abdullah Almutairi.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 2- 1.
Chapter 2 Database System Concepts and Architecture ICS (081)1.
Chapter 2 Database System Concepts and Architecture Dr. Abdalla AlAmeen.
CS4222 Principles of Database System
Outline Types of Databases and Database Applications Basic Definitions
9/22/2018.
11/9/2018.
Chapter 2 Database Environment Pearson Education © 2009.
12/8/2018.
5/8/2019.
5/8/2019.
Chapter 2 Database Environment Pearson Education © 2009.
Presentation transcript:

COSC 2307: Database Programming Lecture 1: Introduction Kalpdrum Passi Fall 2004 ( )

Today u Course overview u What is a database? u Main Characteristics of Database Technology u Data Models u Schemas and Instances u DBMS Languages u Database System Utilities

Course overview u Website: u Instructor: » Kalpdrum Passi u Key dates: – Lectures: MWF 11:30AM-12:30AM in C-112 – Midterm1: Friday, October 1, 2004 – Midterm2: Monday, November 1, 2004

Course Overview (Continued) u Material: – Lecture notes – On website. – Textbook – J. Morrison, M. Morrison, Enhanced Guide to Oracle 9i, 2003, Thompson Learning. u Prerequisites: – Java – (COSC 1046) u Grading Policy – Home Works: 30% – Term Exam (2)30% – Surprise Quiz10% – Final Exam: 30% Give me a sign you learned the material.

Word of warning u I have a firm belief in you learn by doing. – You learn database concepts by implementing it! u Key Course Features – Most of the work comes from home works. – Exams will be based on your understanding of the concepts and home works; if you don’t do the home works you are likely to do poorly in your exams. – Home works will be checked for cheating. Any two home works found to be the same will be given zero and serious action can be taken. – Home works are individual assignments and not to be worked in groups. – You will learn a lot! You will have to work hard!

Basic Definitions u Database: A collection of related data. u Data: Known facts that can be recorded and have an implicit meaning. u Mini-world: Some part of the real world about which data is stored in a database. – For example, consider student names, student grades and transcripts at a university.

Basic Definitions (cont.) Database Management System (DBMS): A software package/ system to facilitate the creation and maintenance of a computerized database. It – defines (data types, structures, constraints) – construct DBMS (storing data on some storage medium controlled by DBMS) – manipulate (querying, update, report generation) databases for various applications. Database System: The DBMS software together with the data itself. Sometimes, the applications are also included.

Example of a Database u Mini-world for the example: Part of a UNIVERSITY environment. u Some mini-world entities (Data elements): – STUDENTs – COURSEs – SECTIONs (of COURSEs) – (academic) DEPARTMENTs – INSTRUCTORs u Some mini-world relationships: – SECTIONs are of specific COURSEs – STUDENTs take SECTIONs – COURSEs have prerequisite COURSEs – INSTRUCTORs teach SECTIONs – COURSEs are offered by DEPARTMENTs – STUDENTs major in DEPARTMENTs

A simplified database system environment

An Example database that stores student records

File Processing and DBMS File Systems : – Store data over long periods of time – Store large amount of data However : – No guarantee that data is not lost if not backed up – No support to query languages – No efficient access to data items unless the location is known – Data definition is typically part of application programs – hence these programs are constrained to work with only one specific database. – Change to data definition will affect the application programs – Single view of the data – Separate files for each application – Limited control to multiple accesses – Data viewed as physically stored

Main Characteristics of Database Technology u Self-describing nature of a database system: A DBMS catalog stores the description (structure, type & storage format of each data item and constraints on data) of the database. – The description is called meta-data. – This allows the DBMS software to work equally well with different database applications as long as the database definition is stored in the catalog. u Insulation between programs and data: Called program-data independence. – Allows changing data storage structures and operations without having to change the DBMS access programs. u Data Abstraction: A data model is used to hide storage details and present the users with a conceptual view of the database; does not include how data is stored and how the operations are implemented.

Main Characteristics of Database Technology (cont.) u A database user is not concerned with the location of a data item, rather with the reference to the data item Internal storage format for a student record

Main Characteristics of Database Technology (cont.) u Support of multiple views of the data: Each user may see a different view of the database, which describes only the data of interest to that user. u Sharing of Data and Multiuser Transaction Processing: A multiuser DBMS allows multiple users to access the database at the same time and ensures that concurrent transactions operate correctly. – These types of applications are called On-Line Transaction Processing (OLTP).

Main Characteristics of Database Technology (cont.) Two views derived from the example database shown in Figure 1.2 (a) The student transcript view. (b) The course prerequisite view

Main Characteristics of Database Technology (cont.) u Actors on the Scene u DBA – Database Administrator – Responsible for authorizing access to the database, coordinating, monitoring its use, acquiring hardware, software needed. u Database designers – Responsible for identifying the data to be stored, storage structure to represent and store data. This is done by a team of professionals in consultation with users, and applications needed. u End Users

Data Models Data Model: A set of concepts to describe the structure (data types, relationships) of a database, and certain constraints that the database should obey. Data Model Operations: Operations for specifying database retrievals and updates by referring to the concepts of the data model.

Data Models (Categories) u Conceptual (high-level, semantic) data models: Provide concepts that are close to the way many users perceive data. (Also called entity-based or object-based data models.) u Physical (low-level, internal) data models: Provide concepts that describe details of how data is stored in the computer. u Implementation (record-oriented) data models: Provide concepts that fall between the above two, balancing user views with some computer storage details.

Data Models (History) u Relational Model: proposed in 1970 by E.F. Codd (IBM), first commercial system in Now in several commercial products (ORACLE, SYBASE, INFORMIX, INGRES). u Network Model: the first one to be implemented by Honeywell in (IDS System). – Adopted heavily due to the support by CODASYL (CODASYL - DBTG report of 1971) – Later implemented in a large variety of systems - IDMS (Cullinet - now CA), DMS 1100 (Unisys), IMAGE (H.P.), VAX -DBMS (Digital). u Hierarchical Data Model : implemented in a joint effort by IBM and North American Rockwell around Resulted in the IMS family of systems. The most popular model. – Other system based on this model: System 2k (SAS inc.)

Data Models (History) u Object-oriented Data Model(s) : several models have been proposed for implementing in a database system. – One set comprises models of persistent O-O Programming Languages such as C++ (e.g., in OBJECTSTORE or VERSANT), and Smalltalk (e.g., in GEMSTONE). – Additionally, systems like O2, ORION (at MCC - then ITASCA), IRIS (at H.P.- used in Open OODB). u Object-Relational Models : Most Recent Trend. Exemplified in ILLUSTRA and UNiSQL systems

Schemas versus Instances u Database Schema: The description of a database. Includes descriptions of the database structure and the constraints that should hold on the database. u Schema Diagram: A diagrammatic display of (some aspects of) a database Schema (next slide) u Database Instance: The actual data stored in a database at a particular moment in time. Also called database state (or occurrence). u The database schema changes very infrequently. The database state changes every time the database is updated. Schema is also called intension, whereas state is called extension. u Schema Evolution: changes applied to a schema.

Schemas versus Instances (cont.) Schema Diagram for Student Database

DBMS Languages u Data Definition Language (DDL): Used by the DBA and database designers to specify the conceptual schema of a database. u In many DBMSs, the DDL is also used to define internal and external schemas (views). In some DBMSs, separate storage definition language (SDL) and view definition language (VDL) are used to define internal and external schemas. u Data Manipulation Language (DML): Used to manipulate the database - includes retrieval, insertion, deletion and updates. u In current DBMS, a comprehensive integrated language is used that includes constructs for conceptual schema definition, view definition and data manipulation – e.g. SQL represents a combination of DDL, VDL, and DML, statements for constraint specification and schema evolution

DBMS Languages (cont.) u DML commands (data sublanguage) can be embedded in a general-purpose programming language (host language), such as Java, COBOL, PL/1 or PASCAL. u Alternatively, stand-alone DML commands can be applied directly (query language).

DBMS Languages (cont.) u Two types of DML: u High Level or non-Procedural DML – Describes what data to be retrieved rather than how to retrieve. – Process many records in a single DML statement (set-at-a-time or set-oriented) – SQL – Declarative languages u Low Level or Procedural DML – It needs constructs for both, what to retrieve and how to retrieve – Embedded in a general-purpose programming language. – Retrieves individual records or objects from the database and processes each separately. – Uses looping construct in programming languages to retrieve and process each record (record-at-a-time).

Database System Utilities u To perform certain functions such as: – Loading data stored in files into a database. – Backing up the database periodically on tape. – Reorganizing database file structures. – Report generation utilities. – Performance monitoring utilities. – Other functions, such as sorting, user monitoring, data compression, etc. u Data dictionary / repository: – Used to store schema descriptions and other information such as design decisions, application program descriptions, user information, usage standards, etc. – Active data dictionary is accessed by DBMS software and users/DBA. – Passive data dictionary is accessed by users/DBA only.