Docsity

Introduction to Databases: Understanding the Database Approach and DBMS, Summaries of Computer Science

Partial preview of the text

Download Introduction to Databases: Understanding the Database Approach and DBMS and more Summaries Computer Science in PDF only on Docsity!

Introduction to Databases

Objectives

• Data

• Managing Data

• Database

• Database Management System (DBMS)

• Database System

• Characteristics of database approach

• Workers Involved in DBMS

• Advantages of Using DBMS

• When Not to Use A DBMS

- Managing Data

• There are two approaches to manage data

– File-based approach

– Database approach

-- File-Based Approach

– File-based approach: An approach that utilizes a

collection of application programs which performs

services to end-users (e.g. Reports). Each program

defines and manages its own data.

-- Database Approach

– Database approach: An approach that data is

collected and manipulated using specific software

called Database Management System, and many

programs share this data.

-- Database Approach

Database

User 1

User 2

DBMS

Application

programs

Application

programs

Example: University database

Database Management System (DBMS)

  • DBMS is a software package that enables user to create and maintain databases.
  • It facilitates:
    • Defining a database that involves specifying the data types, structures, and constraints for the data to be stored in the database.
    • Constructing a database which is the process of storing the data.
    • Manipulating a database such as functions of querying the database, updating the database, and generating reports from the data.

Database Management System (DBMS)

  • Example of DBMS:
    • Oracle, access, DB 2 , Ingress, Teradata
  • Database and DBMS software together constitute a database system.

- Database System

A simplified database

system environment

  1. Self-describing nature of a database system
  • In addition to the database itself, the database system also contains a complete

definition or description of the database structure and constraints. It is stored in a

system catalog.

  • The information such as the structure of each file, the type and storage format of each

data item, and various constraints on the data that is stored in the system catalog is

called meta-data.

  • Characteristics of Database Approach…

…- Characteristics of Database Approach…

  1. Self-describing nature of a database system

An example of a database catalog for the database in slide 10 :

RELATIONS COLUMNS

Relation_name No_of_columns

STUDENT 4 COURSE 4 SECTION 5 GRADE_REPO RT 3 PREREQUISITE 2

Column_name Data_type Belongs_to_relation

Name Character( 30 ) STUDENT
Student_number Character( 4 ) STUDENT
Class Integer( 1 ) STUDENT
Major Major_type STUDENT
Course_name Character( 10 ) COURSE
Course_number XXXXNNNN COURSE
Prerequisite_number XXXXNNNN PREREQUISITE

Note: Major-type is defined as an enumerated type with all known majors. XXXXNNNN is used to define a type with four alphabetic character followed by four numeric digits.

  1. Insulation between programs and data, and data abstraction. Internal storage format for a STUDENT record, based on the database catalog on slide 17.

…- Characteristics of Database Approach…

Data Item Name Starting Position in Record Length in Characters (bytes) Name 1 30 Student_number 31 4 Class 35 1 Major 36 4

  1. Support of multiple views of the data
  • A database has many users. Each user may require a different perspective or view of the database.
  • A view may be a subset of a database or it may contain a virtual data that is derived from the database files but is not explicitly stored.
  • A multi-user DBMS whose users have a variety of applications must provide facilities for defining multiple views.

…- Characteristics of Database Approach…