Professional Documents
Culture Documents
CHAPTER 1
INTRODUCTION
1.1 Overview of the project
With the increase in interaction with the 2D world, videogames have become a common
thing among adults and youngsters. This project allows users to view games and information
regarding them based on their liking. Whether it is a PC, XBOX, PS game or a Racing,
Arcade game, the database is a one stop for details regarding them.
Videogame database is a platform that allows users to add games, developers and
publisher information. It is a simple UI (user interface) system, there is a requirement to
maintain all the customers detail records to achieve that there is a need to use a system which
will store and process all this data. The user should register or maintain his/her profile in
order to access the website.
After registration the user will be provided by his/her own account feed in database with
a unique username and password. The website is simple to use and it is a user-friendly
application the role of the application is to maintain data and process it whenever it is needed.
Each table as unique key attribute named as primary keys, a relationship between the
tables/entities are drawn using a foreign key and resolved into a tables/entities.
1.2 DBMS
A database-management system (DBMS) is a computer-software application that interacts
with end-users, other applications, and the database itself to capture and analyse data. A
general-purpose DBMS allows the definition, creation, querying, update, and administration
of database. A database is not generally portable across different DBMSs, but different
DBMSs can Inter-operate by using standards such as SQL and ODBC or JDBC to allow a
single application to work with more than one DBMS.
The DBMS essentially serves as an interface between the database and end users or
application programs, ensuring the data is consistently organized and remains easily
accessible. A DBMS provides concurrency, security, data integrity, consistency, controls
redundancy and data independence. In this project the Relational DBMS (RDBMS) used in
MySQL. It is open source software which uses SQL (Structural Query Language) which is a
standard language for storing, manipulating and retrieving data in databases.
CHAPTER 2
DESIGN
2.1 REQUIREMENTS AND CONSTRAINT
Feature to view games based on platform or genre
Feature to sign up
Feature to login
Feature to add publisher details
Feature to add developer details
Feature to add game details
Feature to view details of games, publishers or developers
2.2 ENTITIES
Entity Description
Technologies used:
2.4 ER DIAGRAM
This relationship diagram shows how the tables in the database are connected to each
other and how the controls flows from one table to another when some action triggered by the
user. It also shows the constraints on the database such as primary key constraints, foreign
key constraints and procedures and trigger. Entity Relationship Diagram also called as ER
Diagram.When documenting a system or process, looking at the system in multiple ways
increases the understanding of that system. ERD diagrams are commonly used in conjunction
with a data flow diagram to display the contents of a data store. They help us to visualize how
data is connected in a general way, and are particularly useful for constructing a relational
database.The database is normalized up to 3rd normal form. That is the tables in the database
has multimedia fields (attributes) and there will be one primary key in each table that
uniquely identifies the each tuple in the table.
The Schema Diagram gives us the information about the attributes in the table of the
database and how the given tables are related to each other. The term schema refers to the
organization of data as a blueprint of how the database is constructed (divided into database
tables in the case of relational databases). The formal definition of the database scheme is set
of formulas (sentences) called integrity constraints is imposed on the database.. Relational
schema shows references among fields in the databases. When a primary key is referenced in
another table in the database, it is called the foreign key. This is denoted by an arrow with the
head pointing at the referenced key attributes. A schema diagram helps organize values in the
database. It also gives an idea of what order the table should be created in. the following
diagram shows the schema diagram for the database.
CHAPTER 3
IMPLEMENTATION
3.1 TECHNOLOGIES USED
FRONT END
HTML: Hypertext Mark-up Language (HTML) is the standard mark-up language for
creating web pages and web applications. With Cascading Style Sheets (CSS)
and JavaScript it forms a triad of cornerstone technologies for the World Wide Web. Web
browsers receive HTML documents from a web server or from local storage and render them
into multimedia web pages. HTML describes the structure of a web page semantically and
originally included cues for the appearance of the document.HTML elements are the building
blocks of HTML pages. With HTML constructs, images and other objects, such as forms,
may be embedded into the rendered page. It provides a means to create structured
documents by denoting structural semantics for text such as headings, paragraphs, lists, links,
quotes and other items. HTML elements are delineated by tags, written using angle brackets.
Tags such as <img/> and <input /> introduce content into the page directly. Others such
as <p>...</p> surround and provide information about document text and may include other
tags as sub-elements. Browsers do not display the HTML tags, but use them to interpret the
content of the page.
JSP: Java Server Page is a server-side scripting language designed primarily for web
development. Features of JSP:
Extension to Servlet :- as it has all features of servlets, implicit objects and custom
tags
BOOTSTRAP: Bootstrap is a front-end web framework that was created by Twitter for
faster creation of device responsive web applications. Bootstrap can also be understood
mostly as a collection of CSS classes that are defined in it which can simply be used directly.
It makes use of CSS, Javascript, jQuery etc. in the background to create style, effects and
actions for Bootstrap elements.
You might know that we use CSS for styling webpage elements and create classes and assign
classes to webpage elements to apply style on them. Bootstrap here makes the designing
simpler since we only have to include Bootstrap files and mention Bootstrap’s predefined
class names for our webpage elements and they will be styled automatically through
Bootstrap. Through this we get rid of writing our own CSS classes to style web page
elements. Most importantly Bootstrap is designed in such a way that it makes your website
device responsive. You can also use foundation framework for the same purpose. Bootstrap
make you free from writing lot of CSS code and it also saves your time that you spend for
designing the webpages.
CSS: Cascading Style Sheets is a style sheet language used for describing
the presentation of a document written in a markup language. Although most often used to set
the visual style of web pages and user interfaces written in HTML and XHTML, the language
can be applied to any XML document, including plain XML, SVG and XUL, and is
applicable to rendering in speech, or on other media. Along with HTML and JavaScript, CSS
is a cornerstone technology used by most websites to create visually engaging web pages,
user interfaces for web applications, and user interfaces for many mobile applications.
CSS is designed primarily to enable the separation of presentation and content, including
aspects such as the layout, colors, and fonts. This separation can improve
content accessibility, provide more flexibility and control in the specification of presentation
characteristics, enable multiple HTML pages to share formatting by specifying the relevant
CSS in a separate .CSS file, and reduce complexity and repetition in the structural content.
BACK END
Tomcat is developed and maintained by an open community of developers under the auspices
of the Apache Software Foundation, released under the Apache License 2.0 license.
Eclipse contains a base workspace and an extensible plug-in system for customizing the
development environment. Eclipse is thus also a framework in addition to an IDE and can be
extended to have more features and functionalities through the use of plugins.
Module 1: UserCred
Register.html: Consists of HTML form to register user and store information and
credentials in Usercred table.
Login.html: Consists of HTML form that takes in user credentials to authorize login.
Module 2 : Publisher
AddPublisher.jsp: Consists of a form to input publisher details that is going to be
stored in the publisher table.
The publisher table is created using the following code:
create table publisher(pname varchar(30) primary key,
padd varchar(50));
Description of attributes of publisher table:
pname - Publisher name: is the name of publishing company.
padd - Publisher address: is the location of publishing company.
Module 3 : Game
AddGame.jsp: Consists of form to insert game details.
The game table is created using the code:
create table game(title varchar(30) primary key,
year decimal(4),
pname varchar(30) references publisher(pname));
Description of attributes of game table:
Title - is the name of the game.
year - is the year in which the game was released.
pname - name of the publishing company.
Module 4: GameGenre
AddGame.jsp: Contains form with checkbox for multivalued attribute genre.
The GameGenre table is created using the code:
create table gamegenre(gname varchar(30) references game(title),
genre varchar(15),
primary key(gname,genre));
Description of attributes of gamegenre table:
gname - name of the game or the title.
genre - the genre or category of the game (multivalued attribute).
Module 5: Sys
AddGame.jsp: Consists of form to add systems on which the game runs.
The sys table is created using the code:
create table sys(gname varchar(30) references game(title),
plat varchar(10),
primary key(gname,plat),
arch cahr(3),
price decimal(5));
Description of attributes of sys table:
gname - is the game name or title.
plat - is the plat form on which the game runs like PC, Android etc.
arch - is the architecture of the system like x32 or x64.
price - is the price of the game for that platform.
Module 6: PlatCount
The PlatCount table is created using the code:
create table platcount(plat varchar(10) primary key,
num int);
Description of attributes of platcount table:
plat - the platform name.
num - the number of games in that platform.(Triggered update)
Module 7: Developer
AddDeveloper.jsp: Consists of a form to add developer details.
The developer table is created using the code:
create table developer(did int not null auto_increment primary key,
dname varchar(30),
pname varchar(30) references publisher(pname) on delete
cascade,
gname varchar(30) references game(title) on delete cascade);
Description of attributes of developer table:
did - Developer id.
dname - Developer name.
pname - Name of the publisher the developer works for.
gname – The game the developer is working on.
Stored Procedure
A procedure (often called a stored procedure) is a subroutine like a subprogram in a
regular computing language, stored in database. There are many useful applications of
SQL procedures within a database or database application architecture. SQL
procedures can be used to create simple scripts for quickly querying transforming,
updating data, generating basic reports, improve application performance,
modularizing applications, and improve overall database design, and database
security.
The following stored procedure is used to retrieve all games that are of platform as
inputted into the procedure as a parameter. The procedure joins tables game and sys
and retrieves information regarding those of the selected platform.
Trigger
Triggers are stored programs, which are automatically executed or fired when some
event occurs. Triggers are written to be executed in response to any of the following
events. A database manipulation (DML) statement (DELETE, INSERT, or UPDATE)
or a database definition (DDL) statement (CREATE, ALTER, or DROP).
The following two triggers are those implemented in the database:
t1 - To increase the count of platform game after insertion on sys table:
create trigger t1 after insert on sys
for each row
update platcount
set num=num+1
where platcount.plat=new.plat;
t2 - To decrease the count of platform game before deletetion on sys table:
create trigger t2 before delete on sys
for each row
update platcount
set num=num-1
where platcount.plat=old.plat;
The database is connected to the front end html using jsp, the code for database connection is
shown below.
Class.forName("com.mysql.jdbc.Driver");
Connection con =DriverManager.getConnection(url, u, p);
PreparedStatement st1=con.prepareStatement("insert into usercred values(?,?,?);”);
st1.setString(1, un);
st1.setString(2, email);
st1.setString(3, pw);
st1.executeQuery();
PreparedStatement st2=con.prepareStatement("select * from usercred;”);
ResultSet rs = st2.executeQuery();
CHAPTER 4
TESTING
CHAPTER 5
SNAPSHOTS
CHAPTER 6
CONCLUSION
Our project is only a humble venture to satisfy the needs to manage their project
work. Several user friendly coding also have adopted. This package shall prove to be a
powerful package in satisfying all the requirements of the videogame database. The objective
of a software planning is to provide a framework that enables the manager to make
reasonable estimates made within a limited time frame at the beginning of the software
project and should be updated regularly as the project progresses.
The website Videogame Database provides an organized system to add games,
publishers and developer details. This reduces the time taken for the person to add them
manually.
BIBLIOGRAPHY
[1]. Fundamentals of Database systems, Ramez Elmasri and Shamkant B.Navathe, 7th edition,
2017, Pearson.
[2]. Database Management System, Ramakrishnan, Gehrke, 3rd edition, 2017, McGraw Hill.
[3]. Silberschatz Korth and Sudarshan, Database Sysetm concepts, 6th edition, McGraw Hill,
2013.
[4]. Apache Tutorials
http://httpd.apache.org/docs/2.0/misc/tutorials.html
[5]. W3Schools
https://www.w3schools.com/
[6]. Stack OverFlow
http://stackoverflow.com
[7]. MySQL Tutorial
www.mysqltutorial.org