2017-18 A CC4002NA A3 CW Coursework NP01CP4A170082 Dibya Shrestha

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 47

Information System

CC4002NA
Coursework 3

Submitted By: Submitted To:


Dibya Shrestha Mr. Sukrit Shakya
NP01CP4A170082 Module Leader
L1C8 Information System
Date: 23 March, 2018
Word Count:-5553 Semester:Spring
PROPOSAL

PROPOSE

This coursework is created for storing data and information which results in
the easy implementation of data and information or database for a sports club.

PROBLEM STATEMENT

User can face the problem for time management as to update, retrieve and
alter the data in the database takes a lot of time. The schema of the database is
physically insecured. Entry of false data such as integer in case of string data type
and vice versa, keeping the column of the table empty defined as NOT NULL column
data type, entering wrong syntax for creating foreign keys, not relating tables with
each other properly may create some problems to the user while creating the
database.

AIMS AND OBJECTIVES

The main aim and objectives of this coursework is to create a database for a
sports club which contains different tables for storing data for different purposes. The
user can displays their required information from the database by using some syntax
such as SELECT, WHERE, BETWEEN, AND OR, etc.

TARGET AUDIENCE

Students and the sports club agencies are the targeted audience of this
coursework. For students it can help in enhancing the knowledge based on
database. As for the companies, it helps in storing the data and information of the
company by avoiding unnecessary duplicate data and multiple uses of data.

PROPOSED APPROACH

By entering true syntax, entering defined data type in the column and doing
research about the error displayed during the implementation of database, handling
data manipulation, making correct ERD we can avoid problems faced during the
whole procedure.
HARDWARE AND SOFTWARE REQUIREMENTS

1) DBMS is the most important software used but other includes utilities,
application development tools (XAMPP), design aids, draw.io (ERD and
relational diagram) report writers (MS-Word) and transaction manager.
2) Hardware used for the projects are secondary storage volumes like magnetic
disks that are used to hold the stored data together with associated disk
drives, device controllers, I/O channels. The hardware processors and
associated memory that are used to support the execution of database
system software.

ACTIVITY DESCRIPTION AND TIME LINE

The following coursework was given in 26 March 2018 and the deadline was on
week 20. It had to be completed in 1 month so it was difficult to cover up in the
limited time. The course work was started from the first week.

 In first week the research about the project was done and all the study and
research works was done with the help of books and websites. Database
model was design while proposal and introduction part of documentation was
completed leaving this ‘activity and timeline’ section which was completed in
last week.
 In second week, introduction was completed in the documentation, analysis
and discussion was done with friends and teachers. Data dictionary was also
completed.
 In third week, different queries was run in the database and was recorded in
the documentation.
 In the last week, conclusion was written. The project was rechecked and
formatted and the remaining part of documentation was completed.
GANTT CHART

Gantt chart is the timeline that shows the activities done by an individual in a
certain period of time.
Contents

1) INTRODUCTION....................................................................................................1
1) DISCUSSION AND ANALYSIS.............................................................................2
2) DATABASE MODEL..............................................................................................3
1) ER-Diagram.....................................................................................................4
2) Relational Diagram..........................................................................................5
3) Entities description..........................................................................................6
 Members.............................................................................................................6
 Registration.........................................................................................................8
 Sports..................................................................................................................9
 Instructor...........................................................................................................10
 Competition.......................................................................................................12
3) DATA DICTIONARY............................................................................................13
1) DATA DICTIONARY FOR Members.............................................................13
2) DATA DICTIONARY FOR REGISTRATION.................................................14
3) DATA DICTIONARY FOR Sports.................................................................15
4) DATA DICTIONARY FOR Instructor.............................................................16
5) DATA DICTIONARY FOR Competition........................................................17
6) QUERIES.............................................................................................................18
QUERY NO.1: BETWEEN OPERATOR.................................................................18
QUERY NO.2: ARITHMETIC OPERATOR............................................................18
QUERY NO:3: ALTER TABLE................................................................................19
QUERY NO.4: GROUP BY.....................................................................................19
QUERY NO.5: INNER JOIN...................................................................................20
QUERY NO.6: JOIN................................................................................................20
QUERY NO: 7 ORDER BY AND LIMIT..................................................................21
QUERY NO.8: LIKE OPERATOR...........................................................................21
QUERY NO.9: COUNT...........................................................................................22
QUERY NO.10: HAVING........................................................................................22
7) RESEARCH.........................................................................................................23
1) Websites........................................................................................................23
2) Books.............................................................................................................27
3) Journal...........................................................................................................32
8) CONCLUSION.....................................................................................................37
Bibliography................................................................................................................38
TABLE OF FIGURES

