What is database?
A database is a system intended to organize, store, and retrieve large amounts of data easily. It consists of an organized collection of data for one or more uses, typically in digital form. One way of classifying databases involves the type of their contents, for example: bibliographic, document-text, statistical. Digital databases are managed using database management systems, which store database contents, allowing data creation and maintenance, and search and other access.
Database Management System
A DBMS is a complex set of software programs that controls the organization, storage, management, and retrieval of data in a database. DBMS are categorized according to their data structures or types; sometime DBMS is also known as Data base Manager. It is a set of prewritten programs that are used to store, update and retrieve a Database a DBMS includes: A modeling language to define the schema of each database hosted in the DBMS, according to the DBMS data model.
The functions of a current generation DBMS may be summarized as follows:
- Stores the definitions of data and their relationships (metadata) in a data dictionary; any changes made are automatically recorded in the data dictionary.
- Creates the complex structures required for data storage.
- Transforms entered data to conform to the data structures in item 2.
- Creates a security system and enforces security within that system.
- Creates complex structures that allow multiple user access to the data.
- Performs backup and data recovery procedures to ensure data safety.
- Promotes and enforces integrity rules to eliminate data integrity problems.
- Provides access to the data via utility programs and from programming languages interfaces.
- Provides end-user access to data within a computer network environment.
Requirements for DBMS
The various software’s which handle the data in a database i.e. DBMS (like Oracle, FoxPro, and SQL Server etc.) should meet the following requirements: -
- Provide data definition facilities.
- Define Data Definition Language (DDL)
- Provide user accessible catalogue (Data Dictionary)
- Provide facilities for storing, retrieving and updating data - Define Data Manipulation Language (DML)
- Support Multiple View of Data - End User or application should see only the need data and information required.
- Provides facilities for specifying Integrity constraints.
- Primary Key Constraints
- Foreign Key Constraints
- More General Constraints
- Provide facilities for controlling access to data - Prevent unauthorized access and update.
- Allow simultaneous access and update by multiple users - Provide concurrency control mechanism.
- Support Transactions.
- A sequence of operations to be performed as a whole.
- All operations are performed or none.
- Provide facilities for database recovery - Bring database back to consistent state after a failure such as disk failure, faulty program etc.
- Provide facilities for database maintenance - Maintenance operations: unload, reload, mass Insertion and deletion, validation etc.
Structure of DBMS
DBMS (Database Management System) acts as an interface between the user and the database. The user requests the DBMS to perform various operations (insert, delete, update and retrieval) on the database. The components of DBMS perform these requested operations on the database and provide necessary data to the users. The various components of DBMS are shown below: -
1. DDL Compiler
Data Description Language compiler processes schema definitions specified in the DDL. It includes metadata information such as the name of the files, data items, storage details of each file, mapping information and constraints etc.
2. DML Compiler and Query optimizer
The DML commands such as insert, update, delete, retrieve from the application program are sent to the DML compiler for compilation into object code for database access. The object code is then optimized in the best way to execute a query by the query optimizer and then send to the data manager.
3. Data Manager
The Data Manager is the central software component of the DBMS also knows as Database Control System.
- The Main Functions of Data Manager Are: – Convert operations in user's Queries coming from the application programs or combination of DML
- Compiler and Query optimizer which is known as Query Processor from user's logical view to physical file system.
- Controls DBMS information access that is stored on disk.
- It also controls handling buffers in main memory.
- It also enforces constraints to maintain consistency and integrity of the data.
- It also synchronizes the simultaneous operations performed by the concurrent users.
- It also controls the backup and recovery operations.
4. Data Dictionary
Data Dictionary is a repository of description of data in the database. It contains information about
- Data - names of the tables, names of attributes of each table, length of attributes, and number of rows in each table.
- Relationships between database transactions and data items referenced by them which is useful in determining which transactions are affected when certain data definitions are changed.
- Constraints on data i.e. range of values permitted.
- Detailed information on physical database design such as storage structure, access paths, files and record sizes.
- Access Authorization - is the Description of database users their responsibilities and their access rights.
- Usage statistics such as frequency of query and transactions.
Data dictionary is used to actually control the data integrity, database operation and accuracy. It may be used as an important part of the DBMS.
- Importance of Data Dictionary - Data Dictionary is necessary in the databases due to following reasons:
- It improves the control of DBA over the information system and user's understanding of use of the system.
- It helps in document ting the database design process by storing documentation of the result of every design phase and design decision.
- It helps in searching the views on the database definitions of those views.
- It provides great assistance in producing a report of which data elements (i.e. data values) are used in all the programs.
- It promotes data independence i.e. by addition or modifications of structures in the database application program are not affected.
5. Data Files
It contains the data portion of the database.
6. Compiled DML
The DML complier converts the high-level Queries into low level file access commands known as compiled DML.
7. End Users
They are already discussed in previous section.
The advantages of DBMS
- It represents complex relationships among different data items.
- Keeps a tight control on data redundancy.
- Enforces user defined rules to ensure the integrity of data in a table form.
- Maintains data dictionary for the storage of information pertaining to data fields and data manipulation.
- Ensures that data can be shared across all applications.
- Enforces data access authorization.
- Has an automatic intelligent backup and recovery procedure of data.
- Have different interfaces through which users can manipulate data.
Types of DBMS
There are four structural types of database management systems: hierarchical, network, relational, and object-oriented.
1. Hierarchical Databases
Hierarchical Databases (DBMS), commonly used on mainframe computers, have been around for a long time. It is one of the oldest methods of organizing and storing data, and it is still used by some organizations for making travel reservations. A hierarchical database is organized in pyramid fashion, like the branches of a tree extending downwards. Related fields or records are grouped together so that there are higher-level records and lower-level records, just like the parents in a family tree sit above the subordinated children. Based on this analogy, the parent record at the top of the pyramid is called the root record. A child record always has only one parent record to which it is linked, just like in a normal family tree. In contrast, a parent record may have more than one child record linked to it. Hierarchical databases work by moving from the top down. A record search is conducted by starting at the top of the pyramid and working down through the tree from parent to child until the appropriate child record is found. Furthermore, each child can also be a parent with children underneath it. The advantage of hierarchical databases is that they can be accessed and updated rapidly because the tree-like structure and the relationships between records are defined in advance.

