Top Banner
Z Week6: Basic Concept of Database Subject Code: COMP131 By: Marlon Jamera Email: [email protected]
41
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Basic Concept of Database

Z

Week6:Basic Concept of

DatabaseSubject Code: COMP131

By: Marlon JameraEmail: [email protected]

Page 2: Basic Concept of Database

Z

Basic Concept of Database

Page 3: Basic Concept of Database

Z

Scope of the Lesson

• Basic Concepts of Database

• Concept of Database

• Data Models, Schema and Instances

• Components of Database System

• Database System Architecture

Page 4: Basic Concept of Database

Z

Learning OutcomesBy the end of the lesson, you will be

familiar with the current trends in the database and its concepts.

• Define and explain perception of the basic database management.

• Identify and compare the dynamics of the different types of data models, schema and instances.

• Describe the features and the aim of components of database systems.

Page 5: Basic Concept of Database

Z

Introduction

• DBMS stands for Database Management System.

• DBMS is a software system for creating, organizing and managing the database.

• It provides an environment to the user to perform operations on the database for creation, insertion, deletion, updating and retrieval of data.

Page 6: Basic Concept of Database

Z

What is a Data?

• Data: A collection of raw facts and figures.

• Raw material that can be processed by any computing machine.

• A collection of facts from which conclusions may be drawn.

• Data can be represented in the form of: numbers and words which can be stored in computer’s language.

Page 7: Basic Concept of Database

Z

What is Information?

• Information: Systematic and meaningful form of data.

• Knowledge acquired through study or experience.• Information helps human beings in their decision making.

Page 8: Basic Concept of Database

Z

Database

• Database: A repository of logically related and similar data.

• An organized collection of related information so that it can easily be accessed, managed and updated.

• E.g. Dictionary Airline DatabaseStudent Database

LibraryRailways TimetableYouTube

Page 9: Basic Concept of Database

Z

Data Models, Schema and Instances

• Data Models: Describes structure of the database.

• Aim is to support the development of information systems by providing the definition and format of data.

•If the same data structures are used to store and access data then different applications can share data.

Page 10: Basic Concept of Database

Z

Data Models, Schema and Instances

• Data Models:

• Classifications:

1. High – Level Model

2. Representation Model

3. Low – Level Model

Page 11: Basic Concept of Database

Z

Data Models, Schema and Instances

• High – Level Model: Ensures the data requirement of the users.

• Not concerned with representation, but it’s a conceptual form.

Page 12: Basic Concept of Database

Z

Data Models, Schema and Instances

•Three Important Terms:

• Entity: Any object, exists physically or conceptually.

• Attribute: Property or characteristic of entity.

• Relationship: Association or link b/w two entities.

* These 3 terms make Entity-Relationship Model.

Page 13: Basic Concept of Database

Z

Data Models, Schema and Instances

• Entity-Relationship Model

College Principal

College

Student C

Student A

Student BCollege 3

College 2

College 1

Course C

Course B

Course A

Student CourseAdmission

Stud_Name Stud_Roll No Course_Id Course_Name

Relationships

ER Diagram

Page 14: Basic Concept of Database

Z

Data Models, Schema and Instances

• Representation Model: Representation of data stored inside a database.

• Describes the physical structure of the database.

• It uses the concepts which are close to the end-users.

Page 15: Basic Concept of Database

Z

Data Models, Schema and Instances

• Representation Model:

• Classifications:

1. Hierarchical Database Model

2. Relational Database Model

3. Network Database Model

Page 16: Basic Concept of Database

Z

Data Models, Schema and Instances

• Hierarchical Database Model: Developed by IBM, is the Oldest database model.

• Represented using a tree-diagram.

• Each box is called a ‘Node’

•The nodes represent a record type.

• A line connecting nodes represents the link.

Page 17: Basic Concept of Database

Z

Data Models, Schema and Instances

• Hierarchical Database Model: Parent-child type is suited for One-to-many relationship between two entities.

• But difficult to implement many-to-many relationship.

• E.g. IMS system from IBM.

Page 18: Basic Concept of Database

Z

Data Models, Schema and Instances

Hierarchical

Database

Model

Director

Marketing ManagerHR Manager

Area Manager1

Area Manager 2

Area Manager 3

Sales Executive Sales Executive

Sales Representative

Sales Manager

Page 19: Basic Concept of Database

Z

Data Models, Schema and Instances

• Relational Database Model: Simplest and the most common model.

• Developed in 1970 by E.F. Codd, it became commercial in the 80s.

• Data elements are stored in different tables made up of rows and columns.

Roll No Name Surname Section

1001 Juan Dela Cruz D

1002 Maria Santina D

Page 20: Basic Concept of Database

Z

Data Models, Schema and Instances

• Network Database Model: Represented using a Data-Structure Diagram.

• Boxes represents the records & lines are the links.

• Members of an owner may be many but for many members owner is one.

• Can represent one-to-one and many-to-many as well.

Page 21: Basic Concept of Database

Z

Data Models, Schema and Instances

• Network Database Model:

Teacher 1 Teacher 2 Teacher 3

Course A Course B Course C

Student 1 Student 2 Student 3

Page 22: Basic Concept of Database

