This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.
Data is information that has been translated into a form that is more convenient to move or process. Data refers to a collection of numbers, character strings, or symbols. A database is a system to keep records so that the information can be easily extracted and observed. Therefore, database is a tool that can be used to store data, modify it with ease regardless of the amount of the information. A database might be as complex or simple depending upon the situation.
Databases are organized into records containing fields. Each field contains specific information. A telephone book is an example of a database.
Analytic databases are read only form of databases. The data stored in this type of database can be used only for analysis. For example, an educational institute might store student records over the last ten years in an analytic database and use that database to analyze the status of the institute each year.
2.2.2 Operational Databases
Operational databases can not only stores data but also has the ability to modify it. This type of database allows you to store data as well add, delete or change records. Most of the real time applications are usually done through operational databases. E.g. a company can use this type of databases to store the records of their client and modify it as there demands are fulfilled.
A database model is an abstraction that tells the specifications about how the data can be stored in a database. And, once data is stored what is the process of retrieving that information. There are many database models. The advancement in each model increases the efficiency of the database.
Common models include:
- Flat File model
- Hierarchical model
- Network model
- Relational model
- Object-Relational model
- Object model
Out of these models the basic discussion of the first three models is as follows:
2.2.1The Flat File Model
Flat file is a database consisting of only one record type. In a flat model database can be think of a matrix having columns and rows. The columns are named as the name of the items and represents attributes and rows are entries representing the real world quantities. This type of database is ideal for storing small amounts of data that needs to be human readable or can be easily edited. Although it can store complex data but that will be costly in respect to time and processing power. Another problem with this model is that it is more prone to corruption because whenever a file is used or modifies it does not contain any information about it.
2.2.2 Hierarchical Databases
In Hierarchical Database Model data is arranged in a hierarchy. The format of this type of model is to organize data in a structure of a tree. A single table in this tree serves the purpose of root and other tables branches out from this root. This model forms the hierarchy of parent and child data segments. So the relationship between parent and child is one to many i.e. a child may only have one parent but a parent can have multiple children.
Data structure Books
Figure 2-2: Hierarchical Model
This database models guarantee systematic accessibility of the data. But model creates the problem of repetition of data within the database. This is because hierarchical databases handle one-to-many relationships well but do not handle many-to-many relationships. So whenever we need to relate a child to more than one parent this model creates problems.
The other disadvantage is hierarchical model is that children inherit the relationships and characteristics of their fathers. An operation on the father affects the children. E.g. if an operation is performed on one folder, the operation affects all the folders and files that it contains.
2.2.3 Network Model
The Network model is designed to solve the problem of data redundancy by representing relationships in terms of sets rather than hierarchy. It supports many to many relationships i.e. a child can have more than one parents and parents can have multiple children.
Although network model solves the problem of data redundancy but still it has many flaws. The main reason for its inefficiency is its maintenance. Further it is difficult to implement and can be used by only computer programmers not by the real users.
2.2.4 The Relational Model
The relational model was developed by Dr. E. F. CODD at IBM in the 1960's. The main purpose of developing this model is to solve all the problems in the existing databases models. The relational model is based on the mathematical concepts.
The foundation of relational model is the concept of a table (or relation) in which all data is stored. Each table is made up of records and fields where horizontal rows also known as tuples and vertical columns also known as attribute. Each table can be identified by a unique name and that name can be used by the database to find the table behind the scenes.
In earlier models user must have some understanding of how the data was structured within the database in order to retrieve, insert, update, or delete records from the database. Whereas in relational model data is manipulated on the basis of data values themselves e.g. if data is to be retrieve from a row of a column it can be done by comparing the value stored in a particular column of that table. Let's suppose a table contains information about all the students of a particular class. Now if someone needs all those students whose grade is A in a particular subject this model it will simply returns the column containing the students and their grades.
The main reason for the popularity of relational model is the easy and simple to understand data access methodology and that is why it is the most common model used now a days.
2.3Database Management Systems
The better functionality of the database depends on the easy accessibility of the data.
In addition, new information and changes should also be fairly easy to input. The database management system operates within existing computer hardware.
A database management system (DBMS) is computer software designed to manage the information. The data may be research data, business records, sales reports, personal data or student's information.
The database management system provides an easy way to build up an efficient information system.
Computer Based Data Processing Systems
Database Management system
Computer hardware and software environment
Figure 2-3: Database Management System
2.3.1 Relational Database
The relational databases are the most common popular database. It is the most powerful tool and store data in a more logical way. It not only to store information, but also allows to access data. In such a database the data and relations between them are organized in tables. A table is a collection of records and each record in a table contains the same fields. The first row of the table shows the name of the variables and other rows contains data. All items in the same row are related to each other. Although it is not necessary that tables should be of the same size but there must be a key column that connects them to each other and uniquely defines the entries if the table. In a relational database, tables do not need to be of the same size but they all need to have a key column that connects them to each other and that uniquely defines the elements inside the table.
It is more difficult for the designer to design a relational database because there may be exists many possible relationships. But data can be examined from many different perspectives. Hence making it easier for the user to add, retrieve, sort or modify data. In addition, if tables are properly defined it is possible to duplication of data. Thus allows storing huge amount of data.
MySQL is a classified as relational databases which includes a SQL server, client programs for accessing the server, administrative tools and programming interface for writing own programs.
Micheal Widenus, inventor of MySQL works in a Swedish company TcX. He has been working on has been working with databases since 1979. In 1994, TcX began developing web-based applications and used UNIREG to support this effort. Unfortunately, the servers they found were too slow for TcX's large data. TcX began looking at SQL and mSQL but they also did not help them. By May 1995, TcX had a database that met its internal needs and it is called MySQL.
126.96.36.199.1 Why to Use MySQL
MySQL is the most popular open source database used now days. Due to its reliability and efficient usage it is used by not only individuals but also a powerful tool for many organizations. MySQL has many attractive features:
- MySQL is free of cost.
- Due to its efficiency MySQL is fast.
- MySQL is less complicated and is easily to understand.
- It runs on not only windows but other operating systems like Linux/Unix and many other non-UNIX.
- MySQL is fully networked i.e. one can access database from anywhere and can share to anyone in the world.
The language used for accessing MySQL database is PHP. For PHP we must have an apache server. A brief description of PHP is:
PHP is a scripting language developed for server side programming (scripting). Its official name is PHP Hypertext Preprocessor.
Whenever a request for a webpage is sent the PHP script is being parsed. Unlike HTML the requested PHP script is executed and its output is sent to the web server as part of the HTML code in the document.
A parsing engine was developed in 1994 by Rasmus Lerdorf. This engine was used to parse a few macros. When the development started to become a team effort final releases came in the market. Today millions of servers run PHP. Different plug-in modules and code optimization techniques have been developed.
PHP is easy to learn, easy to implement and easy to use. That's why it is so warmly accepted and implemented worldwide. After C, Java and Visual Basic PHP has become the fourth leading programming language.
2.4.3Why to use PHP
- It can allow a user to perform system functions through it i.e. creating files, opening files, writing to files, creating directories and modifying permissions.
- Sending email and manipulating the stored data can also be done using PHP.
- Providing access to databases via web interface. Mysql is so closely linked with PHP that it has become a part of it rather than being a plugin-module.
- PHP can well manage both text and image contents. This adds versatility to it.
- Since PHP is written in C like language with little differences, it can be made more flexible by adding library functions and classes. Being open source it is continuously being improved.
PHP script is written within a block. The block starts with “<?php” and ends with”?>”. its syntax is very much like C. Unlike C it doesn't need variable declaration and each variable has a dollar sign ‘$' as a prefix.
An example of a simple PHP script is given below:
<?php echo( "<h1> This is a PHP script </h1>" ); ?>