However, this feature is a two-edged sword. The disadvantage of this type of database structure is that each child in the tree may have only one parent, and relationships or linkages between children are not permitted, even if they make sense from a logical standpoint. Hierarchical databases are so rigid in their design that adding a new field or record requires that the entire database be redefined.
2. Network Databases
Network databases are similar to hierarchical databases by also having a hierarchical structure. There are a few key differences, however. Instead of looking like an upside-down tree, a network database looks more like a cobweb or interconnected network of records. In network databases, children are called members and parents are called owners. The most important difference is that each child or member can have more than one parent (or owner). Like hierarchical databases, network databases are principally used on mainframe computers. Since more connections can be made between different types of data, network databases are considered more flexible. However, two limitations must be considered when using this kind of database. Similar to hierarchical databases, network databases must be defined in advance. There is also a limit to the number of connections that can be made between records.
3. Relational Databases
In relational databases, the relationship between data files is relational, not hierarchical. Hierarchical and network databases require the user to pass down through a hierarchy in order to access needed data. Relational databases connect data in different files by using common data elements or a key field. Data in relational databases is stored in different tables, each having a key field that uniquely identifies each row. Relational databases are more flexible than either the hierarchical or network database structures. In relational databases, tables or files filled with data are called relations, a tipple designates a row or record, and columns are referred to as attributes or fields. Relational databases work on the principle that each table has a key field that uniquely identifies each row, and that these key fields can be used to connect one table of data to another. Thus, one table might have a row consisting of a customer account number as the key field along with address and telephone number. The customer account number in this table could be linked to another table of data that also includes customer account number (a key field), but in this case, contains information about product returns, including an item number (another key field). This key field can be linked to another table that contains item numbers and other product information such as production location, color, quality control person, and other data. Therefore, using this database, customer information can be linked to specific product information. The relational database has become quite popular for two major reasons. First, relational databases can be used with little or no training. Second, database entries can be modified without redefining the entire structure. The downside of using a relational database is that searching for data can take more time than if other methods are used.

4. Object-oriented Databases (OODBMS)
Able to handle many new data types, including graphics, photographs, audio, and video, object-oriented databases represent a significant advance over their other database cousins. Hierarchical and network databases are all designed to handle structured data; that is, data that fits nicely into fields, rows, and columns. They are useful for handling small snippets of information such as names, addresses, zip codes, product numbers, and any kind of statistic or number you can think of. On the other hand, an object-oriented database can be used to store data from a variety of media sources, such as photographs and text, and produce work, as output, in a multimedia format. Object-oriented databases use small, reusable chunks of software called objects. The objects themselves are stored in the object-oriented database. Each object consists of two elements: 1) a piece of data (e.g., sound, video, text, or graphics), and 2) the instructions, or software programs called methods, for what to do with the data. Part two of this definition requires a little more explanation. The instructions contained within the object are used to do something with the data in the object. For example, test scores would be within the object as would the instructions for calculating average test score. Object-oriented databases have two disadvantages. First, they are more costly to develop. Second, most organizations are reluctant to abandon or convert from those databases that they have already invested money in developing and implementing. However, the benefits to object-oriented databases are compelling. The ability to mix and match reusable objects provides incredible multimedia capability. Healthcare organizations, for example, can store, track, and recall CAT scans, X-rays, electrocardiograms and many other forms of crucial data.
0 Comments