Week 1

30
WEEK 1 FUNDAMENTAL OF DATABASE SYSTEMS Objectivities of this class 1. Learn the Differentiate different terms used in Database System 2. Learn the Database System Concepts 3. Learn the Database Architecture This class is lecturing in order of above objectivities.

Transcript of Week 1

Page 1: Week 1

WEEK 1 FUNDAMENTAL OF DATABASE SYSTEMS

Objectivities of this class

1. Learn the Differentiate different terms used in Database System

2. Learn the Database System Concepts

3. Learn the Database Architecture

This class is lecturing in order of above objectivities.

Page 2: Week 1

0. Introduction 1) Basic Terms of DB Systems 2) Database Management System

1. Database System Concepts 1) Data Model 2) Database Model

2. Database Architecture 1) Schemas vs. Instances 2) DB Languages and Interfaces

Contents

Page 3: Week 1

◈ Database:

Integrated collection of stored operational data used by the application systems of a particular enterprise.

★ Examples: Retail sector-department stores, Food outlets, Mass storage-weather records, Health industry - patient records, etc.

Introduction (Basic Concepts of DBSys)

Page 4: Week 1

◈ Data vs. Information ★Data: * Raw facts, concepts, characters, analog quantitie * A formalized manner suitable for communication or processing by humans. * Data items to supply some information about an entity.

★Information: Meaning that a human assigns to data by means of the known conventions used in their representation.

Introduction (Basic Concepts of DBSys)

Page 5: Week 1

◈ Data vs. Information

Data Information

Page 6: Week 1

◈ Field, Columns, Record, Row, File

Field: Group of characters with specific meaning. Columns: Columns corresponding to the attributes of the object. Record: Logically connected fields that describe a person, place, or thing. Row: A row consists of one set of attributes (or one tuple) corresponding

to one instance of the entity that a table schema describes. File: Collection of related records.

Introduction (Basic Concepts of DBSys)

Page 7: Week 1

Definition: A collection of programs that enables users to create and maintain

the database.

▪ Advantages of DBMS: Providing storage structure for efficient query processing. Restricting unauthorized users. Providing concurrency, backup and recovery. Enforcing integrity constraints.

▪ Disadvantages of DBMS: Centralization Reporting features may not be available in rDBMS.

Introduction (DBMS: Database Management System )

Page 8: Week 1

▪ Definition of Data model: * A set of concepts that can be used to describe the structure of a database: - data types, relationships, constraints, semantics and operational behaviour. * It is a tool for data abstraction.

▪ Data model operations : Specifying database retrievals and updates by referring to the concepts of the data model.

1. DB Sys Concepts: Data models

Page 9: Week 1

♦ Categories of data models

▪ Conceptual data model ▪ Logical data model ▪ Physical data model

1. DB Sys Concepts: Data models

Page 10: Week 1

• Identifying the business concepts (entities) • Relationships between these concepts in order to gain, reflect, and document understanding of the organization’s business from a data perspective.

Conceptual Data model

Page 11: Week 1

• Describes the data in as much detail as possible

Logical Data model

Page 12: Week 1

• Specification all tables and columns.• Foreign keys are used to identify relationships between tables.

Physical Data model

Page 13: Week 1

♦ Categories of database models

▪ Flat database model ▪ Hierarchical database model ▪ Network database model ▪ Relational database model

1. DB Sys Concepts: Database models

Page 14: Week 1

• Consists of a single, two-dimensional array of data elements.

Flat Database model

Page 15: Week 1

• Data is organized into a tree-like structure, implying a single upward link in each record to describe the nesting.• A sort field to keep the records in a particular order in each same- level list.

Hierarchical Database model

Page 16: Week 1

• Organizes data using two fundamental constructs, called records and sets.• Records contain fields hierarchically.

Network Database model

Page 17: Week 1

• Allows the definition of data structures, storage and retrieval operations and integrity constraints • Organised in tables which is a collection of records and each record in a table contains the same fields.

Relational Database model

Page 18: Week 1

▪ Schema: - Logical structure of the database

▪ Database Schema - Described in a formal language by the DBMS - Be able to create a blueprint of how a database will be constructed

▪ Schema Diagram - A diagrammatic display of (some aspects of) a database schema

2. Database Architecture: Schemas

Page 19: Week 1

▪ Schema Diagram Example:

2. Database Architecture: Schemas

Page 20: Week 1

♦ Definition:

