What is Database?
A Database is a repository for collection of related data or facts stored so that it is available to many users for different purposes. The content of database is obtained by combining data from all the different sources in an organization, so that data are available to all users and redundant data can be eliminated or at least minimized. A database contains a collection of related items or facts arranged in a specific structure called Data and Information.
Databases are used in every part of day-to-day life. Examples of common database use include: depositing or withdrawing money from a bank, making a travel reservation, accessing a library catalog, buying something from the internet via a web page, etc.
These are examples of traditional database applications, where data is stored either in textual or numeric format. Less traditional database applications that are starting to become more popular include multimedia databases, which store pictures, video clips, and sounds, Geographic Information Systems (GIS) that store maps, satellite images and weather data.
The most obvious example of a non computerized database is a telephone directory. Telephone companies now use an electronic database program to produce their printed phone books. Sometimes, we see a specialized phone book that is sorted not only by last name, but by other items such as phone number or street address. These books are easy to produce because the telephone company’s electronic database can sort and organize the data in many different ways. Database programs can also sort lists of data, arranging them in alphabetical, numeric, or chronological order.
Implicit Properties of Database
A computer database gives us some electronic filing system, which has a large number of ways in which to reorganize and retrieve data. The motivations for using databases rather than files include greater availability to a diverse set of users, integration of data for easier access to an updating of complex transactions, and less redundancy of data.
A database has the following implicit properties:
- A database represents some aspect of the real world, sometimes called the mini-world or universe of discourse (UoD). Changes to mini-world are reflected in the database.
- A database is a logically coherent collection of data with some inherent meanings.
- A database is designed, built and populated with data for a specific purpose.
- A database is a complex object formed by the inter-relation of different components such as file system holding small to large data units.
A database can also be defined as the complex form of file system, complex because it stores interrelated data items, which is smallest named unit of data that has meaning in the real world – for example, first name, last name, street, address, phone number, Citizenship number, or political party. A group of related data items treated as a single unit by an application is called record. Examples of types of records are order, salesperson, customer, product, and department. A file is collection of records of a single type and as we already said data base is collection of such different files.
A database can handle business inventory, accounting and filing and use the information in its files to prepare summaries, estimates and other reports. There can be a database which stores the content of books, news papers, magazines and comics. The management of such databases is done with the help of general purpose software packages called Database Management Systems (DBMS).
Why do you need Database?
Databases are needed to offer quick access to data, which makes the Internet a practical resource. Databases are also needed to track economic and scientific information.
Most medium and large businesses rely on databases to store customer information. Because this information is accessible wherever Internet access is available, customers don’t have to go to a local banking branch, for example, to access their account information.
Databases are also used for scientific research. Instead of having to track down hundreds or thousands of weather stations, researchers can rely on databases that store weather information from around the globe. This greatly reduces the workload needed to calculate statistical information.
What is Data and Information?
The word data is used to refer to a fact or facts about the person, place, object, event, or concept and when data is processed it reveals information. Data and information is not the same thing. Data arranged in certain order and form which is useful to us is called information. Data is the raw material to generate information i.e. data is to be processed to produce information. Thus, information is the output of data processing operation. So, we can say that information is a data, placed into a meaningful context for the recipient.
For example, the weight of students is
60, 70, 57, 41, 36, 44, 53 …
the above numbers have no meaning. But, let us process the data to answer the following questions.
- What is average weight?
- What is the weight of the heaviest individual?
- What is the weight of the lightest individual?
Database contains data not information. By itself, the database is meaningless and worthless. With the use of data, information can be produced. Thus, through the proper design and use of database, it can be an essential tool to produce information for making management decisions.
Using above data, information can be retrieved
- The average weight is 51.57.
- The weight of the heaviest individual is 70.
- The weight of the lightest individual is 36.
Above answers 51.57, 70, 36 are meaningful information for recipient.
Any firm that gathers extensive amounts of information to be retrieved at some point in the future depends on a file system (generally a database system) that allows for the access of specific information in a timely and cost effective manor. This information is usually stored in files, records and fields.
A file is a set of related information stored together. It is a collection of information relative to a number of related entities. For example, a bank needs to collect various types of information about customers, employees, savings accounts, demand accounts, etc. Each one of these is a ‘subpackage’ of information, stored as a file. They may have 4 files, and Employee File, a Customer File, a Savings Account file and a Demand Account file.
A record is a collection of information about an entity. If we look at the example from above, the Customer File, a record is a collection of information about a customer entity. The record contains information required by the bank about each customer, and stored for each customer. For example, information contained in a customer record may include at least first_name, last_name, id_number, birth_date. Each of these pieces of information are taken together to form a customer record. Because each record in the file contain the same number and types of fields, the records have the same type.
A field is a piece of information about an entity, contained in a record. In the above example, the 4 pieces of information, first_name, last_name, id_number and birth_date are all fields.
Therefore we can use the following definitions, a record is a collection of related fields, and a file is a collection of related records, of the same type.
Insertion, Deletion, Update
The information being stored in files needs to be maintained. This maintenance requires three operations, Insertion, Deletion and Update.
In order to satisfy many requests (such as “Find the Balance of account 123-456”), one must first retrieve the corresponding record from the file, and examine the contents of the balance field. In order to retrieve the record, it must first be accessed. To access the correct customer record, the first step is to locate the target file which contains the information to be retrieved. In this case it may be the Accounts File. Then from the Accounts file, the target record must be located among all the records in the file, using some access mechanism. The target record will be one in which the account number field value is equal to 123-456.
In most cases there is a field in a record that identifies that particular record uniquely known as primary key of the record. In some cases, there may not be a single field that uniquely identifies a record and serve as the primary key. In these cases, a combination of two or more fields can serve as the primary key, a composite key.
Let’s assume there is a field for Customer Name. We know multiple customers can have same name. A primary key cannot have duplicate values. Therefore Customer Name can’t be used as a primary key but can be referred to as a secondary key. A secondary key is a field which identifies a record, but that does not uniquely identify a record.
In some cases there may be more than one field that uniquely identifies a record. For example, if there was a field for customer ID number, it should be unique for all records. In this case, the fields that could also serve as the primary key are called candidate keys. The database designer must choose one candidate key to serve as the primary key.