ADD

Friday, 4 March 2016

OBJECT - BASED LOGICAL MODELS

   Object - based logical models are used in describing data at logical level and view level.Logical level and view level are used to retrieve the data.Logical level describes what data are stored in the database and what relationships exist among those data,Logical level is used by DBA,who must decide what information is to be kept in the database.View level describes only part of the entire database to be viewed by the user of the database hiding the details of the information stored.
OBJECT - BASED LOGICAL MODELS ARE DESCRIBED IN THE DIFFERENT FOLLOWING MODELS:
  • The Entity - Relationship Model
  • The Object - Based Logical Model
  • The Semantic Data Model
  • The Functional Data Model.

THE ENTITY - RELATIONSHIP MODEL

   An entity is a "thing" or "object" in the real world that is distinguishable from other objects.The Entity - Relationship Model (E - R Model) is based on a collection of basic objects,called entities,and the relationship among these objects.

* Rectangles represent entities
Diamonds represent relationship among entities
* Ellipse represents attributes ( characteristics of entities)
* Lines represents link of attributes to entities to relationships
   Here student and college are two different entities "things" or "Objects" and there is only one relationship between these two entities - i.e.,details.It means student details are in ID.When student details are opend it specify the student - name,student - class,student - city Known as attributes:(Characteristics to be possessed by entities).Likewise,college shoul specify the attributes:college - ID and college - name.
   Therefore,we can conclude that the overall logical structure of a database can be expressed graphically by an E-R diagram.

THE OBJECT - ORIENTED MODEL

   Like the E-R model,the Object-oriented Model is based on a collection of objects.An object contains values stored in instance variables,within the object also contains bodies of code that operates on the object.These bodies of code are called as methods.
   Objects that contain the same types of values and the same methods are grouped together into classes.A class may be viewed as a definition for objects.This combination of data and methods comprising a definition is similar to a programming-language abstract data type.
   The only way in which one object can access the data of another object is by invoking a method of that other object.This action is called sending a message to the object.Thus,the call interface of the methods of an object defines that objects are externally visible.The internal part of the object-the instance variables and method code -are not visible externally.The result is two levels of abstraction.

THE SEMANTIC DATA MODEL

   A semantic Data Model is a more high-level data model that makes it easier for a user to give starting description of data in an enterprise.These models contain a wide variety of relations that helps to describe a real application scenario.A DBMS cannot support all these relations directly;so it is built only with few relations Known as relational model in DBMS.A widely used semantic data model is the Entity-Relationship (ER) data model which allows us to graphically denote entities and relationship between them.

THE FUNCTIONAL DATA MODEL

   The functional Data Model makes it easier to define functions and call them wherever necessary to process data.

DATA MODELS

   Data Model means to model the data i.e., to give a shape to the data - to give a figure to the stored data.A data model makes it easier to understand the meaning of the data by its figure and thus we model data to ensure that we understand:
  • The nature of the data itself,independent of its physical representations.
  • Each users view to the relation of data.
  • The use of data across application areas.
   The Data Model can be used to convey the designers understanding of the information requirement of the organization.Increasingly,organizations are standardizing the way that they model data by selecting a particular approach to data model and using it throughout their database development projects.
   In simple words we can define data model as " A collection of high - level data description that hide many low - level storage details"."A data model can also be defined as a collection of conceptual tools for describing data,data relationships,data semantics and consistency constraints".Thus,A DBMS allows a user to define the stored data in terms of data model.
THE DATA MODELS ARE DIVIDED INTO THE THREE DIFFERENT GROUPS:
   (a) Object - Based Logical Models
   (b) Record - Based Logical Models
   (c) Physical Models.
RECORD - BASED LOGICAL MODEL
Record-Based Logical Models describes data at Logical and View levels. When compared with object-based data models, the record-based logical models specifies the overall logical structure of the database and provides higher-level implementation.
         Record - based models are so named because the data is kept in the form of records (documents) of several types, each record has fixed number of (fields or) attributes and each field is of fixed length.
      The Record-Based Models are of three types

  • Relation Model
  • Network Model 
  • Hierarchical Model
Relational Model 
      The relational model represents both data (entities) and relationships among data in the form of tables. Each table has multiple columns and each column has a unique name. Consider the following relational model :
   The description of data in terms of tables is called as relations, from the above CUSTOMER and Account relations, we can make a condition that customer details are maintained in CUSTOMER relation database and their deposit details are maintained in Account relation database.
