Eyecon Report
Eyecon Report
Eyecon Report
“EYECON”
Submitted in partial fulfillment of the requirement for the award of Degree of
Bachelor of Engineering
In
Computer Science & Engineering
Submitted by
Mrs. SNEHA N P
Asst Professor, Dept. of CSE
AIT,Bangalore
2022-23
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
ACHARYA INSTITUTE OF TECHNOLOGY
(AFFILIATED TO VISVESVARAYA TECHNOLOGICAL UNIVERSITY, BELAGAVI.APPROVED BY AICTE, NEW DELHI, ACCREDITED
BY NAAC, NEW DELHI)
Acharya Dr. Sarvepalli Radhakrishnan Road, Soldevanahalli, Bengaluru-560107
Certificate
This is to Certify that the mini-project work entitled “EYECON” is a bonafide work
carrieout by Seshankoti Dhanasanjay(1AY20CS137) and Shamanth K
V(1AY20CS140) in partial fulfillment for the award of the degree of Bachelor of
Engineering in Computer Science and Engineering of the Visvesvaraya
Technological University, Belagavi during the year 2022-23. It is certified that all
corrections/suggestions indicated for Internal Assessment have been incorporated in the
report deposited in the departmental library. The project has been approved as it
satisfies the academic requirements in respect of mini project work prescribed for the
Bachelor of Engineering Degree.
1.
2.
ACKNOWLEDGEMENT
We express our gratitude to our institution and management for providing us with
good infrastructure, laboratory, facilities and inspiring staff whose gratitude was of immense
help in completion of this seminar successfully.
Our sincere thanks to Dr. Ajith Padyana, Asso.professor ,Head of the Department,
Computer Science and Engineering, Acharya Institute of Technology for his valuable support
and for rendering us resources for this mini project work.
We express our gratitude to Mrs. Sneha N P, Asst. Professor Dept. Computer Science
and Engineering, Acharya Institute of Technology who guided us with valuable suggestions in
completing this mini-project at every stage.
Our gratitude should be rendered to many people who helped us in all possible ways.
SESHANKOTI DHANSANJAY(1AY20CS137)
SHAMANTH K V(1AY20CS140)
(i)
ABSTRACT
A spectacles management system is a software application that is used to track and manage
the inventory, sales, and distribution of eyeglasses and other eyewear. It is typically used by
opticians, eyewear retailers, and other businesses that sell and distribute eyewear. The system
includes features for storing and organizing information about the different types of eyewear
available, including the frame style, lens type, and other features. It may also include tools for
tracking the inventory levels of different eyewear products, as well as sales and order data , In
addition to managing the inventory and sales of eyewear, a spectacles management system
may also include features for managing customer information and orders, generating reports
and analytics, and automating key business processes. It can help businesses to streamline
their operations, improve customer service, and increase efficiency.
(ii)
TABLE OF CONTENTS
Acknowledgement (i)
Abstract (ii)
Table of contents (iii)
Table of Figure (iv)
CHAPTER 1: INTRODUCTION…………………………………………..1
1.1 Introduction to DBMS 1
1.1.1 Why DBMS? 1
1.1.2 Database applications 2
1.1.3 Advantages of DBMS 2
1.1.4 Components of DBMS 3
1.1.5 Three-Schema architecture 4
CHAPTER 3: DESIGN……………………………………………………...6
3.1 ER Diagram 6
3.2 Schema Diagram 7
CHAPTER 4: IMPLEMENTATION……………………………………….8
4.1 Tables 8
4.1.1 ADMIN 8
4.1.2 CUSTOMER 9
4.1.2 BILLLING 10
4.1.3 RETURN_ORDER 11
4.1.4 PRODUCTS 12
4.1.5 ORDERS 13
4.2 Triggers and routines 12
4.3 frontend design 13
CHAPTER 5: SNAPSHOTS………………………………………………..18
Conclusion & Future Enhancements………………………………………26
Bibliography…………………………………………………………………27
(iii)
TABLE OF FIGURES
(iv)
EYECON
CHAPTER 1
INTRODUCTION
Spectacle management system is a type of database management system (DBMS) that
allows admin to access and manage their data over the internet. It is a cloud-based solution
that allows admin to store, retrieve, and analyze large amounts of data in real-time. It
eliminates the need for expensive hardware and maintenance costs as the infrastructure is
maintained by the provider. It is designed to be highly scalable and can handle a large number
of concurrent requests. Spectacle management system offers advanced features such as
automatic data replication, data backup and recovery, and security features to protect data
against unauthorized access. It is a flexible and cost-effective solution for businesses of all
sizes, as it can be scaled to meet the specific needs of the organization.
1.1 Introduction to DBMS
DBMS stands for Database Management System. We can break it like this DBMS =
DataBase + Management System. The database is a collection of data and a Management
System is a set of programs to store and retrieve those data. Basically, DBMS is a software
tool to organize (create, retrieve, update and manage) data in a database.
The main aim of a DBMS is to supply a way to store up and retrieve database
information that is both convenient and efficient. By data, we mean known facts that can be
recorded and that have embedded meaning. Normally people use software such as DBASE IV
or V, Microsoft ACCESS, or EXCEL to store data in the form of a database. A datum is a unit
of data. Meaningful data combined to form information. Hence, information is interpreted
data – data provided with semantics. MS. ACCESS is one of the most common examples of
database management software.
● DBMS: Software that allows users to create and manipulate database access.
● Database: Collection of logical data as a single unit.
● Database access language: This is used to access the data to and from the database,
to enter new data, update existing data, or retrieve required data from databases. The
user writes a set of appropriate commands in a database access language, submits
these to the DBMS, which then processes the data and generates and displays a set of
results into a user readable form.
1.1.5 Three-Schema architecture
The levels form a three-level architecture that includes an external, a conceptual, and an
internal level. The way users recognize the data is called the external level. The way the
DBMS and the operating system distinguish the data is the internal level, where the data is
actually stored using the data structures and file. The conceptual level offers both the mapping
and the desired independence between the external and internal levels.
CHAPTER 2
SYSTEM REQUIREMENTS
2.1 Hardware Requirements
Processor: Intel Core2 Quad @ 2.4Ghz on Windows® Vista 64-Bit / Windows® 7
64-Bit / Windows® 8 64-Bit / Windows® 8.1 64-Bit.
RAM: 2GB of RAM
Memory: 256GB Hard drive
Keyboard: MS-compatible keyboard
Mouse: MS-compatible mouse
CHAPTER 3
DESIGN
3.1 ER Diagram
CHAPTER 4
IMPLEMENTATION
4.1 TABLES
4.1.1 ADMIN
CREATE TABLE `admin` (
`username` varchar(20) NOT NULL,
`password` varchar(20) NOT NULL
);
ADMIN
4.1.2 CUSTOMER
CREATE TABLE `customer` (
`cid` int(20) NOT NULL,
`cname` varchar(255) NOT NULL,
`address` varchar(255) NOT NULL,
`phone_no` int(20) NOT NULL,
`purchase` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
4.1.3 BILLING
CREATE TABLE `billing` (
`bid` int(20) NOT NULL,
`cid` int(20) NOT NULL,
`warranty` int(20) NOT NULL,
`date` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE
current_timestamp(),
`quantity` int(20) NOT NULL,
`id` int(20) NOT NULL);
INSERT INTO `billing` (`bid`, `cid`, `warranty`, `date`, `quantity`, `id`) VALUES
(3, 5, 3, '2023-01-22 10:11:52', 1, 4),
(4, 6, 2, '2023-01-22 10:12:07', 4, 5);
id Not null
4.1.4 RETURN_ORDER
CREATE TABLE `return_order` (
`rid` int(20) NOT NULL,
`reason` varchar(225) NOT NULL,
`cid` int(20) NOT NULL,
`date` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE
current_timestamp(),
`id` int(20) NOT NULL,
`bid` int(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
INSERT INTO `return_order` (`rid`, `reason`, `cid`, `date`, `id`, `bid`) VALUES
(3, 'damaged product delivered', 5, '2023-01-22 10:21:38', 4, 3);
id Not null
4.1.5 PRODUCTS
CREATE TABLE `products` (
`id` int(20) NOT NULL,
`name` varchar(255) NOT NULL,
`price` int(20) NOT NULL,
`image` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
ALTER TABLE `products`
ADD PRIMARY KEY (`id`);
INSERT INTO `products` (`id`, `name`, `price`, `image`) VALUES
(4, 'spects', 345, 'adminloginbg.jpg'),
(5, 'titan', 700, 'bckg.png');
id PRIMARY KEY
4.1.6 ORDERS
CREATE TABLE `orders` (
`oid` int(20) NOT NULL,
`cid` int(20) NOT NULL,
`date` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE
current_timestamp(),
`id` int(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
id Not null
Trigger to update purchase status of the customer when he place a return order
CREATE TRIGGER
`ret_status` AFTER INSERT ON `return_order`
FOR EACH ROW UPDATE customer set purchase='returned' WHERE cid=new.cid;
4.2.2 ROUTINES
Routine to retrieve data of customer who placed atleast one order.
CREATE DEFINER=`root`@`localhost` PROCEDURE ‘ordered customer details’()
Select c.*,o.oid from customer c ,orders o where c.cid=o.oid.
4.3.1 adminconnection.php
<?php
$conn=mysqli_connect("localhost","root","","eyeconstore");
if(mysqli_connect_error()){
exit();
?>
4.3.2 adminlogin.php
<?php require("adminconnection.php")?>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin login</title>
<link rel="stylesheet" href="adminlogin.css">
</head>
<body>
<div class="container">
<div class="myform">
<form method="post"action="<?php echo( $_SERVER['PHP_SELF'])?>">
<h2>
ADMIN LOGIN
</h2>
<input type="text" name="username"placeholder="name" required>
<input type="password"name="password" placeholder="password" >
<button type="submit" name="login">login</button>
</form>
</div>
<div class="image">
<img src="adminloginbg.jpg" width="300px">
</div>
</div>
<?php
function input_filter($data)
{
$data=trim($data);
$data=stripslashes($data);
$data=htmlspecialchars($data);
return $data;
}
if(isset($_POST['login']))
{
$username= input_filter($_POST['username']);
$password=input_filter($_POST['password']);
$username=mysqli_real_escape_string($conn,$username);
$password=mysqli_real_escape_string($conn,$password);
4.3.3 product.php
<?php
@include 'adminconnection.php';
if(isset($_POST['add_product'])){
$product_name = $_POST['product_name'];
$product_price = $_POST['product_price'];
$product_image = $_FILES['product_image']['name'];
$product_image_tmp_name = $_FILES['product_image']['tmp_name'];
$product_image_folder = 'uploaded_img/'.$product_image;
if(empty($product_name)||empty($product_price)||empty($product_image)){
$message[] = 'please fill out all';
}else{
$insert = "INSERT INTO products(name, price, image) VALUES('$product_name',
'$product_price', '$product_image')";
$upload = mysqli_query($conn,$insert);
if($upload){
move_uploaded_file($product_image_tmp_name, $product_image_folder);
$message[] = 'new product added successfully';
}else{
$message[] = 'could not add the product';
}
}
};
if(isset($_GET['delete'])){
$id = $_GET['delete'];
mysqli_query($conn, "DELETE FROM products WHERE id = $id");
header('location:product.php');
};
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>admin page</title>
<!-- font awesome cdn link -->
<link rel="stylesheet”
href=https://cdnjs.cloudflare.com/ajax/libs/fontawesome/5.15.4/css/all.min.css>
<!-- custom css file link -->
<link rel="stylesheet" href="product.css">
</head>
<body>
<?php
?>
<div class="container">
<div class="admin-product-form-container">
<form action="<?php $_SERVER['PHP_SELF'] ?>"
method="post"enctype="multipart/form-data">
<h3>add a new product</h3>
<input type="text" placeholder="enter product name" name="product_name"
class="box">
<input type="number" placeholder="enter product price" name="product_price"
class="box">
<input type="file" accept="image/png, image/jpeg, image/jpg" name="product_image"
class="box">
<input type="submit" class="btn" name="add_product" value="add product">
<a href="adminpanelz.php" class="btn">go back!</a>
</form>
</div>
<?php
$select = mysqli_query($conn, "SELECT * FROM products");
?>
<table class="product-display-table">
<thead>
<tr>
<th>product id</th>
<th>product image</th>
<th>product name</th>
<th>product price</th>
<th>action</th>
</tr>
</thead>
<?php while($row = mysqli_fetch_assoc($select)){ ?>
<tr>
<td><?php echo $row['id']; ?></td>
<td><img src="uploaded_img/<?php echo $row['image']; ?>" height="100"
alt=""></td>
<td><?php echo $row['name']; ?></td>
<td>$<?php echo $row['price']; ?>/-</td>
<td>
<a href="product_update.php?edit=<?php echo $row['id']; ?>" class="btn"> <i
class="fas fa-edit"></i> edit </a>
<a href="product.php?delete=<?php echo $row['id']; ?>" class="btn"> <i class="fas
fa-trash"></i> delete </a>
</td>
</tr>
<?php } ?>
</table>
</div>
</body></html>
CHAPTER 5
SNAPSHOTS
1. The login page screen contains an input text box for username and password
2. Admin can input his name and password to login.
Validators Given:
1. Admin needs to enter id and a password.
2. Admin will be able to sign in only when he has been registered.
3. Id validation is given by a validating with a regex expression.
As soon as the admin has successfully signed in, he is forwarded to this page.
This page contains information about
No of spectacle updated
number of customer listed
total no of orders
total no of return orders
Validators given:
1. The following page will not be rendered if the user is not successfully logged in.
2. This information is available to him only if he is a admin.
Validators given:
The following page will not be rendered if the admin is not successfully logged in.
Validators given:
1. The following page will not be rendered if the admin has not successfully
logged in.
2. Order id is updated automatically for each order .
3. During edit the attributes cannot be empty.
4. During delete there will be a pop up that confirms the delete request.
Validators given:
1. The following page will not be rendered if the admin has not successfully registered.
2. During edit the attributes cannot be empty.
3. During delete there will be a pop up that confirms the delete request.
Conclusion:
In conclusion, a spectacle management system can greatly improve the efficiency and
effectiveness of managing an spectacle store . It can automate many tasks such as inventory
management, order processing, and customer management. By providing a user-friendly and
streamlined system, it can also enhance the customer experience and potentially increase
sales. Overall, implementing an spectacle management system can be a valuable investment
for any online spectacle store.
Future Enhancement:
There are several potential future enhancements for an online spectacle store management
system. Some possibilities include:
Integrating virtual try-on technology, which would allow customers to virtually try
on different frames and see how they look on them before making a purchase.
Adding a personalized recommendation system that suggests products to
customers based on their browsing and purchase history.
Implementing a virtual optometrist feature that allows customers to get their eyes
checked online and receive a prescription that they can use to purchase glasses.
Incorporating augmented reality technology which allows customers to see how a
particular pair of glasses would look on them in a virtual environment before
making a purchase.
Enhancing the mobile and voice-enabled support, which would allow customers to
use voice commands to search for products and place orders, providing a more
convenient shopping experience.
Implementing automation for the supply chain management to improve the speed,
efficiency and cost of delivery.
These are just a few examples of potential enhancements that could be made to an online
spectacle store management system in the future. The technology is rapidly advancing, and
there will be many more possibilities as the technology continue to evolve.
BIBLIOGRAPHY
Web References:
1. https://www.w3schools.in/dbms/intro/
2. https://beginnersbook.com/2015/04/dbms-introduction/
3. https://getbootstrap.com/
4. https://developer.mozilla.org/en-US/
5. https://www.google.com/
6. http://www.youtube.com/
Book References:
1. Fundamentals of Database Systems, RamezElmasri and Shamkant B. Navathe, 7th Edition,
2017, Pearson.