Z

Data Models, Schema and Instances

• Schema: Logical structure of the database.

• Doesn’t show the data in database.

• Classifications:

1. Physical

2. Conceptual

3. External

Page 23: Basic Concept of Database

Z

Data Models, Schema and Instances

• Physical Schema: Describes the physical storage of database. Not in terms of blocks or devices, but describes organization of files, access path etc.

• Conceptual Schema: Describes structure of whole database and describes entities like relationship and constraints.

• External Schema: Provides a user’s view of data and shows relevant info particular to users.

Page 24: Basic Concept of Database

Z

Components of Database System

• User: People who interact with the database.

• Application Programmers

• End users

• Data Administrator

• Software: Lies between the stored data and the users.

• DBMS

• Application Software

• User Interface

Page 25: Basic Concept of Database

Z

Components of Database System

• Hardware: Physical device on which database resides.

• Computers

• Hard Drives

• Cables, etc.

• Data: Numbers, characters, picures.

• 1001, Juan Dela Cruz, Student.

Page 26: Basic Concept of Database

Z

Database Management System

• DBMS: A set of programs to access the interrelated data.

• DBMS contains information about a particular enterprise.

• Computerized record keeping system.

• Provides convenient environment to user to perform operations:

• Creation, Insertion, Deletion, Updating and Retrieving of Information

Page 27: Basic Concept of Database

Z

Database Administrator• DBA: Individual or a group, having centralized control of the database.

• Has a good understanding of database and coordinates all activities of the database

• Functions:

• Define Schema

• Granting user authority to access the database.

• Monitoring performance and responsible to change.

Page 28: Basic Concept of Database

Z

Database Languages• Once data is filled, manipulation is required (Insertion, Deletion, Modification of Data)• For these, a set of languages are provided by DBMS: • Data Definition Language• Data Manipulation Language• Data Control Language

Page 29: Basic Concept of Database

Z

Database Languages

• Data Definition Language (DDL): Used by DB designers to define schema. DDL compiler converts DDL statements and generate a set of tables which are stored in.

• Data Manipulation Language (DML): For accessing and manipulating the data.

• Data Control Language (DCL): Similar to a computer programming language used to control access to data stored in a database.

Page 30: Basic Concept of Database

Z

Database System Architecture

• The journey from big mainframe to pc has also evolved the database and its architecture.

• Classifications:

1. Centralized DBMS Architecture

2. Client – Server Architecture

3. Distributed Databases

Page 31: Basic Concept of Database

Z

Database System Architecture

• Centralized DBMS Architecture: Traditional form, all data, functionality, apps are located on one machine.

• Access via communication links.

Enterprise database

Page 32: Basic Concept of Database

Z

Database System Architecture

• Client – Server Architecture: Involves a client and a server.

• Clients are PC’s or Workstations.

• Servers are powerful computers, can manage files, printers, e-mails.

• Client interacts server when additional functionality doesn’t exits in its own machine.

Page 33: Basic Concept of Database

Z

Database System Architecture

• Client – Server Architecture:

User interface

Application program

Database tables

Client

Application server

Database server

Page 34: Basic Concept of Database

Z

Database System Architecture

• Distributed Database Architecture: Decentralized functionality, distributed among many computers.• Storage computers are at different geographical locations.

Enterprise main

database

Fragment

Fragment

Fragment

Fragment

Fragment

Page 35: Basic Concept of Database

Z

Advantages of DBMS

• Controlling Data Redundancy: Data is recorded only in one place in the database and its not duplicated.

• Data Consistency: Data item appears only once, and the updated value is immediately available to all users.

• Control Over Concurrency: In a computer file – based system in updating, one may overwrite the values recorded by the other.

Page 36: Basic Concept of Database

Z

Advantages of DBMS

• Backup and Recovery Procedures: Automatically create the backup of data and restore the data if required.

• Data Independence: Separation of data structure of database from application program that uses the data is called data independency.

Page 37: Basic Concept of Database

Z

Disadvantage of DBMS

• Cost of Hardware and Software: Processor with high speed of data processing and memory of large size is required.

• Cost of Data Conversion: Very difficult and costly method to convert data of data file into database.

• Cost of Staff Training: A lot of amount for the training of staff to run the DBMS.

Page 38: Basic Concept of Database

Z

Disadvantage of DBMS

• Appointing Technical Staff: Trained technical person such as database administrator, application programmers, data entry operators, etc are required to handle DBMS.

• Database Damage: All data is integrated into a single database. If database is damaged due to electric failure or database is corrupted on the storage media, then your valuable data may be lost forever.

Page 39: Basic Concept of Database

Z

Applications of DBMS

• Airlines and Railways: Online databases for reservation and displaying the schedule info.

• Banking: Customer inquiry, accounts, loans and other transactions.

• Education: Course registration, student info and other information.

Page 40: Basic Concept of Database

Z

Applications of DBMS

• E-commerce: Business activity such as online shopping, booking of holiday package and consulting a doctor.

• Human Resources: Organization uses databases for storing information about their employees, salaries, benefits, taxes and for generating salary checks.

Page 41: Basic Concept of Database

Z

Let’s call it a day,Thank you!