The Introduction To Database Computer Science Essay

Published:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

In the simplest word, a database is an accumulation of gathered information which is organized and structured to provide efficient retrieval. The gathered information could be in any type of formats such as electronic, printed, graphic, statistical and more. Databases can be categorized into two different forms, which are in physical form and electronic form. Of course, a database could be as simple as an alphabetical arrangement of names in an address book or a phone book. On the other hand, it could also be as complex as a database that provides information in a combination of formats. As we know, data can be defined as a set of information stored in a computer. It can be numbers, facts, letters, images, diagrams as well as symbols. Databases today are essential to almost every business in the world. They are used to maintain internal records, to present data to customers and clients through the World Wide Web as well as to support many other commercial processes.

In the field of computing, databases are sometimes classified based on their organizational approach. The most popular approach is the relational database, which is a tabular database whereby its data is defined so that it can be reorganized and accessed in a number of different ways. In addition, computer databases typically contain collections of data records or files, such as transactions, product catalogs and inventories as well as customer profiles. Databases and databases managers are popular in large enterprises with mainframe systems, but are also present in smaller distributed company with workstation and mid-range systems and also on personal computers. A database manager plays an important role in databases as he or she provides users the capabilities of controlling read/write access, specifying report generation, and analyzing usage.

The range of implementing electronic databases is very wide and is gaining momentum every day. It has covered various areas and fields as technology advances day by day. Therefore, the electronic database has played an important role in many organizations.

The power of databases comes from a body of knowledge and technology that has developed over several decades and is embodied in specialized software which can be known as a database management system (DBMS) or more conversationally a "database system". Indeed, a DBMS is a powerful tool for creating and managing large amounts of data efficiently and allowing it to persist over long periods of time. However, file systems do not generally guarantee data cannot be lost if it is not backed up. They don't support efficient access to data items whose location in a particular file is not known either. In addition, a file system will not prevent situations such as two users modifying the same file at about the same time when concurrent access to files by several users or processes is allowed.

Some applications of the database systems include airline reservations systems, banking systems, credit card processing systems, as well as other corporate records such as record of each sale, information about accounts payable and receivable or basic information about the employees in a particular company.

3.0 Database Management System

As mentioned above, a database management system or DBMS in short, is a program that uses a standard method of cataloging, retrieving and running queries on data. The DBMS also manages and organizes the incoming data and provides ways for the data to be modified or extracted by users or other programs. Some examples of the DBMS include MySQL, Microsoft Access, SQL Server, FileMaker, Oracle, Clipper, as well as FoxPro and so on. As we may already know, databases use tables to organize information. Just like Excel tables, databases tables consists of columns and rows whereby each column contains a different type of attribute, which is a single item related to a database object and each row corresponds to a single record. Therefore, databases keep all of these records straight by the usage of keys. Database keys are attributes utilized to sort and identify data in some manner. For example, each table has a primary key which uniquely identifies records while foreign keys are used to link data between two relational tables. So, let me now explain about the role of the Primary Key and Foreign Key in a database system.

4.0 Database Keys

4.1 Primary Key

Primary key is the first key that I'm going to discuss. First of all, what are primary keys? What part do they play in a database system? Of course, primary keys are not only important but also necessary. A primary key can be defined as a field or combination of fields that uniquely identify a record in a table, so that an individual record can be located without confusion. Therefore, the value held for this key should be unique for every record in the database.

Primary Key

Employee ID

Name

Department

Manager

S001

John Lee

IT Support

Stan Lee

S002

Mark Smith

Sales

Edwin Tan

S003

Sally Richards

Sales

Edwin Tan

S004

Julie Holmes

Sales

Edwin Tan

S005

Julie Holmes

Marketing

Michael Campbell

Table 1.1 Employee Table

Consider the table above as an example; a table has a column or combination of columns that contain values that uniquely identify each row in the table. This column is called the primary key of the table. For example, the table above contains information for selected employees in a company. So, an appropriate primary key is needed to identify each employee in the company. However, the employee's name cannot be used as a primary key since there are two employees who have the same name, Julie Holmes as shown in the table above. Therefore, a unique employee identification number (ID) given to the employees when they're hired is chosen as the primary key for the employee table above.

Since the primary key is unique for each record and the value can never be duplicated in the same table, so the employee ID field would be used for the employee table above. Therefore, a primary key constraint is a set of basic principles that the primary key fields cannot be left unfilled and cannot contain duplicate data. However, the database management system will apply the uniqueness of the key once a primary key is decided and is set up in the database. For example, if a company tries to insert a record into the table above with a primary key which duplicates an existing record, the insert will fail.