Network Model
    Data in the network model are represented by collection of records and relationships among data are connected by links. The links can be viewed as pointers. The records in the database are represented in the form of graphs.
Hierarchical Model
Hierarchical Model is same as the Network Model i.e., Data in the Hierarchical Model also are, represented by collection of records and relationship among data are connected by links. The links can be viewed as pointers. But, the difference from Network Model is that, the records in the database are represented in the form of trees.
   

Thursday, 3 March 2016

FILE SYSTEMS Vs DBMS

INTRODUCTION TO FILE SYSTEMS

        one way to keep the information on a computer is to store it in permanent system i.e., FILES.FILE is a memory block of a secondary - storage device like disk,magnetic -tape etc, to store logically related records permanently.Therefore,in a file management system,each record has a separate file.Various records are stored in various files and different programs are written to work with different files respectively.thus,as time goes by,more file and more programs are added to the system.this approach of data management,where the organization has many programs with related file,is Known as traditional approach.This traditional approach can cause many problems like data redundancy,data inconsistency,difficulty in accessing data etc.
      These problems of traditional file system can be eliminated by using database approach.With database approach,all the data resides in the same storage location,rather than residing in many different files across the organization.unlike traditional file system,in which different programs access different files,the database in arranged so that one set of programs - the database management system - provides access to all the data.therefore,data redundancy,data inconsistency are minimized and data can be shared among all users of the database.In addition security and data integrity are increased.

STRUCTURES OF DBMS 

The structure supporting  parts of a  DBMS with same simplification based on the relational data model. 
  A DBMS is divided into  two modules (parts) :   
  1. Query processor 
  2. Storage manager 
     The query processor components in DBMS accepts SQL commands generated from a variety of user interfaces, produces query evaluation plans, executes these plans with the database, and returns the answers. The query processor components are : 
(i) . DML compiler,  which translates DML statements in a query language low- level instructions that the query evaluation engine understands. In addition, the DML compiler transform a  user's request into an equivalent but more efficient from low-level instructions, thus finding a good strategy for executing the query. 


(ii) . Embedded DML Precompiler, SQL commands can be embedded in host- language application programs, example; JAVA or COBOL programs, which can be converted into DML statements by this embedded DML pre-compiler. The pre-compiler must interact with the DML compiler to generate the appropriate code. 

 (iii) . DDL interpreter, which interpreter DDL statements and records than in a set tables containing metadata.
(iv) . Query Evaluation Engine, which executes low-level instructions generated by the DML compiler. 
(v) . Application Programs Object Code, which is the low- level instructions of the programs written by novice users, which the query evaluation engine understands and executes them.

       The storage manager components in DBMS provides the interface between the physical level stored data in the database and the programs/ queries requesting the stored data from the database. The storage manager components are : 

(i) . Authorization and integrity manager, which tests for the satisfaction of integrity constraints  and checks the authority of uses to access data.
(ii) . Translation manager, which ensures that the database remains in a consistent (corrector) state despite of the system failures, and the concurrent transaction executions proceed without conflicting.
(iii).file manager, which manages the allocation of space storage and the data structures used to represent the stored information on disk.
(iv). Buffer  manager, which is responsible for fetching data from disk storage into main memory, and deciding what data to cache in memory.
(v). Lock manager, which keeps track of requests for locks and grants looks on the data in the database.
(vi). Recovery manager, which is responsible for maintaining a log and restoring the system to a consistent state after a crash. 
           In addition, the  DBMS software deals with the management of space on disk,where the data is stored, The disk storage components are :
(i) . Data files, which store the database itself.
(ii). Data dictionary, which stores metadata  about the structure of the database. The data dictionary, is used very heavily. Therefore, great emphasis should be placed on developing a good design and efficient implementation of the dictionary,
(iii) . Indices, which provide fast access to data items that hold particular values.
(iv) . Statistical data, which stores statistical information about the data in the database. This information is used by the query processor to select efficient ways to execute a query.

Wednesday, 2 March 2016

DISADVANTAGES OF DATABASE MANAGEMENT SYSTEM (DBMS)

CONVERSION COSTS

   The older systems in an organization are based on file processing and / or older database technology.The cost of converting these older systems to modern database technology - is measured in terms of dollars,time and organizational commitment and may often seems prohibitive to an organization.

INSTALLATION AND MANAGEMENT COST

  • A multiuser database management system is a large and complex software that has a high initial cost,requires a staff of trained personnel (people) to install and operate,annual maintenance etc.
  • Installing such a system may also require upgrades to the hardware and data communication system in the organization.
  • Substantial training is required at ongoing basis to keep up with new releases and upgrades.