Figure 1: Entity-Relationship Diagram..........................................................................4


Figure 2: Relational Diagram of Database Model........................................................5
Figure 3: Description of the entity “Members”..............................................................6
Figure 4: Insertion of values in the entity “Members”...................................................6
Figure 5: Showing all the records of the entity “Members”...........................................7
Figure 6: Description of the entity “Registration”..........................................................8
Figure 7: Insertion of values into entity “Registration”..................................................8
Figure 8: Showing all the records of entity “Registration”............................................8
Figure 9: Description of entity “Sports”.........................................................................9
Figure 10: Insertion of values into entity “Sports”.........................................................9
Figure 11: Showing all the records from the entity “Sports”.........................................9
Figure 12: Description of entity “Instructor”................................................................10
Figure 13: Insertion of values in entity “Instructor”.....................................................10
Figure 14: Showing all the records of entity “Instructor”.............................................11
Figure 15: Description of entity “Competition”............................................................12
Figure 16: Insertion of values in entity “Competition”.................................................12
Figure 17: Showing all the records of entity “Competition”........................................12
Figure 18:website 1....................................................................................................23
Figure 19:website 2....................................................................................................24
Figure 20: website 3...................................................................................................25
Figure 21: website 4...................................................................................................26
Figure 22: book1.........................................................................................................27
Figure 23: book2.........................................................................................................28
Figure 24: book 3........................................................................................................29
Figure 25: book4.........................................................................................................30
Figure 26: book5.........................................................................................................31
Figure 27: journal1......................................................................................................32
Figure 28: journal2......................................................................................................33
Figure 29: journal3......................................................................................................34
Figure 30: journal4......................................................................................................35
Figure 31: journal5......................................................................................................36
TABLE OF TABLES

Table 1: Data Dictionary of entity “Members”.............................................................13


Table 2: Data Dictionary of entity “Registration”........................................................14
Table 3: Data Dictionary of entity “Sports”.................................................................15
Table 4: Data Dictionary of entity “Instructor”.............................................................16
Table 5: Data Dictionary of entity “Competition”........................................................17

TABLE OF QUERIES

Query 1: Query to display values within range of amount of members.....................18


Query 2: Query to calculate discounted amount of members....................................18
Query 3: Query to set the column contact_number unique.......................................19
Query 4: Query to display the total salary of the instructor........................................19
Query 5: Query to join specific column of two tables.................................................20
Query 6: Query to join specific column of three tables...............................................20
Query 7: Query to sort the records and specify the number of records.....................21
Query 8: Query to search for a specified pattern.......................................................21
Query 9: Query showing total number of records in the column................................22
Query 10: Query showing that uses group by and having.........................................22
CC4002NA INFORMATION SYSTEM

1) INTRODUCTION

“A database is a collection of related data with an implicit meaning. It can also


be defines as collection of tables, queries, reports, views and other objects.
DBMS (Database Management System) is a collection of programs that enables
users to create and maintain a database. “ (Ramez Elmasri Shamkant
B.Navathe, 2016) DBMS facilitates the process of defining, constructing,
manipulating and sharing databases among various users and applications. Its
function also includes protecting data base and maintaining it over a long period
of time. An entity-relationship diagram (ERD) is a graphical representation of an
information system that shows the relationship within the system. Relational
Diagram is another form of ER-diagram that represents the relation between the
tables of the databases. A query is a request for data or information from a
database table or combination of tables.

The following coursework includes a database named


