0% found this document useful (0 votes)
19 views

Lokeshwaran.s Dbms Reportt

The document discusses the vision, mission, program educational objectives and outcomes of the Department of Computational Intelligence at SRM Institute of Science and Technology. It details the course learning outcomes and evaluation process for the Database Management Systems project course.

Uploaded by

anlacetech133
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Lokeshwaran.s Dbms Reportt

The document discusses the vision, mission, program educational objectives and outcomes of the Department of Computational Intelligence at SRM Institute of Science and Technology. It details the course learning outcomes and evaluation process for the Database Management Systems project course.

Uploaded by

anlacetech133
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 42

SRM INSTITUTE OF SCIENCE AND TECHNOLOGY

TIRUCHIRAPPALLI

COLLEGE OF ENGINEERING AND TECHNOLOGY

TIRUCHIRAPPALLI

21CSC205P Database Management


Systems

Project Report

Register No : RA2211003050166

Name of the Student : Lokeshwaran.S

Semester : 4TH SEMESTER

1
Programme : B.Tech.CSE

Academic Year : 2023-2024

SRM INSTITUTE OF SCIENCE AND TECHNOLOGY


TIRUCHIRAPPALLI

COLLEGE OF ENGINEERING AND TECHNOLOGY

TIRUCHIRAPPALLI

BONAFIDE CERTIFICATE

Certified as the bonafide record of work done by Lokeshwaran.S Register No.


RA2211003050166 of 4TH / II (Semester/Year), B.Tech.Computer Science and
Engineering, Programme in the project-based course 21CSC205P, Database
Management Systems at SRM Institute of Science and Technology, Tiruchirappalli
Campus during the Academic Year 2023-2024.

2
Faculty In-charge Head of the Department

Submitted for the End Semester Examination held on

Examiner-1 Examiner-2

3
SRM Institute of Science and Technology

Faculty of Engineering and Technology

School of Computing

Department of Computational Intelligence

VISION AND MISSION OF THE DEPARTMENT


Vision
To become a world-class department in imparting high-quality knowledge and providing students with a
unique learning and research experience in Computer Science and Engineering.

Mission

1. To impart knowledge in cutting edge technologies in part with industrial standards.

2. To collaborate with renowned academic institutions in research and development.

3. To instill societal and ethical responsibilities in all professional activities.

Program Educational Objectives (PEO)


PEO - 1 Graduates will be able to perform in technical/managerial roles ranging from design,
development, problem solving to production support in software industries and R&D sectors

PEO - 2 Graduates will be able to successfully pursue higher education in reputed institutions.

PEO - 3 Graduates will have the ability to adapt, contribute and innovate new technologies and
systems in the key domains of Computer Science and Engineering.
PEO - 4 Graduates will be ethically and socially responsible solution providers and
entrepreneurs in Computer Science and other engineering disciplines.

PEO - 5 Graduates will possess the additional skills in core computer science discipline with
knowledge of Hardware, Software, Programming, Logic & Reasoning.

Mission of the Department to Program Educational Objectives (PEO) Mapping

4
H – High correlation, M – Medium Correlation, L – Low Correlation

Program Outcomes as defined by NBA (PO) Engineering Graduates

will be able to:

1. Engineering knowledge: Apply the knowledge of mathematics, science, engineering


fundamentals, and an engineering specialization to the solution of complex engineering
problems.

2. Problem analysis: Identify, formulate, review research literature, and analyze complex
engineering problems reaching substantiated conclusions using first principles of
mathematics, natural sciences, and engineering sciences.

3. Design/development of solutions: Design solutions for complex engineering problems


and design system components or processes that meet the specified needs with
appropriate consideration for the public health and safety, and the cultural, societal, and
environmental considerations.

4. Conduct investigations of complex problems: Use research-based knowledge and


research methods including design of experiments, analysis and interpretation of data, and
synthesis of the information to provide valid conclusions.

5. Modern tool usage: Create, select, and apply appropriate techniques, resources, and
modern engineering and IT tools including prediction and modeling to complex
engineering activities with an understanding of the limitations.