NEW SPECIALIZED PERSONNEL

  • Organizations that adopt the database approach need to hire or train individuals to design and implement databases,provide database administration services and manage a staff of new people.
  • Further,because of the rapid changes in technology these new people will have to be retrained or upgraded on a regular basis.

NEED FOR EXPLICIT BACKUP AND RECOVERY

     A shared database must be accurate and available at all times.This requires that procedures should be developed and used for providing backup copies of data and for restoring a database when damage occurs.

SECURITY BREACHES

   Centralization also means that the data is accessible from a single source,namely the database.This increases the severity of security breaches(breaking) and disrupting the operation of the organization.

ADVANTAGES OF DATABASE MANAGEMENT SYSTEM (DBMS)

REDUCTION OF REDUNDANCIES

  • Redundancy means duplication (Making the same copy again),Reduction of Redundancy means avoiding duplication of data and reduces the total amount of storage space required.
  • It also reduces the extra processing time to search the required data in a large mass of data.
  • Another advantage of avoiding duplication is the elimination of the inconsistencies (difficult) in searching the exact data file required.

DATA INDEPENDENCE AND EFFICIENT ACCESS

  • Database programs in the database are independent of their storage details.
  • The conceptual schema provides physical storage details and external schema provides logical storage details i.e., the conceptual schema provides independence from external schema.It means,physical storage details are independent from logical storage details.
  • DBMS strongly provides the efficient access - retrieval of the stored information,including support for very large files,index structures in query optimization.

DATA INTEGRITY

  • Data integrity means that the data values entered in the database must be checked to ensure that they fall within a specified range and are of correct format (type).
  • For example,the value for the age of an employee must be in the range of 16 nad 55.
  • dta Intrgrity also checks that if we are referring any field,then that field must exist.For example, a user is not allowed to transfer funds from a existing savings account to a non-existent savings account.

DATA SECURITY

  • Data is of vital importance to an organization and must be confidential.Such confidential data must be secure strongly and may not be accessed by any unauthorized persons.
  • DBA should ensure that proper & different access permissions are given to different types of users.
  • For example: a manager can access the salary details of employee in his department only.

REDUCED APPLICATION DEVELOPMENT TIME

  • Since the DBMS provides several pre-defined functions like concurrency control,crash recovery,high - level query facilities etc., only application - specified code needs to be written by the users.

CONFLICT RESOLUTION

  • The DBA should resolve the conflicts among various users to access the same datafiles.
  • The DBA chooses the best file structure and access method to get optimal performance for using critical applications.

DATA ADMINISTRATION

  • DBMS facilitates maintenance and administration of data by providing a common base for a large collection of data that is shared by several users.
  • In addition,the DBA ensures the fine - tuning of data representation,periodic backups,ensures proper permissions of data access,monitoring all jobs,etc.

CONCURRENT ACCESS

  • Many users access a single program concurrently (at the same time) as if their programs were running in isolation.
  • The DBMS executes the actions of the program in such a way that the concurrent access is permitted but the conflicting operations are not permitted to proceed concurrently.

CRASH RECOVERY

  • The DBMS maintains a continuous log (record) of the changes made to the data,so that,if there is any system crash by power failure,it can restore the database to a previously stored consistent state.
  • That is the actions of incomplete transactions are undone,so that the database stores only the actions of complete transactions after recovert from a crash.

DATABASE ADMINISTRATOR (DBA)

   The person who have central control of both data and the programs that access those data in the database is called the Database Administrator (DBA).

THE FUNCTIONS OF THE DBA:

SCHEMA DEFINITION:

   The DBA creates the original database schema (schema means arrangement of data) by writing a set of definitions that is translated by a special language called a Data - Definition Language (DDL).The result of compilation of DDL statements is a set of tablets of database that is stored permanently in a special file called data dictionary, or data directory which contains metadata - that is,data about data.

STORAGE STRUCTURE AND ACCESS -METHODS:

    The DBA creates storage structure and access methods by writing a set of definitions,which is translated by the Data Definition Language Compiler.

SCHEMA & PHYSICAL ORGANISATION MODIFICATION:

   The DBA carries out changes to the schema and physical organisation to make the changing in physical organisation to improve performance.

GRANTING OF AUTHORIZATION OF DATA ACCESS:

   The DBA grants permission for accessing different parts of the database to various users.