Islington_Sports_Club and model with 5 table (Members, Registration, Sports,
Instructors and Competition) that stores data for a sport club. Each table consists
of different information about the members of the club, their registration
information, sports they has chosen, sports instructor and the national
competition that is to be held. The database record information about the projects
it has on hand; the Members that are used in storing information about the each
member of the club; the Registration in which the members registration details
are stored; the Sports in which the available sports and the sports chose by
members are stored; the Instructor that are used in storing the instructor of the
sports; the Competition that are used in storing data about the competition to be
held in coming days. These five attributes are the part of entities. In addition to
the basic entities, there is also relationship linking those basic entries together.
As a whole the database is represented by E/R (Entity Relationship) diagram that
explains the relationship and entities database clearly. It also includes data
dictionary, queries, reports, views, research, formatting and conclusion. It
involves specifying the datatype, structure and constrains of the data to be stored
in the data base. Manipulation of database includes functions such as querying

1
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM

the database to retrieve specific data, updating the database to reflect changes in
mini world and generating reports from the data base. (Ramez Elmasri Shamkant
B.Navathe, 2016) In the following database, you can insert, select, delete and
update the values of the table according to the needs of users.

The project is important as to store data for the club as a whole not just for
individual departments. The projects is targeted to enhance the knowledge of
DBMS of the students. On the other hand the project helps to keep the data for
the respective club safe. As the data can be shared and new applications can be
developed from the project, it is supposed to be very beneficial.

1) DISCUSSION AND ANALYSIS

The vast majority of database research has been based on the relational
model. There is no proper definition of relational database but roughly it can be
defined as the database containing a collection of relations. Each relation
resembles a table of values. Each row in the table represents a fact that typically
corresponds to a real-world entity or relationship. (Ramez Elmasri Shamkant
B.Navathe, 2016)The table and column name helps in interpreting the meaning of
values in each rows. In the relational database, a row is called a tuple a column
an attribute and the table is called relation.

The coursework would not have completed without the software like DBMS
and MS-Word since the coursework contains section like models, EDR, data
dictionary, documentation, etc. The section ‘program’ was developed in a XAMPP
and the documentation was completed in MS-Word.

 DBMS

DBMS (Database Management System) is a software that handles all


access to the database. (C.J. Date A.Kannan S.Swamynathan, 2006). DBMS
executes the necessary operations stored in the database. It also inspects the
object version of external schema for that user. DBMS functions as data definition
(external schemas, the conceptual schema, the internal schema and all the
associated mappings), data manipulation (receive, update and delete the existing
database), data security, data recovery, data dictionary and performances.

2
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM

 XAMPP control panel

XAMPP is a free and open source cross platform web server solution stack
consisting mainly of Apache, Mysql, Filezilla, Mercury and TomCat. For
developing the project we used Mysql as the SQL systems have come to
dominate the DBMS marketplace which is based on the relational model of data.

 RDBMS

RDBMS stands for Relational Database Management System. It is based on


relational model and is the basis for SQL and all modern databases. An important
feature of relational systems is that a single database can be spread across
several tables. This differs from flat-file databases in which each database is self-
contained in a single table. The following coursework is also based on RDBMS.
The following database stores the data into collection of tables which is related by
the column of tables. The data in an RDBMS is stored in database objects which
are called as table. A column is a vertical entity in a table that contains all
information associated with a specific field in a table. RDBMS contains
constraints that are the rules enforced on data columns on a table. They ensures
the accuracy and reliability of data in the databases. The constraints are NOT
NULL, DEFAULT, UNIQUE, PRIMARY AND FOREIGN KEY. A PRIMARY KEY
uniquely identify each row in The table the columns must be unique, not null and
not empty for this case. FOREIGN KEY refers to the primary key in another table
relates 2 tables.

2) DATABASE MODEL

The following database named Islington_Sports_Club is based on relational


database which contains 5 entities that are related with each other. Each entities
contains numbers of tuples and attributes that gives the information about the
data written in the database. To specify this database, structure of records of
each file is specified by different types of data elements to be stored in each
record. A data type is also specified for each data element in a record. The
database served to illustrate the basic ER model concepts and their use in
schema design. The data requirements for the database was listed and then
created in a conceptual schema step-by-step. The database was easily explained
clearly with the help of ER- Diagram, relational diagram and data dictionary.