Also, most databases nowadays have the ability to generate their own primary keys. For example, Microsoft Access can be configured to assign a unique identification number to record in the table by using the AutoNumber function.

Primary Key Of course, the problem with Table 1.1 is that the information in the manager field is repeated since several employees are controlled by a manager of the same department. This causes a lot of problems. For example, based on Table 1.1, Edwin Tan leaves and his position is replaced by Chris Anson, a new manager. Sadly, the company now has to replace all the entries of Edwin Tan with Chris Anson in the manager field of the Table 1.1.

Department No.

Department

Manager

001

IT Support

Stan Lee

002

Sales

Edwin Tan

003

Marketing

Michael Campbell

Primary KeyTable 1.2 Department Table

Employee ID

Name

S001

John Lee

S002

Mark Smith

S003

Sally Richards

S004

Julie Holmes

S005

Julie Holmes

Table 1.3 Employee Table

However, the company would only require only one entry for each department if a new different table is created. Based on Table 1.2, the company only needs to make the change in a place when the position of a manager changes, if the department number in the table above is set as a primary key.

4.2 Foreign Key

Foreign keys are used to create relationship between tables. Normally, a foreign key is a column or a combination of columns that is used to enforce a link between the data found in two different tables to control the data that can be stored in the foreign key table. Therefore, a foreign key constraint specifies that the data in a foreign key must match the data in the primary key of the linked table. In order for the particular company to know which department each employee is in, Table 1.2 and Table 1.3 are required to be linked. So, the primary key from Table 1.2 is taken and is inserted into Table 1.3. This is where the primary key from Table 1.2 has become a foreign key as a foreign key is the primary key from one table inserted into another table. The new table is now formed as shown in below.

Primary Key

Foreign Key

Employee ID

Name

Department No.

S001

John Lee

001

S002

Mark Smith

002

S003

Sally Richards

002

S004

Julie Holmes

002

S005

Julie Holmes

003

Table 1.4 Employee Table

Based on Table 1.4, a link is created between Table 1.2 and Table 1.3 when the primary key for Table 1.2, department number is moved to Table 1.3. Therefore, the column for the primary key in Table 1.2 has become the foreign key in Table 1.4. Also, the department number in Table 1.4 could not be set to 004 as there is no department number of 004 in Table 1.2. This system is known as the referential integrity. It is used to ensure that there is no incorrect data entered in the table above.

5.0 Types of Databases

As mentioned above, a database is a collection of structured data. Databases can be stored in a computer and examined by using a program, which can be simply known as a database management system or a DBMS in short. Basically, there are currently three different types of models in use for database management systems, which are relational database, object-oriented database and also object-relational database. Thus, the main characteristics and the advantages of these models will be explained further below.

5.1 Relational Database

5.1.1 Characteristics

Relational database model is one of the most popular used database models. It was invented and further developed by Edgar F. Codd in the year of 1970. This model has extended two previous database systems, the hierarchical and the network models. In a relational database model, the database users state the information they want to be retrieved from it directly and abstract away from the responsibility of describing the data structures which are used to store data or information. Hence, a database which fulfills the criteria of the relational database model is known as a relational database.

Movie Title

Year

Length (minutes)

Movie Genre

Star Wars

1977

124

Adventurous

Spider-Man

2003

105

Adventurous

Figure 2.1 the relation Movies

Furthermore, Codd proposed that database systems should present the users with a view of data organized as a two-dimensional table called a relation. Figure 2.1 is an example of a relation. The name of the relation is Movies, and it is intended to hold or carry information about the entities in the entity set Movies. Each row corresponds to one movie entity and each column corresponds to one of the attributes of the entity set. However, relations can do much more than represent entity sets.

Based on the figure above, the attributes given are movie title, year, length and also movie genre. In the simplest word, attributes of a relation are the names for every column of the relation. An attribute usually describes the meaning of entries in the column below. For example, the column with attribute length holds the length in minutes of each movie. Therefore, each column of a table is called as an attribute.

In addition, the rows of a relation, other than the header row containing the attribute, are called tuples. A tuple has one component for each attribute of the relation. For example, the first of the two tuples in Figure 2.1 has the four components, which are Star Wars, 1977, 124 and also adventurous for the attributes movie title, year, length and as well as movie genre, respectively. Therefore, the rows of a table in a relational database are known as tuples.

5.1.2 Advantages