INTEGRITY- CONSTRAINT SPECIFICATION:

   The data values stored in the database must satisfy a consistent constraint (condition) specified only by DBA,Known as integrity constraint.So that,the data values stored in the database must be according to Integrity Constraints (conditions).

ROUTINE MAINTENANCE:

  •    DBA periodically updates the database,to prevent loss of data in case of disasters.
  •    DBA ensures that there is enough free space available for doing normal operations.
  •    DBA monitors all the jobs running on the database and ensure that performance is not              degraded by very expensive tasks submitted by some users.

OVERVIEW OF DATABASE MANAGEMENT SYSTEM

DATABASE APPROACH

      A database system is simply a computerized record - keeping system.The database can be regarded as a container for a collection of computerized data files.Uses of the database can perform
a variety of operations on such files - for example:

  • Adding new,empty files to the database.
  • Inserting data into from existing files.
  • Retrieving data from existing files.
  • Changing data in existing files.
  • Deleting data from existing files.
  • Removing existing files from the database.

COMPONENTS OF THE DATABASE ENVIRONMENT

    The nine major components of a Database Environment and their relationships are shown in the following figure:

REPOSITORY

   Centralized storehouse for all data definitions,data relationship,screen and report formats and other system components.A repository contains the important data for managing database and communication of other components of the entire system.

DBMS (DATABASE MANAGEMENT SYSTEM)

   It is a software used to define,create,maintain and provide controlled access to the database and also to the repository.

 DATABASE

   An organizational collection of logically related data,designed to meet the information needs of multiple users in organization.It is important to distinguish between the database and the repository.The repository contains definitions of data whereas the database contains actual data.

CASE TOOLS

   Computer Aided Software Engineering (CASE) tools used to design database and application programs.

APPLICATION PROGRAMS

   Computer programs that are used to create and maintain the database and provide information to users.

USER INTERFACE

   Languages,menus and other facilities by which users interact with various system components such as CASE tools,application programs,the DBMS,the repository and the database.

DATA ADMINISTRATORS

   Persons who are responsible for the overall information resources of an organization.Data administrators ( or Database Administrations (DBA)) uses CASE tools to improve the productivity of database design and planning.

SYSTEM DEVELOPERS

   Persons such as system analysts and programmers who design new application programs.System developers uses CASE tools for system requirement nalysis and program design.

END USERS

   Persons throughout the organization who add,delete and modify data in the database and who request to receive information from it.
All users interactions with the database must be routed only through the DBMS.


Tuesday, 1 March 2016

INTRODUCTION TO DATABASE MANAGEMENT SYSTEM

DATA

      Data is the raw material from which useful information is derived.The word data is the plural of Datum.Data is commonly used in both singular and plural forms.It is defined as raw facts or observations.It takes variety of forms,including numeric data,text and voices and images.
     Data is a collection of facts,which is unorganized but can made organized into useful information.The team Data and information come across in our daily life and are often interchanged.
    Example:Weights,prices,costs,number of items sold etc.

INFORMATION

    Data that have been processed in such a way so as to increase the Knowledge of the person who uses the data is Know as information.The term data and information are closely related.Data are raw material resources that are processed into finished information products.The information as data that has been processed in such a way,increases the Knowledge of the person who use it.
   In practice,the database today may contain either data or information.

DATA PROCESSING (OR) INFORMATION PROCESSING

   The process of converting the facts into meaningful information is Know as data processing.Data processing is also Know as Information processing.

METADATA

   Data that describe the properties of other data is Know as Metadata.Actually,Metadata keeps the information of other data i.e.,it keeps the information,how and where the other data is stored.Some of  these properties includes data definition,data structures and rules or constraints (conditions).The Metadata describes the properties of data but do not include the data.It allows the database designer and users to understand what data exist,what does data mean and what are the distinctions between seemingly similar data items.
   In short,Matadata is data about data.

DATABASE

   A database  is a collection of data (information)of some given enterprise,that can be processed through one or more application programs by multiple users.An enterprise can be a single individual (with small personal data) OR a complete corporation (with large shared data).
for example: a bank, a university, a company etc.


DATABASE MANAGEMENT SYSTEM

     A Database Management system (DBMS) is defined as " A software that provides an environment that is both convenient and efficient to use in storing and retrieving the data (database) of an enterprise". This software defines the data,stores the data,supports query language (containing accessor programs to access or retrieve the stored data),produces reports and creates the data entry screens.In short,A Database Management system means a system managing the database of a particular enterprise in both the convenient and efficient manner.