6. The engineer and society: Apply reasoning informed by the contextual knowledge to
assess societal, health, safety, legal and cultural issues and the consequent
responsibilities relevant to the professional engineering practice.

7. Environment and sustainability: Understand the impact of the professional


engineering solutions in societal and environmental contexts, and demonstrate the knowledge
of, and need for sustainable development.

5
8. Ethics: Apply ethical principles and commit to professional ethics and responsibilities
and norms of the engineering practice.

9. Individual and team work: Function effectively as an individual, and as a member or


leader in diverse teams, and in multidisciplinary settings.

10. Communication: Communicate effectively on complex engineering activities with the


engineering community and with society at large, such as, being able to comprehend
and write effective reports and design documentation, make effective presentations, and
give and receive clear instructions.

11. Project management and finance: Demonstrate knowledge and understanding of the
engineering and management principles and apply these to one’s own work, as a
member and leader in a team, to manage projects and in multidisciplinary environments.

12. Life-long learning: Recognize the need for, and have the preparation and ability to

engage in independent and life-long learning in the broadest context of technological change.

PSO – Program Specific Outcomes (PSO)

Mapping Program Educational Objectives (PEO) to Program Learning Outcomes (PLO)

6
H – High correlation, M – Medium Correlation, L – Low Correlation

COURSE DESIGN

Course Learning At the end of this course, learners will be able to:

Outcomes (CLO):

CO – 1 Acquire knowledge on DBMS architecture and languages

CO – 2 Acquire knowledge on Relational languages and design a database

CO – 3 Implement the Database structure with SQL

CO – 4 Removal of anomalies using Normalization concepts


CO – 5 Visualizing storage structure, handling concurrency, Failure and
recovery principles, NoSQL concept

Report Evaluation:

7
Test Date Artifacts Total Mark Split-up
Components Marks

Marks to be evaluated based on


presentation
1 (a) 23.01.2024 Project Title selection,
Abstract Project title – 2 Marks
04 Presentation – 2 Marks

Problem understanding, Marks to be evaluated based on


Identification of Entity and presentation and demo
07-02-2024 Problem Identification – 1 Marks
Relationships,
1 (b) Presentation – 2 Marks
Construction of DB using
ER Model for their project Demo - 2 Marks
06
Viva - 1 Marks

Marks to be evaluated based on demo


Design of Relational and viva voce Demo - 4 Marks
2 28-02-2024 Schemas, Creation Viva voce – 3 Marks
of Database and their Report - 3 Marks
Tables for their project 10
Marks to be evaluated based on demo

Writing the complex queries and viva voce


based on the concepts of Demo - 4 Marks
constraints, sets, joins, Viva - 3 Marks
27-03-2024 views, Triggers and Cursors
3 Report -3 Marks
10
Marks to be evaluated based on demo
Analyzing the pitfalls, and viva voce
identifying the dependencies Demo - 4 Marks
27-03-2024 and applying normalizations Viva - 3 Marks
4 10 Report - 3 Marks
Marks to be evaluated based on demo
Implementation of and viva voce
concurrency control and Demo - 4 Marks
27-03-2024 recovery mechanisms.
5 Viva - 3 Marks
10 Report - 3 Marks
Marks to be evaluated based on
presentation and demo
Module Description and
Final Presentation - 2
6 15-04-2024 Functionalities
10 Demo - 2 Marks
Viva - 3 Marks Report -
3 Marks
Marks to be evaluated based on

8
presentation and demo
Database Connectivity and Final Presentation - 2
Embedded SQL Demo - 2 Marks
7 15-04-2024 10
operations Viva - 3 Marks
Report - 3 Marks
Marks to be evaluated based on
PL/SQL procedures to presentation and demo
Operate on the database Final Presentation - 2
8 29-04-2024 10
of your project Demo - 2 Marks
Viva - 3 Marks
Report - 3 Marks
Marks to be evaluated based on
presentation and demo
Final Presentation - 2
9 29-04-2024 Front End Design 10
Demo - 2 Marks
Viva - 3 Marks
Report - 3 Marks
Marks to be evaluated based on
Report Generation using presentation and demo
Final Presentation - 2
10 07-05-2024 Crystal Reports/Report 10
Demo - 2 Marks
Generation Tool
Viva - 3 Marks
Report - 3 Marks

