Download as pdf or txt
Download as pdf or txt
You are on page 1of 31

NARAYANA E-TECHNO SCHOOL

VELAPPANCHAVADI, CHENNAI-77.

A PROJECT REPORT ON

SUBMITTED TO: SUBMITTED BY:


MRS.P.MALATHY FAHIMA AFSA.B
[DEPARTMENT OF COMPUTER SCIENCE]
CERTIFICATE

This is to certify that FAHIMA AFSA.B of class


XII of NARAYANA E-TECHNO SCHOOL has
done his/her project on GAME DATABASE
MANAGEMENT under the guidance of subject
teacher Mrs.P.Malathy during the academic year
2021-2022 in partial fulfilment of Computer
science practical examination conducted by CBSE
BOARD, NEW DELHI.

Internal Examiner External Examiner

Principal
ACKNOWLEDGMENT

It is with pleasure that I acknowledge my sincere


gratitude to our teacher, P.MALATHY who taught
and undertook the responsibility of teaching the
subject computer science. I have been greatly
benefited from her classes.

I am especially indebted to our Principal


Mrs.RANI THOMAS who has always been a
source of encouragement and support and without
whose inspiration this project would not have been
a successful I would like to place on record
heartfelt thanks to him.
Finally, I would like to express my sincere
appreciation for all the other students for my batch
their friendship & the fine times that we all shared
together.

FAHIMA AFSA.B

CLASS:XII
INDEX

SNO TOPIC PAGENO

1. Introduction

2. Proposed system

3. System requirement

4. Block diagram

5. Flow chart

6. Source code

7. Output

8. Future enhancement

9. Conclusion

10. Bibliography
INTRODUCTION

Video games are electronic games played on a video screen


(normally a television, a built-in screen when played on a
handheld machine, or a computer).
There are many types, or genres, of these games: role playing
games; shooters, first person shooters, side scrollers,
and platformers are just a few.

The provided source code is a simple game management


programmed implementing python language. In this program
several questions are provided to the admin with 5 options in it.
Admin is needed to choose the suitable option available in the
screen.
SYSTEM REQUIREMENTS:

1. Hardware:
✓ Processor
✓ Keyboard
✓ Minimum memory-2GB
2. Software
✓ Operating system –OS7,OS10
✓ Python IDLE
✓ MySQL
WHY WE CHOSE PYTHON ?

Python is popular and widely supported and is quickly ascending to


the forefront of the most popular programming languages in the
world. Writing Python code is easy, which allowed us to speed up
development. For beginner developers Reading Python code is
intuitive, making maintenance a breeze. Python allows to easily test
and also scale up and scale down our database.

Python - the most important benefits of using this


programming language
• Versatile, Easy to Use and Fast to Develop.

• Open Source with a Vibrant Community.

• Has All the Libraries You Can Imagine.

• Great for Prototypes - You Can Do More with Less Code.

• Speed Limitations.

• Not Native to Mobile Environme Problems with Threading.

• Not Native to Mobile Environme


WHY WE CHOSE MySQL?

MySQL is an open-source and freely available Relational Database


Management System (RDBMS) that uses Structured Query Language
(SQL).

It provides excellent features for creating, storing, maintaining and


accessing data, stored in the form of databases and their respective
tables.

A single MySQL database can store several tables at a time and can
store thousands of records in it.

Being an open-source software, it can be freely and easily


downloaded from the site www.mysql.org. MySQL is developed and
supported by a Sweden-based company, MySQL AB.

It is fully secured, reliable, and fast, and possesses far better


functionalities than many other commercial RDBMs available in the
market.

MySQL database system works upon Client/Server architecture. It


constitutes a MySQL server which runs on a machine containing the
databases and MySQL databases (clients), which are connected to
these server machines over a network.
Advantages of MySQL: MySQL provides the following salient
features and advantages:

1. Reliability and Performance: MySQL is a very reliable and high


performance Relational Database Management System.

2. Modifiable: Being an open-source software, MySQL comes with its


source code; so, it is easily modifiable and we can recompile its
associated source code.

3. Multi-Platform Support: MySQL supports several different


platforms like UNIX, Linux, Mac OS X and Microsoft Windows.

4. Powerful Processing Capabilities: MySQL is a powerful, easy,