3
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM

1) ER-Diagram
An entity-relationship diagram (ERD) is a graphical representation of an
information system that shows the relationship between people, objects, places,
concepts or events within that system. ERD contains entity, attribute and
relationship.

Figure 1: Entity-Relationship Diagram

4
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM

2) Relational Diagram

Relational Diagram is another form of ER-diagram that represents the relation


between the tables of the databases. Each box is table which contains information
about the attributes, primary keys and foreign keys each table is related using crow-
foot notation.

Figure 2: Relational Diagram of Database Model

5
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM

3) Entities description

The database contains five entities (Members, Registration, Sports, Instructor


and Competition). All the tables are related with each other as the registered
members can choose each sports guided by instructors and can take part in the
competition. The five tables are created in the database using SQL syntax. The
Members and Registration has one-one , Members and Sports one-one, Sports and
Instructors many-one and Sports and Competition has one-one relationship.

The detailed description of the table/entities are described below:

 Members
It consists of five rows and five columns and stores the information of each
members in the attributes
(Member_ID (INT), Member_Name VARCHAR (100), Address VARCHAR (55), Age
INT and Contact_Number INT). The constraints for the first column was set as
primary key and auto increment to ensure the data of that column is unique, can be
used as a reference for foreign key used in other tables (Registration, Sports and
Competition). The figure below shows the insertion of data in the table, description of
the table.

Figure 3: Description of the entity “Members”

Figure 4: Insertion of values in the entity “Members”

6
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM

Figure 5: Showing all the records of the entity “Members”

7
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM

 Registration
It consists of five rows and five columns and stores the information of
registration of each members in the club in the attributes Registration_ID (INT),
Member_Name (INT), Amount (DECIMAL(7,2)), Discount_Percentage (INT and
DEFAULT 0) and FeeStatus (VARCHAR(55)). The constraints for the first column
was set as primary key and auto increment to ensure the data of that column is
unique. The Member_Name was set as a foreign key. This constraints helps to
relate Members and Registration table. It refers to the primary key (Member_ID)
in the table ‘Members’. The figure below shows the insertion of data in the table,
description of the table and showing all the rows and columns present in it.

Figure 6: Description of the entity “Registration”

Figure 7: Insertion of values into entity “Registration”

Figure 8: Showing all the records of entity “Registration”

8
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM

 Sports
It consists of five rows and five columns and stores the information about the
sports chosen by each members in the club in the attributes Sport_ID (INT
PRIMARY KEY AUTO_INCREMENT), Sport_Name (VARCHAR(22) UNIQUE),
Member_Name(INT) NOT NULL, Days (VARCHAR(10) NOT NULL and
Total_Hours (INT) NOT NULL). The constraints for the first column was set as
primary key and auto increment to ensure the data of that column is unique. The
Member_Name was set as a foreign key. This constraints helps to relate
Members and Sports. It refers to the primary key (Member_ID) in the table
‘Members’. The figure below shows the insertion of data in the table, description
of the table and showing all the rows and columns present in it.

Figure 9: Description of entity “Sports”

Figure 10: Insertion of values into entity “Sports”

Figure 11: Showing all the records from the entity “Sports”

9
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM

 Instructor
