In the database-oriented approach of organising data, a set of programmes is provided to facilitate the users in organising, creating, deleting, updating, and manipulating their data in a database. All these programmes together form a Database Management System (DBMS).
Data Modals
A model is a representation of reality, 'real world' objects and events, and their associations. It is an abstraction that concentrates on the essential, inherent aspects of an organisation and ignore the accidental properties.
A data model represents the organisation itself. Let should provide the basic concepts and notations that will allow database designers and end users unambiguously and accurately to communicate their understanding of the organisational data.
Data model can be defined as an integrated collection of concepts for describing and manipulating data, relationships between data, and constraints on the data in an organisation.
A Data Model Comprises of Three Components
A structural part, consisting of a set of rules according to which databases can be constructed.
A manipulative part, defining the types of Operation that are allowed on the data (this includes the operations that are used or updating Or retrieving data from the database and for changing the structure of the database).
Possibly a set of integrity rules, which ensures that the data is accurate.
The purpose of a data model is to represent data and to make the data understandable.
There have been many data models proposed in the literature They fall into three broad categories :
(i)Object Based Data Models
(ii)Physical Data Models
(iii)Record Based Data Models
The object based and record based data models are used to describe data at the conceptual and external levels, the physical data model is used to describe data at the internal level.
Database Languages
A DBMS is a software package that carries out many different tasks including the provision of facilities to enable the user to access and modify information in the database.
The database is an intermediate link between the physical database, computer and the operating system and the users. To provide the various facilities to different types of users, a DBMS normally provides one or more specialised programming languages called database languages.
Forms of Database Languages
1. Data Description Language (DDL) As the name suggests, this language is used to define the various types of data in the database and their relationship with each other,
The Basic Functions Performed by DDL are
Create tables, files, databases and data dictionaries.
Specify the storage structure of each table on disk.
Integrity constraints on various tables.
Security and authorization information of each table.
Specify the structure of each table.
Overall design of the database.
2. Data Manipulation Language (DML) A language that enables users to access or manipulate data (retrieve, insert, update, delete) as organised by a certain data model is called the Data Manipulation Language (DML), It can be of two types
Procedural DML It describes what data is needed and how to get it. e.g., relational algebra.
Non Procedural DML It describes what data is needed without specifying how to get it. e.g., relational calculus,
Functions of DBMS
DBMS free the programmers from the need to worry about the organisation and location of the data i.e., it shields the users from complex hardware level details.
DBMS can organise. process and present data elements from the database. This capability enables decision makers to search and query database contents in order to extract answers that are not available in regular reports.
Programming is speeded up because programmer can concentrate on logic of the application.
It includes special user friendly query languages which are easy to understand by non pro-gramming users of the system.
The various common examples of DBMS are Oracle, Access, SQL Server, Sybase, FoxPro, Dbase etc.
The Service Provided by the DBMS Includes
• Authorization services like log on to the DBMS, start the database, stop the database etc.
Transaction supports like recovery, rollback etc
Import and export of data.
Maintaining data dictionary. User's monitoring.
Advantages of DBMS
The DBMS (Database Management System) is preferred ever the conventional file processing system due to the following advantages
Controlling Data Redundancy In the conventional file processing system, every user group maintains its own files for handling its data files. This may lead to e Duplication of same data in different files.
Wastage of storage space, since duplicated data is stored.
Errors may be generated due to updation of the same data in different files.
Time in entering data again and again is wasted.
Computer resources are needlessly used.
It is very difficult to combine information.
Elimination of Inconsistency In the file processing system information is duplicated through-out the system. So changes made in one file may be necessary be carried over to another file. This may lead to in-consistent data. So, we need to remove this duplication of data in multiple file to eliminate inconsistency.
, Better Service to the Users A DBMS is often used to provide better services to the users, In conventional system, availability of information is often poor, since it normally difficult to obtain information that the existing systems were not designed for. Once several conventional systems are combined to form one centralised database the availability of information and its updateness is likely to improve since the data can now be shared and DBMS makes it easy to respond to anticipated information requests.
Flexibility of the System is Improved Since changes are often necessary to the contents of the data stored in any system, these changes are made more easily in a centralized database than in a conventional system.
Integrity can be Improved Since data of the organisation using database approach is centralised and would be used by a number of users at a time. It is essential to enforce integrity-constraints. In the conventional system because tho data is duplicated in multiple files so updating or changes may sometimes lead to entry of incorrect data in some files where it exists.
standards can be Enforced Since all access to the database must be through DBMS, so standards are easier to enforce.
Security can be Improved In conventional systems, applications are developed in an adhoc/temporary manner. Often different system of an organisation would access different components of the operational data, in such an environment enforcing security can be quiet difficult. Setting up of a data-base makes to easier to enforce security restrictions since data is now centralised.
Organization's Requirement can be
Identified All orgnaisations have sections and departments and each of these units often consider the work of their unit as the most important and therefore consider their need as the most important. Once a database has been setup with centralised control, it will be necessary to identify organisation's requirement and to balance the needs of the competating units.
Ovcrail Cost of Developing and Maintaining Systems is Lower It is much easier to respond to unanticipated requests when data is centralised in a database than when it is stored in a conventional file system. Although the initial cost of setting up of a database can be large, one normal expects the overall cost of setting up of a database, developing and maintaining application programmes to be far lower than for simila.r gorvice using conventional systems.
10.Data Model must be Developed Perhaps the most, important advantage of setting up of database system is the requirement that an overall data model for an organisation be build. In conventional systems, it is more likely that files will be designed as per need of particular applications demand.
11. Provides Backup and Recovery Centralising a database provides the schemes such as recovery and backups from the failures including disk, crash, power failures, software errors which may help the database to recover from the inconsistent state to the state that existed prior to the occurrence of the failure, though methods are very complex.
Relational Algebra
Relational algebra is a collection of operations used to manipulate relations (tables). These operations enable the users to specify the retrieval requests which results in a new relation built from one or more relations.
Relational algebra is a procedural language, which specifics, the operations to be performed on the existing relations to derive result relations.
It is a procedural language which means that user has to specify what is required and what is the sequence of steps performed on the database to obtain the required output.
Whenever the operations are performed on the existing relations to produce new relations then the original relations(s) are not effected i.e., they remain the same, and the resultant relation obtained can act as an input to some other operation, so relational algebra operations can be composed together into a relational algebra expression.
Composing relational algebra operation into relational expression is similar to composing arithmetic operations (+, * ) into arithmetic expressions. RI + R2 is a relational expression where RI and R2 are relations.
It is important that the results of use of relational algebric operations on relations (tables) must themselves be a relation (tables).
This is because these operators can be used sequentially in various combinations to ' obtain desired results.
Thus each operation on completion must leave data as a relation (table) for the next operator to use. So, this property which all the above operators must have is referred to as relational closure.
Relational Algebraic Operations
The relational algebraic operations can be divided into two groups
1. Basic Set Oriented Operations or Traditional Set Operations These are derived from Mathematical Set theory. They are applicable because each relation is deflined to be set of Tuples. These include Union, Intersection, Difference, Cartesian Product, All of these operations are binary operations which means that operation applies to pair of Relations.
2. Special Relational Operations include join, selection, projection and division. These operations were designed specifically fot relational databases. These operations don't add only power to the algebra but simply for common queries that are lengthy to expresfs using basic set oriented operations.
These operations were introduced by Dr Codd. But, these could not meet all the requirements, so some additional operations were introduced. These included aggregate functions like SUM, AVERAGE, COUNT, OUTER JOIN etc.
Database Administrator (DBA)
The DBA is a person or a group of persons who is responsible for the management of the database. The DBA is responsible for authorizing access to the database by grant and revoke permissions to the users, for coordinating and monitoring its use, managing backups and repairing damage due to hardware and/or software failures and for acquiring hardware and software resources as needed. In case of small organisation the role of DBA is performed by a single person and in case of large organisations there is a group of DBA's who share responsibilities.
Database Designers
They are responsible for identifying the data to be stored in the database and for choosing appropriate structure to represent and store the data. It is the responsibility of database designers to communicate with all prospective of the database users in order to understand their requirements so that they can create a design that meets their requirements.
End Users
End users are the people who interact with the database through applications or utilities. The various categories of end users are
Casual End Users These users occasionally access the database but may need different information each time. They use sophisticated database query language to specify their requests. e.g., high level managers who access the data weekly or biweekly.
Native End Users These users frequently query and update the database using standard types of queries. The operations that can be performed by this class of users are very limited and effect precise portion of the database.
• Standalone End Users/On-line End Users These end users interact the database directly via on-line ternunal or indirectly Il through menu or graphics based interfaces.
Database System Architectures
The architecture of a database system is greatly influenced by the underlying computer system on which it runs, in particular by such aspects of computer architecture as networking, parallelism, and distribution.
• Networking of computers allows some task to be executed on a server system, and some tasks to be executed on client system. This division of work has led to client-server database system.
Parallel processing with in a computer system allows database-system activities to be speeded up, allowing faster response to transactions, as well as more transactions per second. Queries can be processed in a way that exploits the parallelism offered by the underlying computer system. The need for parallel query processing has led to parallel database system.
Distributing data across sites or departments in an organisation allows those data to reside where they are generated or most needed, but still to be accessible from other sites and from other departments. Keeping multiple copies of the database across different sites and also allows large organisations to continue their database operations even when one site is affected by a natural disaster, such as flood, fire, or earthquake. Distributed database system handle geographically or administratively distributed data spread across multiple database systems.
Distributed Database
It is a database in which storage devices are not all attached to a common CPU. It may be stored in multiple computers located in the same physical location, or may be dispersed over a network of interconnected computers. Collections of data (e.g., in a database) can be distributed across multiple physical locations. A distributed database can reside on network servers on the internet, on corporate intranets or extranets, or on other company networks. The replication and distribution of databases improves database performance at end-user worksites.
Advantages of Distributed
Database
Management of distributed data with different levels of transparency.
Increase reliability and availability.
Easier expansion.
Reflects organisational structure—database fragments are located in the departments they relate to.
Local autonomy a department can control the data about them.
Protection of valuable data if there were ever a catastrophic event such as a fire, all of the data would not be in one place, but distributed in multiple locations.
Improved performance data is located near the site of greatest demand, and the database systems themselves are parallelised, allowing load on the databases to be balanced among servers.
Economics it costs less to create a network of smaller computers with the power of a single large computer.
Modularity systems can be modified, added and removed from the distributed database without affecting other modules (systems).
Reliable transactions due to replication of database.
Hardware, Operating System, Network, Fragmentation, DBMS, Replication and Location Independence.
Continuous operation.
Distributed query processing.
Distributed transaction management.
Disadvantages of Distributed Databases
Complexity extra work must be done by the DBAs to ensure that the distributed nature of the system is transparent. Extra work must also be done to maintain multiple disparate systems, instead of one big one. Extra database design work must also be done to account for the disconnected nature of the database e.g., joins become prohibitively expensive when performed across multiple systems.
Economics increased complexity and a more extensive infrastructure means extra labour costs.
Security remote database fragments must be secured, and they are not centralised so the remote sites must be secured as well. The Infrastructure must also be secured (e.g., by encrypting the network links between remote sites).
Difficult to maintain integrity but in a distributed database, enforcing integrity over a network may require too much of the network's resources to be feasible.
Inexperience distributed databases are difficult to work with, and as a young field there is not much readily available experience on proper practice.
Lack of standards there are no tools or methodologies yet . to help users convert a centralised DBMS into a distributed DBMS.
e Database design more complex besides of the normal difficulties, the design of a distributed database has to consider fragmentation of data, allocation of fragments to specific sites and data replication.
e Additional software is required.
e Operating system should support distributed environment.
Concurrency control it is a major issue. It is solved by locking and timestamping.
Database Models
lierarchical Model
The hierarchical data model organises data in a tree structure. There is a hierarchy of parent and child data segments. This structure implies that a record can have repeating information, generally in the child data segments.
Data in a series of records, which have a set of field values attached to it. It collects all the instances of a specific record together as a record
These record types are the equivalent of tables in the relational model, and with the individual records being the equivalent of rows.
e To create links between these record types, the hierarchical model uses parent child relationships. These are a I:N mapping between
record types. This is done by using trees, like set theory used in the relational model, 'borrowed'
from maths.