One of the advantages of a relational database is that the system is simple. Because of the simplicity of the tables, data is easier to understand and to communicate with others. Besides, users do not have to use predefined keys to input information as the relational database is flexible. Furthermore, the usage of SQL, which is an easy and human-readable language, is implemented in relational databases. Also, the relational databases benefit users with the ease of creating and accessing data. Of course, new data categories can be added without changing the existing application even after the original database is created. Relational databases also provide users with simple operations in order to manipulate and retrieve data in the databases.

In addition, errors can be minimized with the implementation of relational databases. For example, data are validated on their own particular entry in order to filter impossible values. Lastly, a relational database has an excellent security since the access permissions are supported in a relational database. This allows the database administrator to utilize the need-based permissions to the access of the data in database tables. Furthermore, the concept of users and user rights are also supported in relational databases. Thus, this allows the relational databases meet the basic security needs of databases.

5.2 Object Oriented Database

5.2.1 Characteristics

Before I proceed to the object oriented database, let me first explain the object oriented concepts. Object oriented programming has been use widely as a tool for a better program organization and a more reliable software implementation. Hence, the database world is likely to be attracted to the object oriented prototype, particularly for database design and for extending relational database with new features as there are some limitations of the relational database.

Therefore, an object oriented database is a type of database management system which stores data in a closely aligned logical model with an application program's object model. One of the characteristics of object oriented databases is the connection between object oriented programming and also the database technology, which provides a structured application development system. Basically, there are four main characteristics which the object oriented databases should comply with. They are data capsulation, inheritances, object identity and also polymorphism.

Firstly, the hiding of the internal state of the objects is allowed by data encapsulation. Encapsulated objects are those that can only be accessed by their own methods instead of their internal states. Secondly, inheritance lets users to develop solutions for complex problems by defining new or raw objects in terms of previously defined objects. Besides, object identity lets database's objects to be independent to each other. Lastly, polymorphism allows users to define operations for one particular object and to share the specifications of the operation with other objects. This allows users to compile objects for provision of solutions without having to write code that is specific to each object.

5.2.2 Advantages

One of the advantages of the object oriented database is that no primary keys are required. The unique identification of objects is done behind the scenes and is completely invisible to the users. In addition, the defined operations of object oriented databases are not dependent on that particular database application running at the given moment. Also, the data types of an object oriented database can be extended to support data which are more complex such as images, audio, video as well as other multimedia elements. Besides, relationships are represented clearly in the object oriented database management system. Users are also allowed to define their own ways of access to data.

5.3 Object Relational Database

5.3.1 Characteristics

The third type of common database today is the object relational database. It is a type of database which allows users to integrate the database with their own data types and methods. The object relational database was also created to handle more complex types of data such as image, audio and video that cannot be handled by the relational databases.

5.3.2 Advantages

One of the advantages of using the object relational database is that it allows large organizations or firms to continue to use their existing systems without having to make changes. Also, the object relational database allows users and developers to start using object-oriented systems in parallel.

6.0 Conclusion

As a conclusion, database management system is a powerful tool for creating and managing large amounts of data efficiently and allowing it to persist over long periods of time. Without the electronic database system, human beings might have to store their information in an old-fashioned way, the physical file-based database. Therefore, database management system plays a crucial role as a part of everyday life especially in the field of computing, business and science. However, it is essential for one to have a basic understanding of the three major types of databases, which are the relational database, object oriented database and object relational database.

Writing Services

Essay Writing
Service

Find out how the very best essay writing service can help you accomplish more and achieve higher marks today.

Assignment Writing Service

From complicated assignments to tricky tasks, our experts can tackle virtually any question thrown at them.

Dissertation Writing Service

A dissertation (also known as a thesis or research project) is probably the most important piece of work for any student! From full dissertations to individual chapters, we’re on hand to support you.

Coursework Writing Service

Our expert qualified writers can help you get your coursework right first time, every time.

Dissertation Proposal Service

The first step to completing a dissertation is to create a proposal that talks about what you wish to do. Our experts can design suitable methodologies - perfect to help you get started with a dissertation.

Report Writing
Service

Reports for any audience. Perfectly structured, professionally written, and tailored to suit your exact requirements.

Essay Skeleton Answer Service

If you’re just looking for some help to get started on an essay, our outline service provides you with a perfect essay plan.

Marking & Proofreading Service

Not sure if your work is hitting the mark? Struggling to get feedback from your lecturer? Our premium marking service was created just for you - get the feedback you deserve now.

Exam Revision
Service

Exams can be one of the most stressful experiences you’ll ever have! Revision is key, and we’re here to help. With custom created revision notes and exam answers, you’ll never feel underprepared again.