It consists of five rows and five columns and stores the information about the
instructor for the sports in the club in the attributes (Instructor_ID INT PRIMARY
KEY AUTO_INCREMENT, First_Name VARCHAR (10), Last_Name
VARCHAR(10),Sport (INT) and Salary(DECIMAL(7,2) NOT NULL) . The
constraints for the first column was set as primary key and auto increment to
ensure the data of that column is unique. The entity Sport was set as a foreign
key. This constraints helps to relate Instructor and Sports. It refers to the primary
key (Sport_ID) in the table ‘Sports’. The relation between Instructor and Sports is
one-many. The figure below shows the insertion of data in the table, description
of the table.

Figure 12: Description of entity “Instructor”

Figure 13: Insertion of values in entity “Instructor”

10
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM

Figure 14: Showing all the records of entity “Instructor”

11
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM

 Competition
It consists of five rows and five columns and stores the information about the
inter college competition in the attributes (Competition_ID (INT PRIMARY KEY
AUTO_INCREMENT), Sport_Name (INT) UNIQUE, Member_Name (INT), DATE
(DATE) and Location (VARCHAR(10)),. The constraints for the first column was
set as primary key and auto increment to ensure the data of that column is
unique. The entity Sport_Name and Member_Name was set as a foreign key.
This constraints helps to relate Competition and Members and Competition and
Sports. The first foreign key refers to the primary key Member_ID of the table
Members and and the second foreign key refers to the (Sport_ID) in the table
‘Sports’. The figure below shows the insertion of data in the table, description of
the table.

Figure 15: Description of entity “Competition”

Figure 16: Insertion of values in entity “Competition”

Figure 17: Showing all the records of entity “Competition”

12
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM

3) DATA DICTIONARY
A data dictionary is a collection of descriptions of the data objects or items in
a data model for the benefit of programmers and others who need to refer to
them. A Data Dictionary describes the structure of whole database. It includes the
names and descriptions of the tables and the fields contained in each table along
with information of the data type, field length. In this coursework separate tables
are created for each entity of databases.

1) DATA DICTIONARY FOR Members

Entity Entity Column Column Data Length Keys Null Unique Notes
Name Description Name Description Type

A member Member ID of the INT 11 PRIMARY FALSE TRUE AUTO


Members is a person _ID member for INCRE
that the unique MENT
activately identification
takes part of each
in its member.
respective Member Name of the VAR 100 FALSE FALSE
field. _Name member CHAR
Address Address of VAR 55 TRUE FALSE
the member CHAR
Age Age of the INT 11 TRUE FALSE
member
Contact Phone INT 11 FALSE TRUE
_Number number of
the member

Table 1: Data Dictionary of entity “Members”

13
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM

2) DATA DICTIONARY FOR REGISTRATION

Entit Entity Column Column Data Lengt Keys Null DEF Uniqu Notes
y Descripti Name Descriptio Type h AUL e
Nam on n T
e
A Registrati ID of the INT 11 PRI FALS NUL TRU AUTO
Regi registrati on registratio M E L E INCRE
st on is a _ID n of the ARY MENT
ratio departme member
n nt where for the
the unique
financial identificati
or any on of each
other registratio
aspects n.
of the Member ID of the INT 11 FOR TRU NUL FALS Refere
respectiv _Name member. E E L E nces
e field is IGN Membe
registere rs
d. rs
(Memb
er_ID)

Amount Fees to DEC (7,2) FALS NUL FALS


be paid by IMAL E L E
the
member
Discount Discount INT 11 TRU 0 FALS
Percenta percentag E E
ge e given to
the
member
Fee_Stat Status of VAR 55 FALS NUL FALS
us the fees CHA E L E
either paid R
full or not

Table 2: Data Dictionary of entity “Registration”

14
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM

3) DATA DICTIONARY FOR Sports

Entity Entity Column Column Data Length Keys Null Unique Notes
Name Description Name Description Type

A sport is Sport_ID ID of the INT 11 PRIMARY FALSE TRUE AUTO


physical sports INCRE
activities available for MENT
that keeps the member
our body for the
healthy. unique
identification
of each
Sports sports.
Sport_ Name of the INT 11 TRUE TRUE
Name sport
Member_ ID of the DEC (7,2) FOREIGN TRUE FALSE referen
Name member IMAL Ces
members
(Member_
ID)
Days Day in INT 11 TRUE FALSE
which the
member
take part in
the sport.
Total_ Total hours VAR 55 TRUE FALSE
Hours taken part CHAR
by member
in their
respective
sport.

Table 3: Data Dictionary of entity “Sports”

15
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM

4) DATA DICTIONARY FOR Instructor

Entity Entity Column Column Data Length Keys Null Unique Notes
Name Description Name Description Type

An Instruct ID of the INT 11 PRIMARY FALSE TRUE AUTO