9
LABORATORY EXPERIMENTS MAPPED WITH CLO, PO, PSO

Sl. CLO PO / PSO


Title of the Experiments Mapping Mapping
No.
1 (a) Project Title selection, Abstract 1 2
(b) Problem understanding, Identification of
Entity and Relationships, Construction of DB using
ER Model for your project
2 Design of Relational Schemas, Creation of Database 1,2 1,2
and Tables for your project

3 SQL Queries based on the concepts of constraints, 3 1,3


sets, joins

4 Applying Normalization for your project 4 1

5 Concurrency control and Recovery mechanisms for 5 1,2


your project
6 Module Description and Functionalities 1,2 1,2

7 Database Connectivity and Embedded SQL 1,2 1,2


operations

8 PL/SQL procedures to Operate on the database of 2,3 1,2,3


your project

9 Front End Design, Sample Code for each module, 5 1,2


Screen Shots for each module

10 Report Generation using Crystal Reports/Report 5 1,2


Generation Tool

INDEX

Expt. No. Date of Name of the Experiment Page Marks Signature of


Experiment No. (50) Faculty

1 07-02-2024 (a) Project Title selection, Abstract

(b) Problem understanding,


Identification of Entity and
Relationships, Construction of DB using
ER Model for your project
10
2 28-02-2024 Design of Relational Schemas, Creation
of Database and Tables for your project

3 27-03-2024 SQL Queries based on the concepts of


constraints, sets, joins

4 27-03-2024
Applying Normalization for your project

5 27-03-2024 Concurrency control and Recovery


mechanisms for your project

6 15-04-2024
Module Description and Functionalities

7 15-04-2024 Database Connectivity and Embedded


SQL operations
8 29-04-2024 PL/SQL procedures to Operate on the
database of your project
9 29-04-2024 Front End Design, Sample Code for each
module, Screen Shots for each module
10 07-05-2024 Report Generation using Crystal
Reports/Report Generation Tool

11 07-05-2024 Online Course Completion Certificate

11
EXP.NO.1

Abstract:
The Online Shopping is a web based application intended for online retailers. The
main objective of this application is to make it interactive and its ease of use. It
would make searching, viewing and selection of a product easier. It contains a
sophisticated search engine for user's to search for products specific to their needs.
The search engine provides an easy and convenient way to search for products
where a user can Search for a product interactively and the search engine would
refine the products available based on the user’s input. The user can then view the
complete specification of each product. They can also view the product reviews and
also write their own reviews. The application also provides a drag and drop feature
so that a user can add a product to the shopping cart by dragging the item in to the
shopping cart. The main emphasis lies in providing a userfriendly search engine for
effectively showing the desired results and its drag and drop behavior.

Problem Statement:

Online Shopping Management System is a computerized, online solution to the


various problems faced by the Product buyer and seller wishing to outsource their
software development work to a Provider at an economical cost, thus achieving high
performance, accuracy, reliability and high speed of data retrieval.
In this system, there is a registration process each for the Product
buyer and seller. The Administrator of the site verifies the Provider after his
registration and if satisfied, assigns him a user name and password.

12
Our site can be used by anyone who is searching for Products
whether he/she is first time visiting our site. Our site also provides some discounted
Products as same u get on any shop.
The software covers the following point while keeping in mind user’s
requirement-:
Fast online access of information about various Products.
Search Products by keywords like functional area, experience and also by
initials of the Product’s name.
Administrator will maintain the database and perform all process.
There are 2 categories of users-
1. General User
2. Registered Users

Solution approach:
Creating an online management system involves several key steps:

1.Define Requirements: Clearly outline the objectives, functionalities, and user