compatible and fast Relational Database Management System. It can
handle complicated corporate applications and processing
requirements.

5. Integrity (Checks): MySQL provides various integrity checks in


order to restrict the user input and processing.

6. Authorization: MySQL provides DDL commands to check for user


authentication and authorization by restricting access to relations and
views.

7. Powerful Language: All SQL operations are performed at a


prescribed and fixed level, i.e., one SELECT command can retrieve
data from multiple rows and one MODIFY command can edit
multiple rows at a time. These features make SQL a very powerful
language as
compared to other languages where one command can process only a
single record at a time.

8. Reliable: SQL provides a high level of well-defined set of


commands that provides the desirable results without any ambiguity.

9. Freedom of Data Abstraction: SQL provides a greater degree of


abstraction freedom compared to any other procedural language.

10. Complete Language for a Database: Apart from being a strong


query processing language, it can also be used to create, insert, delete
and control access to data in databases.
CODING

def accessdatabase():

creation()

a=input('Do you want to access the Database?(Y/N):')

if a=='Y':

print(" Welcome to GameONe© devlopment's Database ")

print(' What do you plan of doing today? Choose Below ')

print('1 Game Details')

print('2 Game Response Details')

print('3 Leave')

b=int(input('Choice:'))

if b==1:

print(' You wanna access Game Details But Why? ')

print('1 Add New Game') ⇾

print('2 Change Game Details') ⇾

print('3 Delete Game') ⇾

print('4 View Games') ⇾

print('5 Quit') ⇾

c=int(input('Choice:'))

if c==1:

NewGame()

elif c==2:

ModifyDetails()
elif c==3:

DeleteGame()

elif c==4:

ViewGames()

elif c==5:

return

else:

print('Nothing Seemed to Match')

elif b==2:

print(" Game Rating ") 《《《《《《《《《 》》》》》》》》

print('1 New Game Rating') ⇾

print('2 Modify Rating') ⇾

print('3 Delete Rating') ⇾

print('4 View Rating') ⇾

print('5 Quit') ⇾

e=int(input('Choice:'))

If e==1:

NewRating()

elif e==2:

ModifyRating()

elif e==3:

DeleteRating()

elif e==4:

ViewRating()
elif e==5:

return

elif b==3:

return

else:

print("no match")

else:

print("access denied")

def creation():

import mysql.connector

