Sunday 12 April 2015

Database Management

A database is a collection of related data.

There are implicit properties of a database which are:

1.   A database represents some aspect of the real world sometimes called the mini world or the universe of discourse.

2.   A database is a logically coherent of data with some inherent meaning.
3.   A database is designed built and populated with data for a specific purpose.

Note that a database can be of any size or complexity and may be generated manually or computerized.

Database Management Systems (DBMS)

This is a collection of programs that enables users to create and maintain a database. DBMS is a general purpose software system that facilitates the process of defining, constructing and manipulating database for various applications. Defining a database involves specifying the data types, structures and constraints for the data to be stored in the database. Constructing a database is the process of storing the data itself on some storage medium that is controlled by the DBMS. Manipulating a database includes performing operations or functions such as querying the database to retrieve specific data, updating the database to reflect changes in the mini world and generating reports from the data.

A file is a collection of records that may or may not be ordered at a conceptual level.

Actors on the Scene are those people or personnel whose jobs involves the day - to - day use of a large database.
Workers behind the Scene are those people or personnel whose tasks are to maintain the database system environment only and are not actively interested in the database itself.




Categories of Actors on the Scene are:

1.   Database Administrator: In a database environment, the primary resource is the database itself and the secondary resource is the DBMS and related software. The database administrator is responsible for authorizing access to the database, for coordinating and monitoring its use and acquiring software and hardware.

2.   Database Designers: These people are responsible for identifying of the data to be stored in the database and for choosing appropriate structures to represent and store the data. Database designers typically interact with each potential group users and develop a view of the database that meets the data and processing requirements of the group. The final database design must be capable of supporting the requirements of all user groups.

3.   End Users: These are people whose jobs require access to the database for querying, updating and generating reports.
There are several categories of End Users which are:
    A.   Casual End Users: They are those who occasionally access the database but may need different information each time. They use a sophisticated query language to specify their requests and are typically middle or high level managers.
    B.   Naive or Parametric End Users: These are people whom their main job function revolves around constantly querying and updating the database using standard types of queries and updates called canned transactions that have been carefully programmed and tested. Example: Reservation checks in Airlines, hostels, bank teller checks etc.
    C.   Sophisticated End Users: These are people who familiarize themselves with the facilities of the DBMS so as to implement their applications to meet their complex requirements. Examples of sophisticated end users are: business analysts, engineers and scientists.
    D.   Stand Alone End Users: They maintain personal databases by using ready made program package that provide easy to use menu or graphics interface. For Example: The user of a payment receipt package used in various stores or supermarkets.

System analysts determines the requirements of end users and develop specifications of canned transactions that meet their requirements.
Application programmers implement these specifications as programs then test, debug, document and maintain these canned transactions.

Categories of Personnel/Workers behind the Scene are:

1.   DBMS System designers and implementers: These are personnel who design and implement the DBMS modules and interfaces as a software package. The DBMS must interface with other system software such as the operating system and compilers for various programming languages.

2.   Tool Developers: These are workers who design and implement tools that is software packages that facilitates database system design which aids in improving performances.

3.   Operators and Maintenance Personnel: They are the system administrative personnel who are responsible for the actual running and maintenance of the hardware and software environment of the database system.

There are 3 types of Database Organization which are:

1.  Relational Database Organization
2.  Hierarchical Database Organization
3.  Network Database Organization

Database architecture is a client - server system architecture.
The system functionality of the client/server system architecture is distributed between two types of modules which are:

1.   Client Modules
2.   Server Modules

Client Modules: These are application programs and user interfaces that access the database, typically run in the client module. Hence, the client module handles user interaction and provides the user friendly interface such as FORM and GUI (Graphic User Interface).

Server Modules:
This modules typically handles data storage, access, search and other functions.

It is worthy to note that one fundamental characteristics of the database approach is that it provides some level of data abstraction by hiding the details of data storage that are not needed by most database users.

Client/Server Architecture Concepts