instructor is or_ID instructor for INCRE
a person the unique MENT
that guides identification
their of each
students in instructor.
their First_ First name VAR 10 FALSE FALSE
respective Name of the CHAR
Instruc fields.. instructor.
tor Last_ Last name VAR 10 FALSE FALSE
Name of the CHAR
instructor
Sport ID of the INT 11 FOREIGN FALSE FALSE References
sports that Sports
is guided by (Sport_ID)
the
instructor.
Salary Salary of DEC (7,2) TRUE FALSE
the IMAL
instructor.

Table 4: Data Dictionary of entity “Instructor”

16
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM

5) DATA DICTIONARY FOR Competition

Entity Entity Column Column Data Lengt Keys Null Uniqu Notes
Name Description Name Description Type h e

An Compet ID of the INT 11 PRIMAR FALS TRUE AUTO


competitio Ition_ID competition Y E INCRE
n is the for the MENT
war that is unique
held identificatio
between n of each
the players competition.
which Sport_ Sport ID of INT 11 FOREIG TRUE FALS References
Comp decides Name the sports N E Members
e the who is (Member_ID
tition better )
among
them. Member Member ID INT 11 FOREIG TRUE FALS References
_Name of the N E Sports
members (Sport_ID)

DATE Date when DATE 11 TRUE FALS


the E
competition
is to be
held.
Locatio Location VAR 10 TRUE FALS
n where the CHA E
competition R
is to be
held.

Table 5: Data Dictionary of entity “Competition”

17
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM

6) QUERIES

A query is a request for data or information from a database table or combination


of tables. A database query must follow the query format required by the database.
The most common format is the Structured Query Language (SQL) standard query
format used by many database management systems. SQL is a powerful language
capable of advanced queries. SQL uses a SELECT statement to select specific data.

QUERY NO.1: BETWEEN OPERATOR

Query 1: Query to display values within range of amount of members

Query 1 shows the records of the table registration whose amount value is
between 24000.00 and 30000.00 by using BETWEEN along with WHERE. The
BETWEEN operator selects values within a range. The values can be numbers, text,
or dates.

QUERY NO.2: ARITHMETIC OPERATOR

Query 2: Query to calculate discounted amount of members

Query 2 extracts the member_name, amount and discounted amount in the new
column new_amount of each student from the table registration in the new column
new_amount after subtracting the discount amount from the total amount. These

18
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM

arithmetic operator are used to perform calculation in the data. AS can be used to
give a temporary column name

QUERY NO:3: ALTER TABLE

Query 3: Query to set the column contact_number unique


Query 3 shows the altered table members after setting the column contact
number unique. The constraint UNIQUE to avoid duplicate phone number of the
members. The column contact_number was set unique to give the unique contact
number to each members.

QUERY NO.4: GROUP BY

Query 4: Query to display the total salary of the instructor


Query 4 shows the salary of the instructor that instructs
different sports. As the instructors instructs different sports, they have different
salaries according to the field they works on. From the above figure, we can clearly
see the total amount of salary gained by the instructor using Group By. GROUP BY
is used to group the records according to similar values in a certain column used
with aggregate functions

19
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM

QUERY NO.5: INNER JOIN

Query 5: Query to join specific column of two tables

The design of this query extracts the records from two


tables i.e,member_id from members, sport_id from sports, member_name from
members and sports_name from sports by using INNER JOIN. The INNER JOIN
combines the data from different tables. AS can be used to give a temporary column
name

QUERY NO.6: JOIN

Query 6: Query to join specific column of three tables

The design of this query connects three tables i.e, Member_Name from
Members as member_name, Sport_Name from Sports as sport_name and DATE
from Competition as date by using operator JOIN. JOIN clause combines the data
from different table on the basis of column, column_tables has in between them.
Thus the three tables are joined together.

20
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM

QUERY NO: 7 ORDER BY AND LIMIT

Query 7: Query to sort the records and specify the number of records
Query 7 is design in such a way that it changes the structure of table
Instructor. It shows all the records of the entity instructor after setting the salary of
the instructor varying from more to less by using DESC operator and displaying total
4 number of records by using LIMIT operator. ORDER BY sorts the records in
ascending or descending order according to the specified column. LIMIT is used to
specify the number of records to show as the result of a query.