requirements for the system.
2.Choose Technology Stack: Select appropriate technologies for front-end, back-
end, and database based on scalability, security, and compatibility with the project
requirements.
3.Design Database Schema: Develop a database schema that efficiently stores and
retrieves data required for the system.
4.Develop Front-End: Design and implement a user-friendly interface using HTML,
CSS, and JavaScript to interact with the system.
5.Implement Back-End Logic: Develop server-side logic using frameworks like
Django, Flask (Python), Express (Node.js), or Laravel (PHP) to handle user
requests, process data, and communicate with the database.
6.Integrate Security Measures: Implement authentication, authorization, and
encryption techniques to secure user data and prevent unauthorized access.
7.Testing: Conduct thorough testing to ensure the system functions as expected,
including unit testing, integration testing, and user acceptance testing.

13
8.Deployment: Deploy the system on a web server, ensuring scalability, reliability,
and performance.
Maintenance and Updates: Regularly maintain and update the system to fix bugs,
add new features, and address security vulnerabilities.
9.User Training and Support: Provide training and ongoing support to users to
ensure they can effectively utilize the system.
Each step requires careful planning, execution, and collaboration among team
members to ensure the successful development and deployment of the online
management system

Database Schema Design:

Define a well-structured database schema that accurately represents the entities and
relationships involved in task management.

Normalize the database schema to minimize redundancy and ensure data integrity.
Utilize primary keys, foreign keys, and indexes to optimize data retrieval and ensure
efficient database operations.

Data Model for Task Management:

For a task management system within an online shopping management system,


you’ll need to model various entities such as users, tasks, projects, and possibly
deadlines or priorities. Here’s a basic outline of a data model:

User:
UserID (Primary Key)
Username
Email
Password
Role (Admin, Manager, Employee, etc.)

Project:
ProjectID (Primary Key)
ProjectName
Description
StartDate
14
EndDate
Status (Active, Completed, On Hold, etc.)

Task:
TaskID (Primary Key)
TaskName
Description
DueDate
Status (New, In Progress, Completed, etc.)
Priority (Low, Medium, High)
AssignedTo (UserID – Foreign Key referencing User table)
ProjectID (Foreign Key referencing Project table)

With this basic model, you can assign tasks to users within specific projects. Users
can track their assigned tasks, view project details, and manage deadlines efficiently.
You can expand this model further based on additional requirements such as task
dependencies, comments, attachments, etc.

User Interface Design:

Develop an intuitive and responsive user interface using modern web technologies,
including
Design interactive dashboards, task boards, and collaboration tools to facilitate
efficient task management and communication.

Ensure compatibility with a wide range of devices and screen sizes to accommodate
diverse user preferences.

Backend Development:

Implement backend logic using PHP to handle user authentication, task creation,
assignment, updates, and notifications.

Utilize server-side scripting to interact with the database management system and
retrieve or manipulate task-related data.
15
Implement robust error handling and validation mechanisms to ensure data integrity
and prevent unauthorized access.

Security Measures:

Implement secure authentication mechanisms, such as password hashing and session


management, to protect user accounts and sensitive data.

Utilize input validation and parameterized queries to prevent SQL injection and other
security vulnerabilities.

Employ HTTPS encryption to secure data transmission between the client and server.

Testing and Quality Assurance:

Develop comprehensive test cases covering functional requirements, user interface


interactions, and database operations.

Conduct unit testing, integration testing, and system testing to identify and fix defects
throughout the development process.

Entity Relationship Diagram:

16
EXP.NO.2

Relational Schema:

17
Database Creation:

Table structure for Customer:

CREATE TABLE `tbl_customer` (


`cust_id` int(11) NOT NULL,
`cust_name` varchar(100) NOT NULL,
`cust_cname` varchar(100) NOT NULL,
`cust_email` varchar(100) NOT NULL,
`cust_phone` varchar(50) NOT NULL,
`cust_country` int(11) NOT NULL,
`cust_address` text NOT NULL,
`cust_city` varchar(100) NOT NULL,
`cust_state` varchar(100) NOT NULL,
`cust_zip` varchar(30) NOT NULL,
`cust_b_name` varchar(100) NOT NULL,
`cust_b_cname` varchar(100) NOT NULL,
`cust_b_phone` varchar(50) NOT NULL,
`cust_b_country` int(11) NOT NULL,
`cust_b_address` text NOT NULL,
18
`cust_b_city` varchar(100) NOT NULL,
`cust_b_state` varchar(100) NOT NULL,
`cust_b_zip` varchar(30) NOT NULL,
`cust_s_name` varchar(100) NOT NULL,
`cust_s_cname` varchar(100) NOT NULL,
`cust_s_phone` varchar(50) NOT NULL,
`cust_s_country` int(11) NOT NULL,
`cust_s_address` text NOT NULL,
`cust_s_city` varchar(100) NOT NULL,
`cust_s_state` varchar(100) NOT NULL,
`cust_s_zip` varchar(30) NOT NULL,
`cust_password` varchar(100) NOT NULL,
`cust_token` varchar(255) NOT NULL,
`cust_datetime` varchar(100) NOT NULL,
`cust_timestamp` varchar(100) NOT NULL,
`cust_status` int(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

Table structure for country:

CREATE TABLE `tbl_country` (


`country_id` int(11) NOT NULL,
`country_name` varchar(100) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

19
Table structure for table Color

REATE TABLE `tbl_color` (


`color_id` int(11) NOT NULL,
`color_name` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

Table structure for customer message:

20
CREATE TABLE `tbl_customer_message` (
`customer_message_id` int(11) NOT NULL,
`subject` varchar(255) NOT NULL,
`message` text NOT NULL,
`order_detail` text NOT NULL,
`cust_id` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

Table structure for end category


CREATE TABLE `tbl_end_category` (
`ecat_id` int(11) NOT NULL,
`ecat_name` varchar(255) NOT NULL,
`mcat_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

21
Table structure for Language:

CREATE TABLE `tbl_language` (


`lang_id` int(11) NOT NULL,
`lang_name` varchar(255) NOT NULL,
`lang_value` text NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

EXP.NO.3

Constraints:
Creating tables with primary key constraints:

ALTER TABLE `users`


ADD PRIMARY KEY (`id`);

--
-- Indexes for table `users_items`
--
ALTER TABLE `users_items`

22
ADD PRIMARY KEY (`id`),
ADD KEY `user_id` (`user_id`,`item_id`),
ADD KEY `item_id` (`item_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `items`
--
ALTER TABLE `items`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,
AUTO_INCREMENT=13;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,
AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `users_items`
--
ALTER TABLE `users_items`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,
AUTO_INCREMENT=14;
--
-- Constraints for dumped tables
--

--
-- Constraints for table `users_items`
23
--
ALTER TABLE `users_items`
ADD CONSTRAINT `users_items_ibfk_1` FOREIGN KEY
(`user_id`) REFERENCES `users` (`id`),
ADD CONSTRAINT `users_items_ibfk_2` FOREIGN KEY
(`item_id`) REFERENCES

Queries:

1. Retrieve all products from a specific category.


2. List all orders placed by a particular customer.
3. Display the total revenue generated within a specified time
period.
4. Show all products with low stock levels.
5. Find all customers who haven't made a purchase in the last
month.
6. Calculate the average order value.
7. Update the price of a specific product.
8. Remove a product from the inventory.
9. Add a new customer to the system.
10. View the top-selling products.

EXP.NO.4

Normal Forms:
24
Table: customer_list

First Normal Form (1NF): The table satisfies 1NF as it doesn't contain any
repeating groups, and each attribute holds atomic values.

Second Normal Form (2NF): It meets 2NF requirements as there are no partial
dependencies. All attributes are fully dependent on the primary key.

Third Normal Form (3NF): The table is in 3NF as there are no transitive
dependencies. Each non-key attribute depends directly on the primary key.

Table: color_list

First Normal Form (1NF): This table is in 1NF as there are no repeating groups,
and each attribute holds atomic values.

Second Normal Form (2NF): It satisfies 2NF requirements as there are no partial
dependencies. All attributes are fully dependent on the primary key.

Third Normal Form (3NF): The table is in 3NF as there are no transitive
dependencies. Each non-key attribute depends directly on the primary key.

Table: country_list

First Normal Form (1NF): The table is in 1NF as there are no repeating groups,
and each attribute holds atomic values.

Second Normal Form (2NF): It satisfies 2NF as there are no partial dependencies.
All attributes are fully dependent on the composite primary key, which comprises
the voter ID and candidate ID.

Third Normal Form (3NF): The table is in 3NF as there are no transitive
dependencies. Each non-key attribute depends directly on the composite primary
key.

25
Table: customer_id

First Normal Form (1NF): This table satisfies 1NF because it doesn't contain any
repeating groups, and each attribute holds atomic values.

Second Normal Form (2NF): It meets 2NF requirements because there are no
partial dependencies.

Third Normal Form (3NF): The table satisfies 3NF as there are no transitive
dependencies. Each attribute depends directly on the primary key.
EXP.NO.5

Implementation of Concurrency Control and Recovery


Mechanisms:

Implementation is the stage in the project where the theoretical design is turned into
the working system and is giving confidence to the new system for the users i.e. will
work efficiently and effectively. It involves careful planning, investigation of the
current system and its constraints on implementation, design of method to achieve
the change over, an evaluation, of change over methods. A part from planning major
task of preparing the implementation is education of users. The more complex system
is implemented, the more involved will be the system analysis and design effort
required just for implementation. An implementation coordinating committee based
on policies of individual organization has been appointed. The implementation
process begins with preparing a plan for the implementation for the system.
According to this plan, the activities are to be carried out; discussions may regarding
the equipment have to be acquired to implement the new system.
Implementation is the final and important phase. The most critical stage is in
achieving a successful new system and in giving the users confidence that the new
system will work and be effective. The system can be implemented only after
thorough testing is done and if it found to working according to the specification.
This method also offers the greatest security since the old system can take over if the
errors are found or inability to handle certain types of transaction while using the
new system.
26
Optimistic Concurrency Control:

Employ optimistic concurrency control techniques to detect and resolve conflicts


between concurrent transactions.

Implement timestamp-based or version-based concurrency control by timestamping


or versioning votes and comparing timestamps or versions during updates to detect
conflicts.

Recovery Mechanisms:

Transaction Logging:

Implement transaction logging to record all changes made to the database during
transactions.

Ensure that transaction logs are durable and persisted to stable storage to facilitate
recovery in case of system failures.

Transaction Rollback:

Implement rollback mechanisms to undo the effects of incomplete or failed


transactions.

Utilize transaction logs to identify incomplete transactions and roll back changes to
maintain database consistency.

Point-in-Time Recovery:

Implement point-in-time recovery mechanisms to restore the database to a consistent


state prior to a system failure.

Utilize transaction logs and backup copies of the database to recover the system to a
specific point in time.

27
By incorporating these concurrency control and recovery mechanisms, the Voting
System ensures data integrity, consistency, and reliability, even in the face of
concurrent access and system failures.

EXP.NO.6

Module Description and Functionalities:

FEASIBILITY ANALYSIS
The feasibility study of this project comprise of the following
Economic Feasibility
The cost centers in the system development as well as operation are trivial. The
major can be network, internet and the software required for coding. The software
used for the development of the proposed system is PHP and MySQL. In terms of
wallet our product is in well reach of pocket.
Technical Feasibility
Technical feasibility centers on the current system and to what extent it can support
the proposed system, it includes current computer system specifications such as
hardware, software etc. it also involves financial considerations to accommodate the
technical enhancements. If the budget is serious constraint then the project is judged
not feasible.
Though the system is developed in the generalized form, which covers all the
procedures and operations carried out in an internet based solution. The version
used in the system is PHP and MySQL.
MySQL can manage large amount of data and is simple and secure. Using PHP
helps us to design the look of our application.
Operational Feasibility
In this we determine what change will be brought in system, new skills required
and other human organization and political aspects.

28
Each user can easily use our site. However it is desirable that the user has the basic
knowledge of the computers.
Without making any changes in the rules and regulations of the existing system
proposed system can easily adopted.
Security and Audit Module:

Description: This module ensures the security and integrity of the voting system and
provides auditing capabilities.

Functionalities:

Security measures: Implements security measures such as user authentication,


encryption of sensitive data, and protection against tampering.

Audit trail: Maintains an audit trail of all system activities, including user logins,
ballot creation, and vote counting, for accountability and transparency purposes.

By implementing these modules and their functionalities, the voting system ensures
efficient, secure, and transparent management of the electoral process.

EXP.NO.7

Database Connectivity:
<?php

$servername = "localhost";
$username = "root";
$password = "";
$db = "ecommerce";

// Create connection
$con = mysqli_connect($servername, $username, $password,$db);

// Check connection
if (!$con) {
29
die("Connection failed: " . mysqli_connect_error());
}

?>

Embedded SQL:
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";

/*!40101 SET
@OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET
@OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET
@OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
Indexes for dumped tables

Indexes for table


`admin_info`
--
ALTER TABLE
`admin_info`
ADD PRIMARY KEY
(`admin_id`);

--
-- Indexes for table `brands`
--
ALTER TABLE `brands`
30
ADD PRIMARY KEY
(`brand_id`);

--
-- Indexes for table `cart`
--
ALTER TABLE `cart`
ADD PRIMARY KEY
(`id`);

--
-- Indexes for table
`categories`
--
ALTER TABLE `categories`
ADD PRIMARY KEY
(`cat_id`);

--
-- Indexes for table
`email_info`
--
ALTER TABLE `email_info`
ADD PRIMARY KEY
(`email_id`);

--
-- Indexes for table `logs`
--
ALTER TABLE `logs`
ADD PRIMARY KEY
(`id`);

31
--
-- Indexes for table `orders`
--
ALTER TABLE `orders`
ADD PRIMARY KEY
(`order_id`);

--
-- Indexes for table
`orders_info`
--
ALTER TABLE
`orders_info`
ADD PRIMARY KEY
(`order_id`),
ADD KEY `user_id`
(`user_id`);

--
-- Indexes for table
`order_products`
--
ALTER TABLE
`order_products`
ADD PRIMARY KEY
(`order_pro_id`),
ADD KEY
`order_products`
(`order_id`),
ADD KEY `product_id`
(`product_id`);

--

32
-- Indexes for table
`products`
--
ALTER TABLE `products`
ADD PRIMARY KEY
(`product_id`);

--
-- Indexes for table
`user_info`
--
ALTER TABLE `user_info`
ADD PRIMARY KEY
(`user_id`);

--
-- Indexes for table
`user_info_backup`
--
ALTER TABLE
`user_info_backup`
ADD PRIMARY KEY (`user_id`);

AUTO_INCREMENT for dumped tables

ALTER TABLE `users`


ADD PRIMARY KEY (`id`);

--
-- Indexes for table `users_items`
33
--
ALTER TABLE `users_items`
ADD PRIMARY KEY (`id`),
ADD KEY `user_id` (`user_id`,`item_id`),
ADD KEY `item_id` (`item_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `items`
--
ALTER TABLE `items`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,
AUTO_INCREMENT=13;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,
AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `users_items`
--
ALTER TABLE `users_items`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,
AUTO_INCREMENT=14;
--
-- Constraints for dumped tables
--

--
-- Constraints for table `users_items`
--
ALTER TABLE `users_items`

34
ADD CONSTRAINT `users_items_ibfk_1` FOREIGN KEY (`user_id`)
REFERENCES `users` (`id`),
ADD CONSTRAINT `users_items_ibfk_2` FOREIGN KEY (`item_id`)
REFERENCES

EXP.NO.8

PL/SQLprocedures to Operate on the database of my


project

Insert Procedure:

CREATE OR REPLACE PROCEDURE InsertAdmin(


p_username IN VARCHAR2, p_password IN
VARCHAR2, p_firstname IN VARCHAR2,
p_lastname IN VARCHAR2, p_photo IN
VARCHAR2, p_created_on IN DATE
) AS
BEGIN
INSERT INTO admin (username, password, firstname, lastname, photo,
created_on)
VALUES (p_username, p_password, p_firstname, p_lastname, p_photo,
p_created_on);
COMMIT;
END;
/

Update Procedure:

35
CREATE OR UPDATE PROCEDURE InsertCandidate(
p_position_id IN INT, p_firstname IN VARCHAR2,
p_lastname IN VARCHAR2, p_photo IN
VARCHAR2, p_platform IN TEXT
) AS
BEGIN
INSERT INTO candidates (position_id, firstname, lastname, photo, platform)
VALUES (p_position_id, p_firstname, p_lastname, p_photo, p_platform);
COMMIT;
END;
/

Delete Procedure:

CREATE OR DELETE PROCEDURE InsertCandidate(


p_position_id IN INT, p_firstname IN VARCHAR2,
p_lastname IN VARCHAR2, p_photo IN
VARCHAR2, p_platform IN TEXT
) AS
BEGIN
INSERT INTO candidates (position_id, firstname, lastname, photo, platform)
VALUES (p_position_id, p_firstname, p_lastname, p_photo, p_platform);
COMMIT;
END;
/
Retrieval Procedure:

CREATE OR SELECT PROCEDURE InsertVoter(


p_voters_id IN VARCHAR2, p_password IN
VARCHAR2, p_firstname IN VARCHAR2,
p_lastname IN VARCHAR2, p_photo IN
VARCHAR2
) AS

36
BEGIN
INSERT INTO voters (voters_id, password, firstname, lastname, photo)
VALUES (p_voters_id, p_password, p_firstname, p_lastname, p_photo);
COMMIT;
END;
/

EXP.NO.9

FRONT END:
Admin Login:

37
38
39
EXP.NO.10

EXP.NO.11

ONLINE COURSE COMPLETION CERTIFICATE:

40
Conclusion:

Online shopping is becoming more popular day by day with the increase in the
usage of World WideWeb ,
Understanding customer’s need for online selling has become challenge for
marketers.Specially understanding the consumer’s attitudes towards online shopping
, making improvement in
the factors that influence consumers to shop online and working on factors that
affect consumers toshop online will help marketers to gain the competitive edge
over others. Therefore our study hasfocused mainly on two research questions, I)
what are factors that influence consumers to shoponline and to see what factors are
most attractive for online shoppers. ii) Who are online shoppersin terms of
demography? We foresee that our findings will give a clear and wide picture to
onlineretailers and will help them understand the specific factors that influence
consumers to shop online,so they can build up their strategies to cater online
shoppers..We have also worked on demographic factors of online shoppers, to see a
correlation withindemography factors such as Age, occuoation and Education; this
will also give an insight to onlineretailers to see the online shopping attitudes within
these demographic factors.The findings that we have gained in this research are as
follows; starting from preference of buyingon daily basis to yearly basis. The least
41
number of people have preferred to buy on daily and weaklybasis, also moderate
number of respondants have preferred to buy on monthly and
yearlybasis.Secondly,by considering items preference to shop online with respect to
different commoditieslike travel and leisure,food,electronics,books,apparels and
footwear.People have have shown eitherleast or moderate interest to shop these
items online.considering driving factors to online shoppingpeople are more inclined
to shop online just because they receive high discounts and product pricingand also
variety in product range.More number of people have preferred to shop online as its
timesaving and home delivered.Lastly,the type of payment mode preferred by
respondants is somewhatsurprising because more people have preferred cash on
delivery whereas, UPI/netbanking ispreferred least and credit/debit card and mobile
wallet are preferred moderately. These online theresults of correlation results of age
shows it indicated that elderly people are not so keen to shopon-line. This will help
online retailers to make strategies according to different age brackets. Thesecond
part of the analysis is done on factors influencing consumers to shop online. From
the resultswe have concluded that the most influencing and attractive factor among
four factors particularlythe security concerns are very important while shopping
online. Last but not least after analyzing the51 respondents,we have found that low
price, discount, product pricing, and quality of product andinformation are also
considered to be important factors.

42

You might also like