db=mysql.connector.connect(host="localhost",user="root",password="rishWA
NTH",database="game")

cursor=db.cursor()

cursor.execute('CREATE TABLE IF NOT EXISTS Game_Details(GameName


char(30)

primary key,Genre Char(30),TeamSize int not null,ReleaseDate date)')

cursor.execute('CREATE TABLE IF NOT EXISTS Game_Response(GameName


char(30),PlayerBase char(7),Profit int not null)')

def NewGame():

print(' Enter Details’)

g_n = input("Enter game name : ")

ge_n = input("Enter Genre : ")

t_s = int(input("Enter Team Size : "))

R_d = input('Enter Release Date (Format-YYYY-MM-DD) : ')


import mysql.connector

mydb =
mysql.connector.connect(host="localhost",user="root",password="rishWANT",
database="game")

cursor = mydb.cursor()

sql = "INSERT INTO Game_Details( GameName, Genre, TeamSize,


ReleaseDate)

VALUES(%s ,%s ,%s, %s)"

val = (g_n,ge_n,t_s,R_d)

cursor.execute(sql, val)

mydb.commit()

print()

print(' Data Addition is a Success ')

accessdatabase()

def ModifyDetails():

print(' Enter Updated Details ')

g_n = input('Enter Game name : ')

ge_n = input("Enter Updated Genre : ")

t_s = int(input("Enter Updated Team Size : "))

R_d = input('Enter Release Date (Format-YYYY-MM-DD) : ')

import mysql.connector

mydb =

mysql.connector.connect(host="localhost",user='root',password='rishWANTH'

database="game")

cursor = mydb.cursor()
cursor.execute("UPDATE Game_Details SET Genre=%s, TeamSize

=%s,ReleaseDate =%s

WHERE GameName =%s",(ge_n,t_s,R_d,g_n))

mydb.commit()

print()

print(' Data Updation is a Success '

accessdatabase()

def DeleteGame():

print(' ')

g_n = input("Enter game to be deleted:")

import mysql.connector

mydb =

mysql.connector.connect(host="localhost",user='root',password='rishWANTH',
database="game")

cursor = mydb.cursor()

query="DELETE FROM Game_Details WHERE GameName =%s"

cursor.execute(query,(g_n,))

mydb.commit()

print()

print(' Done ')

accessdatabase()

def ViewGames():

import mysql.connector as M
P=
M.connect(host="localhost",user='root',password='rishWANTH',database="ga
me")

L = P.cursor()

L.execute("select * from game_details")

for (GameName,Genre,Teamsize,Releasedate) in L:

print("✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦”)

print("Game → ",GameName)

print("Genre → ",Genre)

print("Team Size → ",Teamsize)

print("ReleaseDate → ",Releasedate)

print("✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦”)

L.close()

print(" And Here it is ")

accessdatabase()

def NewRating():

print(' Enter Details ')

g_n = input("Enter game name : ")

p_b = input("Enter Player Base : ")

p_r = int(input("Enter Profit: "))

import mysql.connector

mydb =

mysql.connector.connect(host="localhost",user='root',password='rishWANTH',
database="game")

cursor = mydb.cursor()
sql = "INSERT INTO Game_Response( GameName, PlayerBase, Profit)
VALUES(%s ,%s ,%s)"

val = (g_n,p_b,p_r)

cursor.execute(sql, val)

mydb.commit()

print()

print(' Data Addition is a Success ')

accessdatabase()

def ModifyRating():

print(' Enter Updated Details ')

g_n = input('Enter Game name : ')

p_b = input("Enter Updated Player Base : ")

p_r = int(input("Enter Profit: "))

import mysql.connector

mydb =

mysql.connector.connect(host="localhost",user='root',password='rishWANTH',
database="game")

cursor = mydb.cursor()

cursor.execute("UPDATE Game_Response SET PlayerBase =%s, Profit =%s


WHERE

GameName =%s", (p_b,p_r,g_n))

mydb.commit()

print()

print(' Data Updation is a Success ')

accessdatabase()
def DeleteRating():

print(' ')

g_n = input("Enter game response to be deleted:")

import mysql.connector

mydb =

mysql.connector.connect(host="localhost",user='root',password='rishWANTH',
database="game")

cursor = mydb.cursor()

query = "DELETE FROM Game_Response WHERE GameName = %s"

cursor.execute(query,(g_n,))

mydb.commit()

print()

print(' Done ')

accessdatabase()

def ViewRating():

import mysql.connector as M

P=
M.connect(host="localhost",user='root',password='rishWANTH',database="ga
me")

L = P.cursor()

L.execute("select * from Game_Response")

for (GameName,PlayerBase,Profit) in L:

print("✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦”)

print("GameName → ",GameName)
print("Player Base → ",PlayerBase)

print("Profit → ",Profit)

print("✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦”)

L.close()

print(" And Here it is ")

accessdatabase()

accessdatabase()
OUTPUT

Python 3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 22:20:52) [MSC


v.1916 32 bit

(Intel)] on win32

Type "help", "copyright", "credits" or "license()" for more


information.

>>>

RESTART:
C:/Users/Rishwanth/AppData/Local/Programs/Python/Python37-
32/game1

project.py

Do you want to access the Database?(Y/N):Y

Welcome to GameONe© devlopment's Database

What do you plan of doing today? Choose Below

1 Game Details ⇾

2 Game Response Details ⇾

3 Leave ⇾

Choice:1

You wanna access Game Details But Why?

1 Add New Game ⇾

2 Change Game Details ⇾


3 Delete Game ⇾

4 View Games ⇾

5 Quit ⇾

Choice:1

Enter Details

Enter game name : ASPHALT9

Enter Genre : racing

Enter Team Size : 8

Enter Release Date (Format-YYYY-MM-DD) : 2020-12-26

Data Addition is a Success

Do you want to access the Database?(Y/N):Y

Welcome to GameONe© devlopment's Database

What do you plan of doing today? Choose Below ⬇ ⬇

1 Game Details ⇾

2 Game Response Details ⇾

3 Leave ⇾

Choice:3

You wanna access Game Details But Why?

1 Add New Game ⇾

2 Change Game Details ⇾

3 Delete Game ⇾
4 View Games ⇾

5 Quit ⇾

Choice:2

Enter Updated Details

Enter Game name : FIFO

Enter Updated Genre : shooting

Enter Updated Team Size : 3

Enter Release Date (Format-YYYY-MM-DD) : 2021-03-30

Data Updation is a Success

Do you want to access the Database?(Y/N):Y

Welcome to GameONe© devlopment's Database

What do you plan of doing today? Choose Below ⬇ ⬇

1 Game Details ⇾

2 Game Response Details ⇾

3 Leave ⇾

Choice:1

You wanna access Game Details But Why?

1 Add New Game ⇾

2 Change Game Details ⇾

3 Delete Game ⇾

4 View Games ⇾
5 Quit ⇾

Choice:3

Enter game to be deleted:freefire

Done

Do you want to access the Database?(Y/N):Y

Welcome to GameONe© devlopment's Database

What do you plan of doing today? Choose Below ⬇ ⬇

1 Game Details ⇾

2 Game Response Details ⇾

3 Leave ⇾

Choice:1

You wanna access Game Details But Why?

1 Add New Game ⇾

2 Change Game Details ⇾

3 Delete Game ⇾

4 View Games ⇾

5 Quit ⇾

Choice:4

✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦

Game → ASPHALT9

Genre → racing
Team Size → 8

ReleaseDate → 2020-12-26

✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦

✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦

Game → FIFO

Genre → shooting

Team Size → 3

ReleaseDate → 2021-03-30

✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦

✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦

Game → Lycoas

Genre → chemical reaction

Team Size → 1

ReleaseDate → 2020-12-12

✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦

✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦

Game → PKXD

Genre → collecting coins

Team Size → 4

ReleaseDate → 2020-12-03

✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦
✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦

Game → subway surfers

Genre → haunting

Team Size → 3

ReleaseDate → 2021-03-11

✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦

✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦

Game → temple run

Genre → chasing

Team Size → 1

ReleaseDate → 2020-12-02

✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦

And Here it is

Do you want to access the Database?(Y/N):Y

Welcome to GameONe© devlopment's Database

What do you plan of doing today? Choose Below ⬇ ⬇

1 Game Details ⇾

2 Game Response Details ⇾

3 Leave ⇾

Choice:2

Game Rating
1 New Game Rating ⇾

2 Modify Rating ⇾

3 Delete Rating ⇾

4 View Rating ⇾

5 Quit ⇾

Choice:1

Enter Details

Enter game name : ASPAULT9

Enter Player Base : 400

Enter Profit: 3400000

Data Addition is a Success

Do you want to access the Database?(Y/N):Y

Welcome to GameONe© devlopment's Database

What do you plan of doing today? Choose Below ⬇ ⬇

1 Game Details ⇾

2 Game Response Details ⇾

3 Leave ⇾

Choice:2

Game Rating

1 New Game Rating ⇾

2 Modify Rating ⇾
3 Delete Rating ⇾

4 View Rating ⇾

5 Quit ⇾

Choice:4

✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦

GameName → freefire

Player Base → M

Profit → 23000

✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦

✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦

GameName → ASPAULT9

Player Base → 400

Profit → 3400000

✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦✦

And Here it is

Do you want to access the Database?(Y/N):Y

Welcome to GameONe© devlopment's Database

What do you plan of doing today? Choose Below ⬇ ⬇

1 Game Details ⇾

2 Game Response Details ⇾

3 Leave ⇾
Choice:1

You wanna access Game Details But Why?

1 Add New Game ⇾

2 Change Game Details ⇾

3 Delete Game ⇾

4 View Games ⇾

5 Quit ⇾

Choice:5
CONCLUSION

I HAVE SUCCESSFULLY COMPLETED OUR PROJECT “GAME


DEVELOPMENT” IN PYTHON WITH MYSQL CONNECTOR. THE
TIME I TOOK FOR COMPLETING OUR PROJECT WAS ROUGHLY
1 WEEK.
BIBLIOGRAPHY:
1.Computer science with python(PREETHI
ARORA)
2.The complete refrence python(MARTIN C.
BROWN)
3.https://techvidvan.com/tutorials/python-
advantages-and-disadvantages/

You might also like