QUERY NO.8: LIKE OPERATOR

Query 8: Query to search for a specified pattern


Query 8 is design in such a way that it extracts sport_id, sport_name, days
and total_hours from table Sports and the rows in which the sport_name starts with
“b”. The LIKE operator is used in a WHERE clause to search for a specified pattern

21
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM

QUERY NO.9: COUNT

Query 9: Query showing total number of records in the column


Query 9 is design in such a way that it extracts the column competition_id
from competition and count the total number of records excluding null values present
in that column by using COUNT(column). COUNT (column) returns the total number
of records in the column excluding NULL values

QUERY NO.10: HAVING

Query 10: Query showing that uses group by and having

Query 10 is design in such a way that the query extracts member_name, sum
of column amount and fee_status from the table registration and displays the
member_name whose amount add up to more than 45000 by using HAVING after
grouping fee_status by using GROUP BY.

22
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM

7) RESEARCH
Completing the whole coursework was challenging task for me as I faced
many problems in the way. There was also many errors which was finally
corrected with the help of respective teachers. A lot of research was done with
the help of varieties of websites, books and journal of respective topics.

1) Websites

1) https://en.wikipedia.org/wiki/XAMPP

Figure 18:website 1

The above website was used to know about the basic information about XAMPP that
contains MYSQL in which the database was made. XAMPP is a free and open
source cross-platform web server solution package. Server application (APACHE),
database (MarialDB) and scripting language (PHP) is included in extractable file.

23
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM

2) https://www.tutorialspoint.com/sql/sql-rdbms-concepts.htm

Figure 19:website 2
RDBMS stands for Relational Database Management System. It is based on
relational model and is the basis for SQL and all modern databases. An important
feature of relational systems is that a single database can be spread across several
tables. This differs from flat-file databases in which each database is self-contained
in a single table.

24
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM

3) https://www.lucidchart.com/pages/er-diagrams

Figure 20: website 3

Entity Relationship Diagram is the chart representing the


relationship between entities of the database. ER Diagrams are most often used to
design or debug relational databases in the fields of software engineering, business
information systems, education and research. There are different symbols and
notations used in ERD.

25
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM

4) https://www.smartsheet.com/blog/gantt-chart-excel

Figure 21: website 4

Above figure shows the gantt chart. Gantt chart is the


timeline that shows the activities done by an individual in a certain period of time.
From the above websites, procedure of making gantt chart in a Excel was learnt step
by step. It can be also created in smartsheet which takes shorter period of time than
in Excel.

26
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM

2) Books

1) Database: Models, Languages, Design (L.Johnson, (February 1, 1997))

Figure 22: book1


The above books had helped in understanding the
relational database and its concepts. It also provides information about the
database models and how to design it.

27
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM

2) Advanced Database System (Nabil R. Adam, Bharat K. Bhargava, 1993)

Figure 23: book2

From the above book, knowledge about advanced about


advanced database system was acquired which provides a lot of aid in the
development of the projects.

28
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM

3) Database Design Using Entity Relationship Diagram (Sikha Bagui, Richard


Earp, 2011)

Figure 24: book 3

As entity relationship diagram is very important in creating a database,


the book was very helpful to draw the ER-diagram of the project step-by-
step and handle it carefully.

29
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM

4) Query Processing in Database System

Figure 25: book4

From the above book, we learnt about performing queries


in the database. A query is a request for data or information from a database
table or combination of tables. A database query must follow the query format
required by the database.

30
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM

5) Fundamentals of database systems

Figure 26: book5

The above book was very useful as it provides the basic concepts of
databases systems. The whole topic was new to me so it was difficult to deal
with it. But the book was helpful in clearing those confusions.

31
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM

3) Journal

1)

Figure 27: journal1

The above figure shows the journal about the database management system
with highly qualified computing capabilities. It gives short description about the
databases and basic knowledge about it.

32
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM

2)

Figure 28: journal2

Research about the ER-diagram was further done and the topic was dug
more to clear all the confusions and queries regarding it through the above journal.