▪ The set of specifications, rules, processes -- dictate how data is stored in a database -- how data is accessed by components of a system. ▪ Includes data types, relationships, and naming conventions. ▪ Describes the organization of all database objects and how they work together. ▪ Affects integrity, reliability, scalability, and performance. ▪ Involves anything that defines the nature, the structure of the data, or how the data flows.

2. Database Architecture

Page 21: Week 1

♦ Database Independence :

▪ Logical data independence The capacity to change the conceptual schema without having to change external schema or application programs. Ex: employee (e#, name, address, salary)

▪ Physical data independence The capacity to change the internal schema without having to change the conceptual (or external) schema.

Database Independence

Page 22: Week 1

♦ Database Language :

▪ Data Definition Language (DDL) Used to specify the conceptual schema of a database. For defining internal and external schemas(view). * In some DBMSs, separate storage definition language (sdl) and view definition language (vdl) are used to define internal and external schemas.

▪ Data Manipulation Language (DML) Used to specify database retrievals and updates. DML commands can be embedded in a general-purpose programming language (host language), such as COBOL, C .

▪ Data Control Language (DML) High/Low level or Procedural/non-procedural languages.

Database Language

Page 23: Week 1

♦ Definition : The aggregate of means by which people interact with the database.

- Input : users to manipulate a system

- Output : to produce the effects of the users' manipulation.

♦ Examples : ▪ Stand-alone query language interfaces.

▪ Programmer interfaces. * Pre-compiler approach * Procedure (subroutine) call approach

▪ User-friendly interfaces. * Menu-based, popular for browsing on the web * Forms-based, designed for naïve users * Graphics-based (point and click, drag and drop etc.) * Natural language: requests in written English

Database Interface

Page 24: Week 1

Database Basic Concepts:

DB Models:

Schema:

DB Architecture:

DB Language:

DB Interfaces:

Week 1 Database System Concepts and Architecture:

summaryReal-life example

quiz

Page 25: Week 1

Week 1 Database System Concepts and Architecture:

summaryReal-life example

quiz

DVD Rental Database

A business on DVD Rental is a real life example of database application. For instance the enterprise may track information about DVDs, employees, customers and their phone numbers and the movies they offer along with details such as their genre, addresses, ages... Without the use of the database system the rental shop has to maintain scattered DVD records and customer information. A centralized database will help to provide general accessibility to this information as well as ensuring that the data is preserved more securely.

The system may provide not only the features stated above and some other features .

Page 26: Week 1

Week 1 Database System Concepts and Architecture:

summaryReal-life example

quiz

DVD

DVD Id Title Published Year

Customer

Customer Id Last Name First Name Sex Address Phone No

Director

Director Id Last Name First Name Sex Address Phone No

Actor

Actor Id Last Name First Name Sex Address Phone No

• Database schema for DVD Rental

Page 27: Week 1

Week 1 Database System Concepts and Architecture:

summaryReal-life example

quiz

Introduction to Database Systems

1. A representations of raw facts, concepts, or instructions in a formalized manner suitable for communication, interpretation, or processing by humans or by

automatic means is known as:

A. A field B. Data C. Information D. A database E. A record

2. The basic unit of data entry is called:

A. A field B. A character C. A bit D. A kilobit E. A cell

Enter answer,,,.

Page 28: Week 1

Week 1 Database System Concepts and Architecture:

summaryReal-life example

quiz

Introduction to Database Systems

1. A representations of raw facts, concepts, or instructions in a formalized manner suitable for communication, interpretation, or processing by humans or by

automatic means is known as:

A. A field B. Data C. Information D. A database E. A record

2. The basic unit of data entry is called:

A. A field B. A character C. A bit D. A kilobit E. A cell answer is:

1. B 2. A

Page 29: Week 1

Week 1 Database System Concepts and Architecture:

summaryReal-life example

quiz

3. A collection of related records is: A. A character B. A file C. A bit D. A kilobit E. A cell

4.. A set of programs supporting the creation, maintenance and operation of a database is called: A. SQL SERVER B. DBMS C. BROWSER D. WORD PROCESSOR E. MS ACCESS

Enter answer,,,.

Page 30: Week 1

Week 1 Database System Concepts and Architecture:

summaryReal-life example

quiz

3. A collection of related records is: A. A character B. A file C. A bit D. A kilobit E. A cell

4.. A set of programs supporting the creation, maintenance and operation of a database is called: A. SQL SERVER B. DBMS C. BROWSER D. WORD PROCESSOR E. MS ACCESS

answer is: 3. C 4. B