Data Models: This is a collection of concepts that can be the necessary means to achieve abstraction. By structure of a database one means the data types, relationships and constraints that should hold on the data.

Categories of Data Models:
Data models can be categorized according to the type of concepts they use to describe the DB structure thus:

1.   High Level or Conceptual Data Models: This provides concepts that are close to the way many users perceive data. Conceptual data models use terms such as Entities, Attributes and Relationships.
An entity represents a real world object or concept such as an employee, student or project that is described in the database.
An attribute represents some property of interest that further describes an entity such as the employee's name or student's grades.
A relationship represents an interaction among entities. For Example: a relationship between an employee and a project.
Other additional data model concepts such as generalization, specialization and categories could be used depending on the designer's approach or interest are referred to as Enhanced Entity Relationship or Object Modelling.

2.   Low Level or Physical Data Models: This provides concept that describes the details of how data is stored in the computer. This is meant for computer specialist and not typical end users. Physical data models describe how these data is stored by representing information such as record formats, record orderings and access paths.
An access path is a structure that makes the search for a particular database record efficient.

3.   Representational or Implementation Data Models: This provides concepts that may be understood by end users but are not too far from the way the data are organized within the computer. Representational data models hide some details of data storage but can be implemented on a computer system in a direct way. This data models include: Relational data model, Network Data Model, Hierarchical Data Model. Representational data models represent data by using record structure and hence sometimes called RECORD BASES data models.

Database Schema
This is the description of a database which is specified during database design and is not expected to change frequently.
A displayed schema is called a SCHEMA DIAGRAM. Each object in the schema such as student or employee is referred to as SCHEMA CONSTRUCT.

Note that data in the database of a particular moment in time is called a database state or snapshot. This is also called the current set of occurrency or instances in the database. The DBMS is partly responsible for ensuring that every state of the database is a valid state that is a state that satisfies the structure and constraints specified in the schema. The DBMS stores the description of the schema constructs and constraint called the META DATA. The schema is sometimes called the INTENSION and a database state an EXTENSION.

The three schema architecture is an architecture for database systems which was proposed to help achieve and visualize the following characteristics of database approach are:

1.   Insulation of programs and data (program-data and program-operation independence)
2.   Support of multiple users views
3.   Use of a catalog to store the database description (schema)

The goal of three schema architecture is to separate the user applications and physical database.

In this architecture, schemas can be defined at the following three levels which are:

1.   The Internal Level: This describes the physical storage structure of the database and of data storage and access paths for the database.
 

2.   The Conceptual Level: This describes the structure of the whole database for a community of users. The conceptual schema hides the details of physical storage structures and concentrates on describing entities, data types, relationships, user operations and constraints. A high level data model or implementation data model can be used at this level.
 

3.   The External or View Level: Each external schema describes the part of the database that a particular user group is interested in and hides the rest of the database from the user group. A high level or implementation data model can be used at this level.

It is worthy to note the following points:

A.   The three schema architecture is a convenient tool for the user to visualise the schema levels in a database system.
B.   Most DBMS do not separate the three levels completely but support the 3 schemas architecture to some extent.
C.   The 3 schemas are only descriptions of data. The only data that actually exists is at the physical level.

Mappings

This is the process of transferring requests between levels.

Data Independence:
This is the capacity to change the schema at one level of the database system without having to change the schema at the next higher level.

There are two types of data independence which are:

1.   Logical Independence: This is the capacity to change the conceptual schema without having to change the external schemas or application programs. The conceptual schema may be changed to expand the database (by adding a record type on the data items) or to reduce the database (by removing a record type or data item).

2.   Physical Independence: This is the capacity to change the internal schema without having to change the conceptual (or external) schema. Example: by creating additional access structure to improve the performance of retrieval or update.

The two types of mapping create an overhead during compilation or execution of a query or location leading to inefficiencies in the DBMS, hence few DBMS have implemented the full 3 schemas architecture.

No comments:

Post a Comment