33
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM

3)

Figure 29: journal3

The above database journal was used to gain information about the relational
database model, how the tables are related with each other. A database can be
understood as a collection of related files/tables and this can help to store the same
data in different tables.

34
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM

4)

Figure 30: journal4

The above figure shows the journal about the data dictionary system. Every
database has its data dictionary. It helps to define the schema of database so that
the database is clear and it helps users to understand the database clearly.

35
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM

5)

Figure 31: journal5

The above figure shows the journal about the app XAMPP and its features. As
the database was created in the MYSQL of xampp, it was important to understand
the app and the journal aided a lot.

36
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM

8) CONCLUSION

The whole coursework was finally created after going through many trials,
tests, research, hardwork, errors and correction. It required a lot of time, effort
and focus. At first a lot of study and research was done to pass through the steps
like ER-diagram creation, creating the relational diagram, the database model,
data dictionary and queries. Without the help of above mentioned websites,
books, journal plus the help of respective teachers, the coursework could never
had been completed. During the creation of database model a lot of error was
seen like wrong syntax, misplace spellings, duplicate values, wrong way of
creation of foreign keys, difficulties in relating table with each other. The tables
was update many times to correct the errors. This coursework is not only helpful
for getting pass marks but also it is helpful in future projects as students had gain
information about managing data. While working in the project knowledge about
basic terms of database was clearly obtained and it had given a confidence in
finding errors.

The coursework was given to the students in order to enhance their


programming capacities and to check their documentation format but the above
program can be helpful colleges as it helps in storing data of the sports club of
the college. The program can be executed only for the record that is input in each
tables but by changing the database model, the database can be conducted for
storing the related data with an implicit meaning of any other organizations,
companies, agencies.

37
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM

Bibliography
A.S.Gaikward,F.A.Kadri,S.S.Khandagle,N.I.Tava, 2017. Automation Tool for ERD
normalization. International research journal of engineering and technology, 04(2 feb
2017).

Amani Tahat Wa'el Salah, 2011. Comprehensive online atomic DBMS with highly
qualified computing capabilities. international journal of database management
system, 3(2 may 2011).

Anon., n.d. https://en.wikipedia.org/wiki/XAMPP. [Online]


Available at: https://en.wikipedia.org/wiki/XAMPP

Anon., n.d. https://www.lucidchart.com/pages/er-diagrams. [Online]


Available at: https://www.lucidchart.com/pages/er-diagrams

Anon., n.d. https://www.smartsheet.com/blog/gantt-chart-excel. [Online]


Available at: https://www.smartsheet.com/blog/gantt-chart-excel

Anon., n.d. https://www.tutorialspoint.com/sql/sql-rdbms-concepts.htm. [Online]


Available at: https://www.tutorialspoint.com/sql/sql-rdbms-concepts.htm

C.J. Date A.Kannan S.Swamynathan, 2006. Database System Architecture. In: An


Introduction To Database Systems. UP, India: Dorling Kindersley Pvt.Ltd, p. 931.

Carl Stephen Guynes Jan L. Guynes Ronald G.Thoran, n.d. The data dictionary:a
valuable information resource tool.

Gilfillan, I., relational databases. featured database articles, Issue 24 Jun 2002.

L.Johnson, J., (February 1, 1997). In: Database:Models,Languages,Design.


s.l.:Oxford Univ Pr; Teachers Guide edition .

McCarthy, D., n.d. XAMPP,an Apache Distribution. Issue feb 10 2005.

Nabil R. Adam, Bharat K. Bhargava, 1993. Advanced Database Systems.


s.l.:Springer Science & Business Media, 1993.

Ramez Elmasri Shamkant B.Navathe, 2016. Fundamental of database Systems. In:


Fundamental of Database Systems 5th Edition. New Delhi: Pearson Education
Limited,2016, p. 1272.

38
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM

Sikha Bagui, Richard Earp, 2011. Database Design Using Entity-Relationship


Diagrams. 2, revised ed. s.l.:CRC Press, 2011.

39
DIBYA SHRESTHA

You might also like