Professional Documents
Culture Documents
2017-18 A CC4002NA A3 CW Coursework NP01CP4A170082 Dibya Shrestha
2017-18 A CC4002NA A3 CW Coursework NP01CP4A170082 Dibya Shrestha
2017-18 A CC4002NA A3 CW Coursework NP01CP4A170082 Dibya Shrestha
CC4002NA
Coursework 3
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.
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.
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
TABLE OF QUERIES
1) INTRODUCTION
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.
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
2
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM
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
2) DATABASE MODEL
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.
4
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM
2) Relational Diagram
5
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM
3) Entities description
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.
6
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM
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.
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 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.
10
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM
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.
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.
Entity Entity Column Column Data Length Keys Null Unique Notes
Name Description Name Description Type
13
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM
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)
14
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM
Entity Entity Column Column Data Length Keys Null Unique Notes
Name Description Name Description Type
15
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM
Entity Entity Column Column Data Length Keys Null Unique Notes
Name Description Name Description Type
16
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM
Entity Entity Column Column Data Lengt Keys Null Uniqu Notes
Name Description Name Description Type h e
17
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM
6) QUERIES
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 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
19
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM
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 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.
21
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM
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
25
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM
4) https://www.smartsheet.com/blog/gantt-chart-excel
26
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM
2) Books
27
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM
28
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM
29
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM
30
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM
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)
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)
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)
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)
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)
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.
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).
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.
38
DIBYA SHRESTHA
CC4002NA INFORMATION SYSTEM
39
DIBYA SHRESTHA