Lokeshwaran.s Dbms Reportt
Lokeshwaran.s Dbms Reportt
TIRUCHIRAPPALLI
TIRUCHIRAPPALLI
Project Report
Register No : RA2211003050166
1
Programme : B.Tech.CSE
TIRUCHIRAPPALLI
BONAFIDE CERTIFICATE
2
Faculty In-charge Head of the Department
Examiner-1 Examiner-2
3
SRM Institute of Science and Technology
School of Computing
Mission
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.
4
H – High correlation, M – Medium Correlation, L – Low Correlation
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.
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.
5
8. Ethics: Apply ethical principles and commit to professional ethics and responsibilities
and norms of the engineering practice.
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.
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):
Report Evaluation:
7
Test Date Artifacts Total Mark Split-up
Components Marks
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
INDEX
4 27-03-2024
Applying Normalization for your project
6 15-04-2024
Module Description and Functionalities
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:
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:
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
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.
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.
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:
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.
Conduct unit testing, integration testing, and system testing to identify and fix defects
throughout the development process.
16
EXP.NO.2
Relational Schema:
17
Database Creation:
19
Table structure for table Color
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;
21
Table structure for Language:
EXP.NO.3
Constraints:
Creating tables with primary key constraints:
--
-- 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:
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 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:
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:
Utilize transaction logs to identify incomplete transactions and roll back changes to
maintain database consistency.
Point-in-Time Recovery:
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
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:
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 `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`);
--
-- 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
Insert Procedure:
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:
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
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