Visvesvaraya Technological University: "Ads Classified"
Visvesvaraya Technological University: "Ads Classified"
Visvesvaraya Technological University: "Ads Classified"
BELAGAVI - 590018.
submitted by
CERTIFICATE
This is to certify that the mini-project entitled “ADS CLASSIFIED” has been
carried out by MANISH KUMAR (1ST19CS066), KISLAY KUMAR(1ST19CS058)
bonafide students of Sambhram Institute of Technology in partial fulfillment of
requirements for the fifth semester DATABASE Management System Laboratory,
prescribed by the Visvesvaraya Technological University (VTU), Belagavi during the
academic year 2021-2022. It is also hereby, ensured that all corrections/suggestions
indicated for internal assessment have been incorporated while submitting this report.
This report has been approved as it satisfies the academic requirements with respect to
the project work prescribed for the said course.
External Viva
1.
2.
ACKNOWLEDGEMENT
While presenting this mini-project entitled “ADS CLASSIFIED ” entrusted to us,
we feel that it is our duty to acknowledge the guidance and help provided for its
success. We take this occasion to thank God, almighty for blessing us with his grace
and taking our endeavour to a successful culmination.
We are also indebted to our parents and friends for their continued moral and
material support throughout the course of this project and helping us in showcasing
the project’s presentation.
Our thanks to all teaching, non-teaching staffs and others who have
contributed bits, bytes and words to accomplish this project.
i
ABSTRACT
ii
TABLE OF CONTENTS
CHAPTER DESCRIPTION PAGE NO.
ACKNOWLEDGEMENT i
ABSTRACT ii
1 INTRODUCTION TO DBMS 1
3 SYSTEM DESIGN
3.1 ER Diagram with relationships and cardinality ratio
3.2. Schema Diagram
3.3 Codes for fronted
4 IMPLEMENTATION
4.1 Libraries and frameworks
4.2 Functional Modules
6.2 Sign Up
6.7 Post an Ad
CONCLUSION
BIBLIOGRAPHY
CHAPTER 1
INTRODUCTION
Database is a collection of data and Management System is a set of programs to store and
retrieve those data. Based on this one can define DBMS as a collection of inter-related data and
set of programs to store & access those data in an easy and effective manner.
Storage: According to the principles of database systems, the data is stored in such a way that it
acquires lot less space as the redundant data (duplicate data) has been removed before storage.
Let’s take a layman example to understand this. In a banking system, suppose a customer is having
two accounts, one is saving account and another is salary account. Let’s say bank stores saving
account data at one place (these places are called tables we will learn them later) and salary account
data at another place, in that case if the customer information such as customer name, address etc.
are stored at both places then this is just a wastage of storage (redundancy/ duplication of data), to
organize the data in a better way the information should be stored at one place and both the
accounts should be linked to that information somehow. The same thing we achieve in DBMS.
Fast Retrieval of data: Along with storing the data in an optimized and systematic manner, it is
also important that we retrieve the data quickly when needed. Database systems ensure that the
data is retrieved as quickly as possible.
cost
vendor support
The first task of a database designer is to produce a conceptual datamodel that reflects the
structure of the information to be held in the database. A common approach to this is to develop
an entity-relationship model, often with the aid of drawing tools. Another popular approach is
the Unified Modeling Language. A successful data model will accurately reflect the possible state
of the external world being modeled: for example, if people can have more than one phone number,
it will allow this information to be captured.
1.3 Objective
The main objective of this project is to determine how an interactive ads classified system
helps in the smooth functioning of shopping compared to traditional shopping system, by
digitizing all the records and transacting everything on a computer rather than on paper. This
project is a two-tier architecture application.
The program works on Desktop PC and is executed using PHP which interacts with a MySql
database running on localhost.
2.2.3 Reliability
Reliability is the ability of a system to perform its required functions under stated conditions
for a specific period of time. Constraints on the run-time behavior of the system can be
considered under two separate headings:
Availability: is the system available for service when requested by end-users.
Failure rate: how often does the system fail to deliver the service as expected by end-
users.
2.2.4. Efficiency
The comparison of what is actually produced or performed with what can be achieved with
the same consumption of Clouds (money, time, etc.). It is an important Factor in
Determination of Productivity.
The cardinality or fundamental principle of one data aspect with respect to another is a
critical feature. The relationship of one to the other must be precise and exact between
each other in order to explain how each aspect links together. In simple words Cardinality
is a way to define the relationship between two entities.
The ER diagram below shows the relationship between the many tables that exist in the
database for the functioning of Warehouse Inventory Management System.
<div class="row">
<div class="col-lg-12 col-sm-12">
<?php echo output_message($message); ?>
<h3>Find a product:</h3>
<form id="search-form" action="<?php echo HOME; ?>search" method="post">
<input id="search-box" autofocus class="form-control" type="text"
name="keyword" placeholder="Name of the product" > <br />
</form>
<div id="display">
<?php foreach($products as $product){ ?>
<?php $cat_name = category_details($product->category_id, NULL); ?>
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-5">
<div>
<p>
<span class="visible-lg visible-md visible-sm"><b>Category:</b> <?php echo
$cat_name; ?><br/></span>
<span class="visible-lg visible-md visible-sm visible-xs"><b>Product:</b>
<?php echo $product->name; ?><br /></span>
</p>
<style>
#myform{
display:none;
top:120px;
left:30%;
width:450px;
padding: 8px 30px;
position:absolute;
border: 1px solid black;
outline-style: solid;
outline-color: #47535E;
outline-width: 4px;
background-color: #758AA2;
z-index: 10;
box-shadow: 0 0 0 9999px rgba(0,0,0,0.5);
}
.btn{
font-size: 15px;
padding: 8px 18px;
cursor: pointer;
text-align: center;
color: white;
background-color: #7535E4;
border-radius: 15px;
}
</style>
</nav>
</div>
<div id = "myform">
<form action="feedback_control.php" method="post" name="feedback">
<label>How do you rate your overall experience?</label>
<p>
<label class="radio-inline">
<input type="radio" name="experience" id="radio_experience"
value="bad" >
Bad
</label>
<label class="radio-inline">
<input type="radio" name="experience" id="radio_experience"
value="average" >
Average
</label>
<label class="radio-inline">
<input type="radio" name="experience" id="radio_experience"
value="good" >
Good
</label>
</p>
<label for="name">
Your Name:</label>
<input type="text" name="name" required>
<label>
Your Email:</label>
<input type="text" name="email" required>
<label>
Write Your Comment:</label>
<input type="text" name="comment" required>
<div>
Submit: <input type="submit" value="Submit">
</div>
</form>
</div>
<div class="row">
<div class="col-lg-12 col-sm-12">
<h2>My AD's</h2>
Dept. of CSE, SAIT 2021-22 11
ADS Classified Design
</div>
</div><!-- End content Row -->
<?php include_layout_template('admin_footer.php'); ?>
New User? <a href="<?php echo HOME; ?>register">Sign Up</a><br /><br />
<a href="<?php echo HOME; ?>">Home</a>
</div>
</div>
</div>
</div>
</div>
<?php include_layout_template('footer.php'); ?>
<div class="row">
<div class="col-lg-12 col-sm-12">
<h2>Post An Ad</h2>
<div id="message">
<?php echo output_message($message); ?>
</div>
<div id = "form">
Dept. of CSE, SAIT 2021-22 13
ADS Classified Design
class MySQLDatabase {
private $connection;
public $last_query;
private $magic_quotes_active;
private $real_escape_string_exists;
function __construct() {
$this->open_connection();
$this->magic_quotes_active = get_magic_quotes_gpc();
$this->real_escape_string_exists = function_exists("mysqli_real_escape_string");
}
public function open_connection() {
$this->connection = mysqli_connect(DB_SERVER, DB_USER, DB_PASS);
if (!$this->connection) {
die("Database connection failed: " . mysql_error());
} else {
$db_select = mysqli_select_db($this->connection, DB_NAME);
if (!$db_select) {
die("Database selection failed: " . mysql_error());
}
}
}
}
$database = new MySQLDatabase();
$db =& $database;
?>
CHAPTER 4
IMPLEMENTATIONS
This chapter of the report describes the Functions, packages and modules used in the project:
4.2 PHP
HTML
Hypertext Markup Language is the standard markup language for documents designed to be
displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets
and scripting languages such as JavaScript.
CSS
Cascading Style Sheets is a style sheet language used for describing the presentation of adocument
written in a markup language like HTML, CSS is a comer-stone technology of the World Wide
Web, alongside HTML and JavaScript.
JavaScript
JavaScript, often abbreviated as JS, is a high-level, interpreted scripting language that conforms
to the ECMAScript specification. JavaScript has curly-bracket syntax, dynamic typing, prototype-
based object-orientation, and first-class functions.
Bootstrap
Bootstrap is a free open source front end development framework for the creation of websites
and web apps. The Bootstrap framework is built on HTML,CSS, and JavaScript to facilitate the
development of responsive, mobile-first site and apps.
Insert Module:
This module provides the functionality of collecting the required data from the designed
interface and transmitting it to the appropriate table present in the database designed for this
project. If the provided data does not satisfy the given constraints, it must refrain from storing it
into the database.
Update Module:
This module again has the functionality of collecting the data from the designed interface,
but it updates the already existing tuple that matches the provided primary key of the tuple to be
updated, by replacing the existing attribute values with the newly collected data. Again, if the
newly provided data does not satisfy the given constraints, it must refrain from updating the
corresponding tuple.
Delete Module:
The delete counterpart is loaded with the ability to delete a single or multiple records
from the table. It searches for the tuple, in the query specified table, based on the provided value
for an attribute. Admin can delete in the interface, based on which delete module searches for the
record corresponding to that provided attribute value and deletes the record.
Retrieve Module:
The retrieve module has a basic functionality of accessing the entire specified table from
the database and displays it.
Trigger Module:
Trigger in database is set of statements that are executed after an event occurs on the
specified table. This is useful for logs wherein every change in database can be logged which
helps keep a track of all changes/transactions on the database.
Users
Purchase Product
Add Product
Feedback
Review
User:
The users have to log in to the system and can then view all the items available on
The website .They ca also advertise their own product on the website which they want to
sell.
Purchase Product:
This section enables the user to choose the product they want to buy from the
items that are advertised. A user view the description about the products and find out
some information about the seller. After this, if the user is satisfied, he places the order
for purchasing that product.
Add Product:
This section of the application allows the users to add their products with clear
image and specific description. Product advertisement also needs information like name,
address, phone number, email address of the seller. So that the buyer can get enough
information about the product that can increase its possibility of getting sold.
Feedback:
This section of the application let the user express his opinion about the website
and its functionalities. This feature ensures whether the website is user- friendly or not.
Review:
The review section of the program makes the website more credible by giving an
opportunity to user for sharing his experience on the website. It helps other existing and
potential buyers in to take the purchasing decisions.
Management of products.
Management of suppliers.
Adding/deleting items or suppliers
Feedback and review
SCOPE OF ENHANCEMENT
There are also few features which can be integrated with the system to make it more
flexible.
Use hashing algorithms for storing passwords and avoid plaintext passwords.
Implement the update feature with hardware integration in the warehouse.
Port the program to other popular operating systems.
[1]Database System Models, Languages, Ramez Elmasri and Sham Kant B. Navathe, 7th
Edition,2017 Pearson.
[2]Fundamentals of Web Development, Randy Connolly and Ricardo Hoar ,First Impression ,
2016 Pearson.
WEBSITES
[1] www.stackoverflow.com
[2] www.youtube.com
[3] http://www.php.net/
[4] www.google.com
[5] http://www.w3schools.com/