Database Management System
Database Management System
Karnataka- 590018
A
Mini Project Report
On
“ART GALLERY MANAGEMENT SYSTEM”
Submitted in partial fulfilment of the requirements for the DBMS Laboratory with mini project
(18CSL58) course of the 5th semester
BACHELOR OF ENGINEERING
IN
COMPUTER SCIENCE AND ENGINEERING
Submitted by,
SANJANA S YASHASVI G M
1JS20CS142 1JS20CS187
Under the guidance of
Mrs. K S Rajeshwari Mrs. Pooja H
Assistant Professor, Dept of CSE Assistant Professor, Dept of CSE
JSSATE, Bengaluru JSSATE, Bengaluru
CERTIFICATE
This is to certify that the mini-project work entitled "ART GALLERY MANAGEMENT
SYSTEM" is a Bonafide work carried out by Ms. SANJANA S (1JS20CS142) and Ms.
YASHASVI G M (1JS20CS187) in partial fulfilment for the Database Management Systems
Laboratory with Mini Project (18CSL58) of 5th semester Bachelor of Engineering in
Computer Science and Engineering of the Visvesvaraya Technological University,
Belgaum during the academic year 2022-2023. It is certified that all corrections and
suggestions indicated for Internal Assessment have been incorporated in the report deposited
in the department library. The project report has been approved as it satisfies the academic
requirements in respect of project work prescribed for the said degree.
1) ……………………………… 1) ……………………………
2) ……………………………… 2) ……………………………
ABSTRACT
This report is meant to serve as a guide for our project – Art Gallery Management System. It
not only describes our project but also states its importance. This report describes the technical
requirements of our project and also input and output views which would interact with the
application. The material present in this report has been designed so well that it will be in good
use to the user.
Online Art Gallery is an e-commerce application software and it is very helpful for the art
lovers and others who wants to know the venue where this kind of arts will be sold. This
application helps the customers to search for their arts and paintings as well as can place order
for the selected pieces. The user can also get information about the art exhibition so they can
visit those exhibitions.
There will be two types of user’s roles in the website, the first one is the customer who can
search and discover the art. If they want to buy any art they have to register and login to buy the
art. The second one is the admin who has to login to post the artworks of the artist for exhibiting
and selling on the website. The admin also specifies authority and restrictions on the users. He
looks into the feedback of the customer and accounts of the artworks sold.
i
ACKNOWLEDGEMENT
We express my humble pranamas to His Holiness Jagadguru Sri Sri Sri Shivarathri
Deshikendra Mahaswamiji who has showered their blessings on us for framing our career
successfully.
We express our sincere thanks to our beloved principal, Dr. Bhimasen Soragaon for having
supported us in our academic endeavours.
We are also indebted to Dr. P B Mallikarjuna, Head of Department of Computer Science and
Engineering for the facilities and support extended towards us.
We are thankful to the resourceful guidance, timely assistance and graceful gesture of our guide
Mrs. K S Rajeshwari, Assistant Professor, Department of Computer Science and Engineering,
and Mrs. Pooja H, Assistant Professor, Department of Computer Science and Engineering, who
has helped us in every aspect of our project work.
And last but not the least, we would be very pleased to express our heart full thanks to all the
teaching and non-teaching staff of CSE department and our friends who have rendered their
help, motivation and support.
The completion of any project involves the efforts of many people. We have been lucky enough
to have received a lot of help and support from all quarters during the making of this project so
with gratitude, we take this opportunity to acknowledge all those who have given guidance and
encouragement helped us emerge successful.
SANJANA S
1JS20CS142
YASHASVI G M
1JS20CS187
ii
LIST OF CONTENTS
Chapter Title Page No.
ABSTRACT i.
ACKNOWLEDGEMENT ii.
LIST OF CONTENTS iii.
LIST OF FIGURES v.
Chapter 1 INTRODUCTION
1.1 INTRODUCTION TO DBMS 1
1.2 INTRODUCTION TO SQL 2
1.3 PROJECT INTRODUCTION 3
1.4 OBJECTIVE OF THE PROJECT 4
Chapter 2 DESIGN
2.1 ENTITY TYPES 5
2.2 ENTITY SET 5
2.3 ATTRIBUTES 5
2.3.1 TYPES OF ATTRIBUTES 6
2.4 RELATIONSHIP TYPES 6
2.5 STRUCTURAL CONSTRAINTS 7
2.6 MIN-MAX NOTATIONS 7
2.7 ER TO RELATIONAL MAPPING 8
2.8 ER DIAGRAM 9
2.9 ER DIAGRAM OF ART GALLERY 10
2.10 RELATIONAL SCHEMA 11
2.11 KEYS IDENTIFICATION 12
2.11.1 KEYS
2.11.2 WHY KEYS ARE REQUIRED
2.11.3 TYPES OF KEYS
iii.
3.4 OPERATING SYSTEM 16
3.5 FUNCTIONAL REQUIREMENTS 17
3.6 NON-FUNCTIONAL REQUIREMENTS 18
3.7 METHODS USED IN BACK END (PHP) 19
3.8 CLASS DIAGRAM 22
Chapter 4 IMPLEMENTATION
4.1 CODE SNIPPET 23
4.2 TABLE DESCRIPTION 32
4.3 CREATION OF TABLES 35
4.4 INSERTION OF TUPLES 37
4.5 COMMANDS 39
4.6 QUERIES 40
4.7 TRIGGERS 42
Chapter 5 RESULT
5.1 FRONT END
5.1.1 HOME PAGE 43
5.1.2 CUSTOMER SIDE 44
5.1.3 ADMIN SIDE 47
5.2 BACK END 48
Chapter 6 CONCLUSION 51
Chapter 7 REFERENCES 53
iv
LIST OF FIGURES
Figure Page. No
v
Art Gallery Management System
Chapter 1
INTRODUCTION
Database Management Systems (DBMS) are software systems used to store, retrieve, and run
queries on data. A DBMS serves as an interface between an end-user and a database, allowing
users to create, read, update, and delete data in the database.
DBMS manage the data, the database engine, and the database schema, allowing for data to be
manipulated or extracted by users and other programs. This helps provide data security, data
integrity, concurrency, and uniform data administration procedures. DBMS offer many benefits
over traditional file systems, including flexibility and a more complex backup system. Database
management systems can be classified based on a variety of criteria such as the data model, the
database distribution, or user numbers.
There is a wide range of database software solutions, including both enterprise and open-source
solutions, available for database management.
Here are some of the most popular database management systems:
Oracle
Oracle Database is a commercial relational database management system. It utilizes enterprise-
scale database technology with a robust set of features right out of the box. It can be stored in the
cloud or on-premises.
MySQL
MySQL is a relational database management system that is commonly used with open-source
content management systems and large platforms like Facebook, Twitter, and You-Tube.
SQL Server
Developed by Microsoft, SQL Server is a relational database management system built on top of
structured query language (SQL), a standardized programming language that allows database
administrators to manage databases and query data.
SQL which is an abbreviation for Structured Query Language is a language to request data
from a database, to add, update, or remove data within a database, or to manipulate the metadata
of the database.
Sometimes SQL is characterized as non-procedural because procedural languages generally
require the details of the operations to be specified, such as opening and closing tables, loading
and searching indexes, or flushing buffers and writing data to file systems. Therefore, SQL is
designed at a higher conceptual level of operation than procedural languages.
SQL was one of the first commercial languages to use Edgar F. Codd’s relational model. The
model was described in his influential 1970 paper, "A Relational Model of Data for Large
Shared Data Banks". Despite not entirely adhering to the relational model as described by Codd,
it became the most widely used database language.
The topic of our mini project is Online Art Gallery Management. This would be an online
website where people buy artworks. Our website consists of all kinds of paintings, fine arts,
photography, and many kinds of artworks. The system is specially designed for the analysis of
the data that is stored about the sales of purchase and art images. The “Online Art Gallery” has
been developed to override the problems prevailing in the practicing of manual system.
Moreover, this system is designed for the particular need of the company to carry out operations
in a smooth and effective manner.
This website contains homepage, about us, customer registration, contact us, admin and
customer login. The first page is home page which gives the summary of the website whatever
the website contains. Second page contains the about page which contains the information of the
website. Third page is the contact us page where customer can contact the website for further
details regarding the artworks and the admin shall look into it. From home page we can navigate
other pages such as admin and customer login. The purpose of Online Art Gallery is to automate
the existing manual system by the help of computerized equipment and full-fledged computer
software, fulfilling requirements, so that their valuable data can be stored for a longer period
with easy access and manipulating the same.
Where the admin of the website maintains the records of the customer in book. The data of the
artworks are stored securely and users can access data only when they register to the website
first. Art Gallery brings you the opportunity to view online art exhibitions at our Online Art
Gallery. We bring you the details of all the art exhibitions to be held in the forthcoming show.
The Online Art Gallery is updated daily, so the user can and buy the latest collection of
contemporary art online from any where in the world. You can view and buy the latest Indian
Contemporary Art collection available at their exhibitions and also at their online gallery
website. This application helps the end-users to search their arts and paintings and can place
order for the selected pieces. The end-user can also get the information about the art exhibition
and the respective address, so that they can to those exhibitions.
[1] To manage the details of gallery, exhibition, artwork and artist. It manages all the sales and
inventory in the gallery. The purpose of the project is to build and application program to
reduce the manual work.
[2] To tracks all the details about the sales of the artwork, the customer that bought it, etc. It
manages the information about the artwork. Provides an information and description of the
artworks left, thereby increasing the efficiency of managing the gallery. The organisation
can maintain a computerized record of the artwork present in the gallery.
[3] To help in the utilization of the resources in an effective manner. It maintains a list of all the
customers and the various artwork that they have bought and the money that have invested
in each.
[4] To maintains the record of exhibitions and various sales made during it. The objective of
developing such computerized system is to reduce the paper work and safe of time in art
gallery database management, thereby increasing the efficiency and decreasing the work
load.
[5] To develop such computerized system is to reduce the paper work and safe of time in art
gallery database management, thereby increasing the efficiency and decreasing the work
load.
Chapter 2
DESIGN
2.3 ATTRIBUTES
Attributes are characteristics or properties of an entity in a database. They are used to describe
the entity and are typically represented as columns in a table. Each attribute has a name and a
data type, such as text, numbers, date, etc.
In our database the table ‘art info’ contains attributes such as (art id, art name, art type, art price,
art discount, art file, artist name, unique code)
Simple Attribute: An attribute that cannot be further subdivided into components is a simple
attribute.
In our database, customer id is simple attribute.
Composite Attribute: An attribute that can be split into components is a composite attribute.
In our database, ‘customer Fname’ and ‘customer Lname’ are composite attributes.
Single-Valued Attribute: The attribute which takes up only a single value for each entity
instance is a single-valued attribute.
In our database, ‘Art id’ is single valued.
Multi-Valued Attribute: The attribute which takes up more than a single value for each entity
instance is a multi-valued attribute.
In our database, there exists a multivalued attribute that is ‘Event Category’.
Event Category= {painting, fine art}
Derived Attribute: An attribute that can be derived from other attributes is derived attributes.
Stored attribute: The stored attributes are those attributes which doesn’t require any type of
further update since they are stored in the database.
For example, the Age and Birth date attributes of a person, the value of Age can be determined
from the current (today’s) date and the value of that person’s Birth date The Age attribute is
hence called a derived attribute Birth date attribute is called a stored attribute.
Complex attribute: Those attributes, which can be formed by the nesting of composite and
multi-valued attributes, are called complex attribute. These attributes are rarely used in DBMS
(Data Base Management System). That’s why they are not so popular. composite and
multivalued attributes can be nested arbitrarily arbitrary nesting by grouping components of a
composite attribute between parentheses () and separating the components with commas, and by
displaying multivalued attributes between braces {}. Such attributes are called complex
attributes.
NULL Value Attributes: In some cases, a particular entity may not have an applicable value for
an attribute.
One-to-one: A relationship in which one record in a table is related to one and only one record
in another table.
One Customer can make one payment.
Hierarchical: A relationship in which one record in a table is related to one or more records in
the same table, creating a parent-child relationship.
Associative: A relationship in which two or more tables are related through an additional table,
also known as a join table or junction table.
Structural constraints are rules and limitations that are placed on the design and structure of a
database in order to maintain its integrity and consistency. These constraints are used to define
the relationships between tables and columns, and to ensure that data is entered and stored in a
consistent and predictable manner.
In an Entity-Relationship (ER) diagram, the "min" and "max" notation is used to indicate the
minimum and maximum cardinality of a relationship between two entities. Cardinality refers to
the number of instances of one entity that can be associated with each instance of another entity.
Step 1: For each regular (strong) entity type E in the ER schema, create a relation R that
includes all the simple attributes of E.
Step 2: For each weak entity type W in the ER schema with owner entity type E, create a
relation R, and include all simple attributes (or simple components of composite attributes) of W
as attributes. In addition, include as foreign key attributes of R the primary key attribute(s)of the
relation(s) that correspond to the owner entity type(s).
Step 3: For each binary 1:1 relationship type R in the ER schema, identify the relations S and T
that correspond to the entity types participating in R. Choose one of the relations, say S, and
include the primary key of T as a foreign key in S. Include all the simple attributes of R as
attributes of S.
Step 4: For each regular binary 1:N relationship type R identify the relation (N) relation S. the
primary key of T as a foreign key of S. Simple attributes of R map to attributes of S.
Step 5: For each binary M:N relationship type R, create a relation S. Include the primary keys of
participant relations as foreign keys in S. Their combination will be the primary key for S.
Simple attributes of R become attributes of S.
Step 6: For each multi-valued attribute A, create a new relation R. This relation will include an
attribute corresponding to A, plus the primary key K of the parent relation (entity type or
relationship type) as a foreign key in R. The primary key of R is the combination of A and K.
Step 7: For each n-ary relationship type R, where n>2, create a new relation S to represent R.
Include the primary keys of the relations participating in R as foreign keys in S. Simple
attributes of R map to attributes of S. The primary key of S is a combination of all the foreign
keys that reference the participants that have cardinality constraint > 1. For a recursive
relationship, we will need a new relation.
2.8 ER DIAGRAM
The Figure 2.1 explains the structure of the database, i.e., it depicts the number, type and name
of the entities, the number, type and name of the attributes in each entity, the relationship between
the entities, and the constraints.
The Figure 2.2 shows the relational schema diagram of our database i.e Art Gallery Management
system. It dipicts the database structure logically. It uses tables to show the relationship between
the entities. Each table should have atleast one primarey key.
Foreign Key:
Foreign Key is used to establish relationships between two tables. A foreign key will require
each value in a column or set of columns to match the Primary Key of the referential table.
Foreign keys help to maintain data and referential integrity. They are essential for maintaining a
difference between two entities that might be linked with the same information but do not share
similar information. Figure 2.2 shows foreign key attributes in relational schema diagram.
Example
[1] In the Booking Table we have the foreign keys cust_id which is from the
table Customer and art_id which is from the table Art.
[2] In the Feedback Table we have the foreign keys cust_id from the table
Customer and email_id from the table Customer itself.
[3] In the Payment table we have the foreign keys bart_id from the table
Booking and cust_id from the table Customer.
Super Key:
Super Key is the set of all the keys which help to identify rows in a table uniquely. This means
that all those columns of a table than capable of identifying the other columns of that table
uniquely will all be considered super keys. Super Key is the superset of a candidate key. The
primary Key of a table is picked from the super key set to be made the table’s identity attribute.
Candidate Key:
Candidate keys are those attributes that uniquely identify rows of a table. The Primary Key of a
table is selected from one of the candidate keys. So, candidate keys have the same properties as
the primary keys. There can be more than one candidate keys in a table. There can be more
candidate keys than just one for any table, but they can never be empty.
Unique Key:
Unique Key is a column or set of columns that uniquely identify each record in a table. All
values will have to be unique in this Key. A unique Key differs from a primary key because it
can have only one null value, whereas a primary Key cannot have any null values.
Chapter 3
SYSTEM REQUIREMENTS
HTML: HTML (Hypertext Markup Language) is the standard language used to create web
pages. It uses a system of tags and attributes to structure and format the content of a webpage,
including text, images, and links. HTML documents are viewed in web browsers and are
rendered into a visual representation of the page, which can include text, images, videos, and
interactive elements. HTML is the foundation of all websites and is used in conjunction with
other languages such as CSS and JavaScript to create dynamic and interactive web pages.
CSS: CSS (Cascading Style Sheets) is a language used to control the presentation and layout of
HTML documents. It allows developers to separate the presentation of a webpage from its
structure and content, defined in HTML. With CSS, you can control the colours, fonts, spacing,
and overall layout of a webpage, as well as add visual effects such as hover states, animations,
and transitions. CSS can be written in separate files or included in the same document as the
HTML, and it can be applied to individual elements or groups of elements on a webpage. It's a
powerful tool that allows developers to create visually appealing and consistent designs across
multiple web pages and devices.
JQUERY: JQuery is a fast, small, and feature-rich JavaScript library. It makes HTML
document traversal and manipulation, event handling, and animation much simpler with an easy-
to-use API that works across a multitude of browsers. With a combination of versatility and
extensibility, jQuery has changed the way that millions of people write JavaScript.
AJAX: Ajax (short for Asynchronous JavaScript and XML) is a set of web development
techniques used for creating interactive and responsive web applications. It allows for the
creation of dynamic web pages without the need for a page refresh. This is achieved by using
JavaScript to make asynchronous requests to a server, and updating only the relevant parts of the
page with the new data. This allows for a smoother, faster user experience and enables web
developers to create more complex and interactive applications. jQuery provides a convenient
API for making Ajax requests, which makes it easy to use in a web development project.
PHP v8.0.7: Dynamic and interactive websites. PHP is executed on the server, and the results
are sent to the browser as plain HTML. This allows PHP to handle tasks such as reading and
writing to files, sending and receiving cookies, and creating and manipulating databases. PHP
can be integrated with a variety of web development technologies, including HTML, CSS, and
JavaScript. It is often used in conjunction with other web development technologies such as
MySQL (a popular open-source database management system) to create dynamic and interactive
web applications. PHP is also often used for creating RESTful web services, that can be
consumed by other systems. PHP is widely supported by web hosting providers, making it easily
accessible and easy to run on a variety of platforms, including Windows, Linux, and MacOS. It's
one of the most popular server-side scripting language and has a large community support and
many frameworks built on top of it, like Laravel, CodeIgniter, Cake PHP and many more.
XAMPP v3.3.0: XAMPP is a free, open-source, and cross-platform web server solution that
allows developers to create and test web applications on their local machines. XAMPP stands for
Cross-Platform (X), Apache (A), MariaDB (M), PHP (P) and Perl (P). It is a package of software
components that includes Apache web server, MariaDB (MySQL) database, PHP, and Perl
programming languages. This bundle allows developers to set up a local web server environment
with the necessary components to run PHP and MySQL-based web applications without the
need for an internet connection. XAMPP is easy to install and use, and it is particularly popular
among developers working on WordPress, Joomla, and other PHP-based web applications. With
XAMPP, developers can test their code and see how it behaves on a live web server, without
having to upload it to a remote web server. This can save time and money, and it also allows
developers to work offline. my local webserver that has a PHP Version 8.0.7
Minimum Windows 7
Admin Side:
Home Page
List of customers
Modify customer bookings
List of artworks
Add new artworks
Modify artworks
Manage feedbacks
List of exhibition events
Add exhibition events
Modify exhibition events
View Booking details
View Payment Details
Login and Logout
Customer Side:
Customer Register
Welcome page
View Artworks
Booking artworks
View booking details
Cancel booking
Giving feedbacks
View payment details
View upcoming exhibition events
Login and Logout
Non-functional requirements specify criteria that can be used to judge the operation of a system as
a whole rather than specific behaviours. They describe emergent properties like security,
performance, and availability and, unlike the functional requirements that can be worked around,
are essential to fulfil for a usable system. The estimation of whether the product fulfils the non-
functional requirement or not usually reduces to a Boolean answer: yes or no.
For an online art gallery management system, the most important non-functional requirements
include security, performance, usability, and availability.
Security:
Art Gallery Management Systems are notorious for being subject to malicious attacks, so
security is the major requirement for the system. Unauthorized access to the data is not
permissible. The data must be backed up daily and stored in a secured location, at a distance
from different facilities of the system. The system also must employ firewall software as a
defence against network attacks.
Accept only secure passwords that have sufficient length and non-alphabetic characters, and
block login attempts after several unsuccessful trials. Artworks are only viewed when a customer
registers first.
Performance:
The art gallery management system is a multi-client system that must reach response time targets
for each of the clients during simultaneous calls and must be able to run a target number of
bookings per second without failure. The system must effectively utilize the hardware and
energy resources to minimize operational costs.
Usability:
The system must provide different graphical interfaces for customers and admins. All system
interfaces must be user-friendly and simple to learn, including helping hints and messages and
intuitive workflow, especially in a client interface: the client must be able to fast learn and use the
interface without prior knowledge of banking terminology or rules. The interfaces must
automatically adjust to devices with different screen sizes, and allow to change typeface size and
colour scheme to improve readability.
Reliability:
The application should be highly reliable and it should generate all the updated information in
correct order.
Availability:
The system must be available during all the hours. The cash on delivery service and booking
service must be available round-the-clock with minimal maintenance times, reaching 99.999%
availability time per year.
Software Requirements:
Software requirements specification (SRS) is the description of the software system that is going
to be developed, it is made at the latest phase of analysis, after the functional and non- functional
requirements.
Function add_exhibition_events()
{
$sql = "INSERT INTO exhibition_events (event_name, event_about, event_category,
event_venue, event_date, event_time, event_photo) VALUES ('$a11', '$a12', '$a13', '$a14',
'$a15', '$a16','$target_path')"; // this is an insert query for add product
if (mysqli_query($con, $sql))
{
echo "<script>alert('Your Exhibition & Events has been added!');
window.location.assign('add_exhibitionevents.php') </script>";
}
else {
echo "Error: " . $sql . "<br>" . mysqli_error($con);
}}
Function add_product() {
$sql = "INSERT INTO art_info (art_name, art_category, art_price, art_discount, art_photo,
art_detail) VALUES ('$a11', '$a12', '$a13', '$a14', '$target_path', '$a16')"; // this is an insert
query for add product
if (mysqli_query($con, $sql)) {
echo "<script>alert('Your Product has been added!');
window.location.assign('add_product.php') </script>";
} else {
echo "Error: " . $sql . "<br>" . mysqli_error($con);
} }
Function delete_customer_detail()
{
$sql = "select * from customer_info"; // this is query for fetching all customer details.
$run = mysqli_query( $con, $sql );
echo "<table class='divform'>
<tr>
<th>customer Id</th>
<th>customer password</th>
<th>customer Email</th>
<th>customer FirstName</th>
<th>customer LastName</th>
<th>customer sex</th>
<th>customer Phone</th>
<th>customer state</th>
<th>customer Place</th>
<th>customer Address</th>
<th>Delete</th>
</tr>";
while ( $result = mysqli_fetch_array( $run ) ) { // this is function for fetching the data as
an array.
echo "<tr>
<td>$result[0]</td>
<td>$result[1]</td>
<td>$result[2]</td>
<td>$result[3]</td>
<td>$result[4]</td>
<td>$result[5]</td>
<td>$result[6]</td>
<td>$result[7]</td>
<td>$result[8]</td>
<td>$result[9]</td>
<td><a class='button special-red' href='delete_customer_now.php?id=$result[0]'
class='btn btn-danger'>delete</a></td>
</tr>";
}}
Function update_exhibition() {
$up = "update exhibition_events set event_name='$a', event_about='$b',
event_category='$c' event_venue='$d', event_date='$e',event_time='$f',
event_photo='$target_path', event_photo_disp='$target_path_disp' where ex_id='$r'"; // this
query for updating Exhibition & Events Details1
if ( mysqli_query( $con, $up ) ) {
echo " <script> alert('Exhibition & Events Details Updated Successfully');
window.location.assign('manage_exhibitionevents.php') </script>";
} else {
echo "Exhibition & Events Details Updated Occure Error";
}}
Function delete_exhibition_events() {
$up="delete from exhibition_events where ex_id='$a'"; // this is query for removing
exhibition_events detail.
$run=mysqli_query($con, $up);
if($run){
if(file_exists($g)){
unlink($g);
}
echo " <script>confirm('Exhibition and Events Details Successfully Removed');
window.location.assign('manage_exhibitionevents.php') </script>" }
else{
echo "not ok"; }
}
Additionally, there are several foreign key relationships between the classes. For example, the
bart_id attribute in the booking_info class is a primary key that references the pay_id attribute in
the payment_info class. Similarly, the cust_id attribute in the feedback_info class is a foreign
key that references the id attribute in the cust_info class.
Chapter 4
IMPLEMENTATION
if (mysqli_query($con, $sql))
{
$customerid=mysqli_insert_id($con);
$sql1= "select * from customer_info where cust_email='".$mail."' and
cust_pwd='".$pass."'"; //This is query for login.
$result = mysqli_query($con, $sql1);
if (mysqli_num_rows($result) > 0) {
// output data of each row
if($row = mysqli_fetch_assoc($result))
{
$_SESSION["uid"]=$row["cust_id"];
$_SESSION["name"]=$row["cust_Fname"];
}
echo "<script>window.location.assign('customer/')</script>";
}
}
else {
echo "<script>alert('This Email Id has used. Please use other Email ID');
window.location.assign('index.php?page=customer_register')</script>";
}
}
mysqli_close($con);
?>
BOOKING BY CUSTOMER
<?php include("header/header.php");?>
<?php
if($_SESSION["uid"] == "" || $_SESSION["uid"]==NULL)
{
header('Location:../customer/');
}
else{
$cid = $_SESSION["uid"];
$cn=$_SESSION["name"];
}?>
<?php
$aid=$_GET['id'];
$run_art=mysqli_query($con,"select * from art_info where art_id=$aid"); //
$art_result=mysqli_fetch_array($run_art);
$_SESSION['aart'] = $aid;?>
<section>
<!--this is form for booking-->
<div class="back-img back-img1">
<div class="container divform">
<h2>Booking</h2>
<form action="" method="post" name="f1">
<div class="form-group">
<label for="a1">Customer Id:</label>
<input type="number" class="form-control" id="a1" name="custid"
placeholder="Enter Id" readonly value="<?php echo $cid;?>" >
</div>
<div class="form-group">
<label for="a2">Art_Id:</label>
<input type="number" class="form-control" id="a2" name="arid" readonly
value="<?php echo $aid;?>">
</div>
<div class="form-group">
<label for="a3"> Name:</label>
<input type="text" class="form-control" id="a3" name="cname" readonly
required value="<?php echo $cn;?>">
</div>
<div class="form-group">
<label for="a4"> Art_Name:</label>
<input type="text" class="form-control" id="a4" name="aname" readonly
value="<?php echo $art_result[1];?>">
</div>
<div class="form-group">
<label for="a5">Order_Status:</label>
<input type="text" class="form-control" id="a5" name="os" readonly
value="Available"></div>
<div class="form-group">
<label for="a6">Delivery_Address:</label>
<input type="text" class="form-control" id="a6" name="da"
placeholder="Enter Address" required>
</div>
<div class="form-group">
<label for="a7">Quantity:</label>
<input type="number" class="form-control" id="a7" name="quan"
placeholder="Enter Quantity" required></div>
<div class="form-group">
<label for="a8">Price(Rs.):</label>
<input type="number" class="form-control" id="a8" name="price" readonly
value="<?php echo $art_result[3];?>">
</div>
<button type="submit" class="btn btn-primary" name="sub">Submit</button>
</form>
</div></div><?php include("../footer/footer.php"); ?>
</section>
<!--End this is form for booking-->
<?php
if ( isset( $_POST[ 'sub' ] ) ){
$a11=$_POST['custid'];
$a12=$_POST['arid'];
$a13=$_POST['cname'];
$a14=$_POST['aname'];
$a15=$_POST['os'];
$a16=$_POST['da'];
$a17=$_POST['quan'];
$a18=($a17 * $_POST['price']);
$sql = "INSERT INTO booking_info (cust_id, art_id, Name, bart_name, order_status,
delivery_address, bart_quantity, bart_date,bart_price) VALUES ('$a11', '$a12', '$a13', '$a14',
'$a15','$a16', '$a17', NOW(), '$a18')"; //this is query for booking
if (mysqli_query($con, $sql)) {
$current_baid = mysqli_insert_id($con);
$_SESSION['baid'] =$current_baid;
echo "<script>alert('Your Booking has been successfully! Proceed To Payment..');
window.location.assign('paymentmode.php')</script>";
} else {
echo "Error: " . $sql . "<br>" . mysqli_error($con);
}}
mysqli_close($con);
?>
$run=mysqli_query($con,$sql);
echo "<table class='table table-bordered'>
<tr>
<th>Payment Id</th>
<th>Booking Art Id</mmth>
<th> Customer Id</th>
<th>Amount</th>
</tr>";
while($result=mysqli_fetch_array($run))
{
echo "<tr>
<td>$result[0]</td>
<td>$result[1]</td>
<td>$result[2]</td>
<td>$result[3]</td>
</tr>";
}
echo "</table>";
mysqli_close($con);
?>
</div></div> </div>
<?php include("../footer/footer.php");?>
Art_info Table: Figure 4.2 provides description about the details of artworks such as art id
which is a primary key, art name, art category, art price and discount with artist name.
‘art_photo’ is an attribute where we can upload the artwork.
Booking_info Table: Figure 4.3 shows the decription of attributes about booking details of the
artwork made by the customer
Customer_info Table: Figure 4.4 shows description about the attributes that tells about the
customer details.
Exhibition_events Table: Figure 4.5 shows description of attributes about the details of
upcoming exhibition events.
Feedback_info Table: Figure 4.6 shows the description of attributes about the feedback details.
Payment_info Table: Figure 4.7 shows the description of attributes about the payment details.
Table art_info
CREATE TABLE `admin_info` (
`admin_id` varchar(20) NOT NULL,
`admin_pwd` varchar(20) NOT NULL,
`admin_name` varchar(50) NOT NULL,
`email_id` varchar(50) NOT NULL,
`admin_phone` bigint(10) NOT NULL
);
Table art_info
CREATE TABLE `art_info` (
`art_id` int(10) NOT NULL,
`art_name` varchar(50) NOT NULL,
`art_category` varchar(20) NOT NULL,
`art_price` int(20) NOT NULL,
`art_discount` int(10) NOT NULL,
`art_photo` varchar(50) NOT NULL,
`artist_name` varchar(1000) NOT NULL,
‘unique_code’ int(4) NOT NULL );
Table booking_info
CREATE TABLE `booking_info` (
`bart_id` int(10) NOT NULL,
`cust_id` int(10) NOT NULL,
`art_id` int(10) NOT NULL,
`Name` text NOT NULL,
`bart_name` varchar(50) NOT NULL,
`order_status` varchar(20) NOT NULL,
`delivery_address` varchar(50) NOT NULL,
`bart_quantity` int(10) NOT NULL,
`bart_date` varchar(30) NOT NULL DEFAULT 'CURRENT_TIMESTAMP(50)',
`bart_price` int(20) NOT NULL );
Table customer_info
CREATE TABLE `customer_info` (
`cust_id` int(10) NOT NULL,
`cust_pwd` varchar(20) NOT NULL,
`cust_email` varchar(50) NOT NULL,
`cust_Fname` varchar(10) NOT NULL,
`cust_Lname` varchar(10) NOT NULL,
`cust_sex` varchar(10) NOT NULL,
`cust_phone` bigint(10) NOT NULL,
`cust_state` varchar(20) NOT NULL,
`cust_place` varchar(20) NOT NULL,
`cust_address` varchar(50) NOT NULL
);
Table exhibition_events
CREATE TABLE `exhibition_events` (
`ex_id` int(100) NOT NULL,
`event_name` varchar(100) NOT NULL,
`event_about` varchar(500) NOT NULL,
`event_category` varchar(100) NOT NULL,
`event_venue` varchar(500) NOT NULL,
`event_date` date NOT NULL,
`event_time` varchar(500) NOT NULL,
`event_photo` varchar(900) NOT NULL
);
Table feedback_info
CREATE TABLE `feedback_info` (
`feed_id` int(10) NOT NULL,
`cust_id` int(10) NOT NULL,
`email_id` varchar(50) NOT NULL,
`Feed_Status` varchar(50) NOT NULL,
`Feed_Response` varchar(50) NOT NULL,
`Feed_type` varchar(50) NOT NULL );
Table Payment_info
CREATE TABLE `payment_info` (
`pay_id` int(10) NOT NULL,
`bart_id` int(10) NOT NULL,
`cust_id` int(10) NOT NULL,
`pay_amount` int(10) NOT NULL
)
INSERT INTO `art_info` VALUES (1, 'Black sand beach', 'Painting', 90000, 10000, '
..\img\painting1.jpg', 'Artist: Shina Choi');
INSERT INTO `art_info` VALUES (2, 'The Indian Door', 'Painting', 15000, 17000, '
..\img\painting2.jpg', 'Artist: Ram Onkar');
INSERT INTO `art_info` VALUES (3, 'Ganesha Pencil Carving', 'Pencil Carving', 6999, 7500,
'..\img\pc6.png', 'Artist:Bhuvan Patel');
INSERT INTO `art_info` VALUES (4, 'Awakening Light', 'Mandala', 55500,57999,
'..\img\mandala7.jpg', 'Artist: Raghav Joshi');
INSERT INTO `art_info` VALUES (5, 'The Vintage Car', 'Photography', 2000, 3500,
'..\img\p3.jpg', 'Artist: Paul Williams');
INSERT INTO `art_info` VALUES (6, 'Zen Meditation Mandala', 'Mandala', 30000, 33000,
'..\img\mandala4.jpg', 'Artist: Preeti Kashyap'),
INSERT INTO `art_info` VALUES (7, 'The Blue Eyes', 'Fine Art', 39000, 40000,
'..\img\fineart5.jpg', 'Artist: Krishna Sharma');
INSERT INTO `art_info` VALUES (8, 'Jaymahal Palace ', 'Photography', 3299, 3500,
'..\img\p2.jpg', 'Artist: Prateek J T');
INSERT INTO `art_info` VALUES (9, 'The City of New York', 'Painting', 39999, 41999,
'..\img\painting4.jpg', 'Artist: Nischith Gowda');
4.5 COMMANDS
Indexes for table `admin_info`
ALTER TABLE `admin_info`
ADD PRIMARY KEY (`admin_id`),
ADD UNIQUE KEY `Login_id` (`email_id`);
4.6 QUERIES
$sql1= "select * from customer_info where cust_email='".$mail."' and cust_pwd='".$pass."'";
This is a query for customer register login.
$sql="select * from payment_info where cust_id=$a"; //This is a query to display the payment
details.
$sql = "select * from customer_info"; // this is query for fetching all customer
$sql = "select * from customer_info"; // this is query for fetching all customer details. details.
$sql = "select * from booking_info"; // this is query for displaying all booking details
$sql="select * from exhibition_events"; // this is query for displaying all Exhibition & Events
Details
$s=mysqli_query($con, "select * from art_info where art_id=$r"); // this query for displaying art
record who is removing
$up="delete from art_info where art_id='$a'"; // this is query for removing art detail.
$sql="select * from art_info"; // this is query for displaying all product
$s=mysqli_query($con, "select * from feedback_info where feed_id=$r"); // this is query for
displaying data who is removing.
$up="delete from feedback_info where feed_id='$a'"; // this is query for deleting feedback
record by admin.
$s = mysqli_query( $con, "select * from customer_info where cust_id=$r" ); // this query for
displaying info who is removing.
$up = "delete from customer_info where cust_id='$a'"; // this query for deleting for customer
details.
$sql = "select * from customer_info"; // this is query for fetching all customer details.
$s=mysqli_query($con, "select * from exhibition_events where ex_id=$r"); // this query for
displaying art record who is removing
4.7 TRIGGERS
Chapter 5
RESULTS
5.1 FRONT END
5.1.1 HOME PAGE
Figure 5.1 and 5.2 shows the home page of the Art Gallery, which shows the slider of five
pictures giving the description about the art gallery website. ‘Art Club’ is the name of website. It
includes two logins for customer and admin. It also shows customer register where new users
can register and view the application.
Figure 5.3 shows the customer login page. It is only then the customer can view the artworks and
can place the order. In customer page, we can navigate through cancel booking page, feedback
page, and can also view the upcoming exhibition event’s details. Figure 5.4 shows the artworks
page.
Figure 5.5 shows the booking of artworks by customer. The form takes down the details of
customer such as customer id, art name, art id, quantity, delivery address etc.
Figure 5.6 shows the feedback page that is provided to the customer. The customer can share
their views and opinions about the artworks, website, their services etc. The feedback page takes
the email id of the customer. This feedback is viewed by the admin and then the admin can
manage those feedbacks.
Figure 5.9 shows cancel page where customer can cancel their booking if they wish to.
Figure 5.10 shows the admin side where he can view the bookings made by the customers.
Figure 5.11 shows the payment details to the admin side made by the customers.
The Figure 5.15 describes how the database is created and managed at the back end using
PHP server-side scripting language.
From Figure 5.15 we can observe that the database created is named as ‘artwork’ and it contains
thefollowing tables:
Admin_info: This table shows information about the details of admin who manages the account.
Customer_info: This table contains information about the details of the customer.
Art_info: This tables contains information about the booking details of the artwork purchased by
the customer.
Booking_info: This table contains information about the booking details of the artworks made
by the customer.
Exhibition_info: This table contains information about the upcoming details of the exhibition
events.
Feedback: This table contains information about the feedback page.
Payment_info: This table contains information about the payment details made by the customer
for purchasing the artworks.
From Figure 5.16 we can observe that when new values are inserted at the front end the
same values are being inserted at the back end to the table Booking_info. When you click on the
submit button of booking page which is in the front-end side, the booking details are
automatically generated in the back end side of PHP. Fig 5.17 shows booking details being
inserted automatically on the back-end side.
Figure 5.17 booking details being inserted automatically on the back-end side
Similarly all the other details are automatically inserted in the respective database tables of back-
end side when new values are added in the front end side. Not only the insertion of values
happens, but even the modification such as update and deletion takes place in same manner.
Chapter 6
CONCLUSION
SUMMARY
A database was created for a market that can use it for keeping track on art gallery Galleries are
divided into many art galleries. Galleries have different names, locations, etc. Each gallery will
have different exhibitions and each exhibition will have a start and end date. The galleries will
have different artist displaying their artwork. The model can also be adapted to meet other
purposes and thus be used for other projects. The database structure is quite simple, which
makes it easy for also other programmers to understand it. In conclusion, a database is a far more
efficient mechanism to store and organize data than spreadsheets it allows for a centralized
facility that can easily be modified and quickly shared among multiple users. Having a web
based front end removes the requirement of users having to understand and use a database
directly, and allows users to connect from anywhere with an internet connection and a basic web
browser. It also allows the possibility of queries to obtain information for various surveys. Due
to the number of users reading and modifying student data in the department, it is an ideal use
for such a system.
FUTURE ENHANCEMENTS:
In a nutshell, it can be summarized that the future scope of the project circles around maintaining
information regarding:
[1] We can add printer in future.
[2] We can give more advance software for Online Art Gallery including more facilities.
[3] We can host platform on online servers to make it accessible worldwide.
[4] Integrate multiple load balancers to distribute the loads of the system.
[5] Create the master and slave database structure to reduce the overdue of the database
queries.
[6] Implement the backup mechanisms for taking backup of codebase and database on
regular basis on different servers.
The above-mentioned points are the enhancements which can be done to increase the
applicability and usage of this mini project. Here we can maintain the records of the arts and
orders. Also, as it can be seen that nowadays the players are versatile i.e so there is a scope for
introducing a method to maintain all the arts, orders order update, customer, as well as the
details regarding the upcoming exhibition events.
LIMITATIONS:
Though the software presents a broad range of options to its users, some intricate options could
not be covered into it; partly because of the logistic and partly due to the lack of sophistication.
Paucity of time was also a major constraint, thus it was not possible to make the software
foolproof and dynamic. Excel support has not been developed for arts, order due to some
criticality. The transactions are made through only cash on delivery mode and no online payment
mode. Offline reports of Arts, Order Updates cannot be generated due to the batch execution.
Considerable efforts have made the software easy to operate even for the people not related to
the field of computers but it is acknowledged that a layman may find it a bit problematic at the
first instance.
Chapter 7
REFERENCES
BOOK REFERNCES
[1] Fundamentals of Database Systems, Ramez Elmasri and Shamkant B. Navathe, 7th
Edition, 2017, Pearson.
[2] Database management systems, Ramakrishnan, and Gehrke, 3rd Edition, 2014,
McGraw Hill.
[3] Silberschatz Korth and Sudharshan, Database System Concepts, 6th Edition,
McGrawHill, 2013.
WEB REFRENCES