Professional Documents
Culture Documents
Project Report
on
Foundation Management System
Developed by
Guided By
Internal Guide:
Prof. Roshni M. Raval
Department of Information Technology
Faculty of Technology
DD University
CERTIFICATE
I
ACKNOWLEDGEMENT
We would like to give our sincere acknowledgement to everybody responsible for the
successful completion of our project “FOUNDATION MANAGEMENT SYSTEM”.
The success and final outcome of this project required a lot of guidance and assistance from
many people and we are extremely privileged to have got this all along the completion of
this project.
We owe our deep gratitude to our project guide Prof. Roshni M. Raval, who took been
interest on our project work and guided us all along till the completion of our project work
by providing all the necessary help for developing a good Database System.
Finally we convoy our acknowledgement to all our friends and family members who
directly or indirectly associated with us in the successful completion of the project.We
thank one and all.
II
TABLE OF CONTENTS
I. Certificate .............................................................................................................. I
5. DATABASE IMPLEMENTION...........................................................................
5.1 Create Schema .................................................................................................9
5.2 Insert Data values ........................................................................................... 14
5.3 Queries (Based on functions, group by, having, joins, sub query etc.) ............ 24
5.4 PL/SQL Blocks (Procedures and Exception Handling) ................................... 28
5.5 Functions .......................................................................................................32
5.6 Triggers ......................................................................................................... 34
5.7 Cursors........................................................................................................... 37
5.8 Views. ............................................................................................................ 40
7. BIBLIOGRAPHY............................................................................................... 42
Foundation Management System 1.System Overview
1.SYSTEM OVERVIEW
Indians are becoming part of growing digital India. In India Foundation System involve
manual scholarship using paper forms. Also counting are done through hands as well as
registration of students are Manual. The Proposed system involve registration of users and
Candidates through computers. Also contain computerize shopping of medicines &
agriculture tools. The number of users obtained. It restricts duplication of students.
2.E-R DIAGRAM
3.DATA DICTIONARY
3.1 Agriculture_Tool
3.2 Blood_Camp_Detail
3.3 Blood_Donation_Camp
3.4 Foundation
3.5 Blood_Donor
3.6 Foundation_Account
3.7 Medicine_Shop
3.8 Purchase
3.9 Loan
3.10 Scholarship
3.11 Money_Donor
3.12 Student_Account
3.13 Student
3.14 Registration_SummerCamp
3.15 Summer_Place
3.16 SummerCamp
4.SCHEMA DIAGRAM
5.DATABASE IMPLEMENTATION
5.1.1 Agriculture_Tool
5.1.2 Blood_Camp_Detail
5.1.3 Blood_Donation_Camp
5.1.4 Blood_Donor
5.1.5 Foundation
5.1.6 Foundation_Account
5.1.7 Loan
5.1.8 Purchase
5.1.9 Medicine_Shop
5.1.10 Money_Donor
5.1.11 Registration_SummerCamp
5.1.12 Scholarship
5.1.13 Student
5.1.14 Student_Account
5.1.15 SummerCamp
5.1.16 Summer_Place
5.2.1 Agriculture_Tool
('T01', 'Tractor', '220000', '10%', '200000', 'Tractors (one of which is pictured above) are
available in sizes appropriate for farmers with 1 acre all the way up to those working 1,000
acres or more.', 'Krushi Bazar,Amreli', 'P01', '01.jpeg'),
('T02', 'Cultivator', '50000', '5%', '47500', 'Cultivators are used for—you probably already
guessed this—soil cultivation. In particular, cultivators are used for weed control before
planting into a bed, as well as incorporating crop or weed residues and preparing a seed
bed.', 'Sardar Market,Surat', 'P03', '02.png'),
('T03', 'Cultipacker', '60000', '15%', '51000', 'Cultipackers are pulled behind tractors to firm
seedbeds before seeding to set up your planting for good seed-to-soil contact. Following
up broadcast seeding with a pass with the cultipacker will press the seeds into the soil.',
'Kheti Bazar Samiti,N', 'P09', '03.png'),
('T04', 'Plows', '30000', '10%', '270000', 'Moldboard plows: These are most often used on
land that has not been in crop production before or has been fallow for a long time. The
large wings of the plow are designed to cut into and turn over all of the soil in an area.',
'SK Road,Rajkot', 'P06', '04.png'),
('T05', 'Seed Drills', '55000', '5%', '50000', 'Seed drills are tractor attachments that insert
seeds into the ground with minimal soil disturbance. They are most often used for row
crops (such as grains), cover crops, and grasses or forage. There are no-till seed drills and
traditional seed drills.', 'Krushi Bazar,Bhavana', 'P04', '05.png');
5.2.2 Blood_Camp_Detail
5.2.3 Blood_Donation_Camp
5.2.4 Foundation_Account
5.2.5 Foundation
5.2.6 Blood_Donor
5.2.7 Loan
5.2.8 Medicine_Shop
('M01', 'Himalaya AyurSlim Capsule 60s', '220', '15%', '191.25', 'Obesity, Hyperlipidemia
and craving for sugar.Two tablet twice daily after meals or as directed by your physician.',
'Kamrej,Surat', 'P05', 'm01.jpeg'),
('M02', 'Softovac Powder 100gm', '127', '0%', '127', 'SOFTOVAC is used to relieve
constipation including constipation during pregnancy.It can also be used to help maintain
normal bowel function if you suffer from haemorrhoids (piles).',
'Navrangpura,Ahmedabad', 'P09', 'm02.jpeg'),
('M03', 'SederOM Tablet', '330', '8%', '303.6', 'Helps in the formation of red blood and nerve
cells.Facilitates aid in case of chronic blood loss or poor absorption', 'Vaniyavad,Nadiad',
'P07', 'm03.jpeg'),
('M04', 'Himalaya Liv.52 Tablet', '100', '10%', '90', 'Protects from alcohol-induced liver
damage and arrests the progress of cirrhosis.Improves the appetite and promotes weight
gain.', 'Hansot,Ankleshwar', 'P03', 'm04.jpeg'),
('M05', 'Dabur Pudin Hara Pearls', '30', '0%', '30', 'Dabur Pudin Hara Pearls contains herbal
extracts known to naturally provide relief from various stomach related ailments like
indigestion, stomachache, and gas.', 'Lalbaug,Vadodara', 'P06', 'm05.jpeg');
5.2.9 Money_Donor
5.2.10 Purchase
5.2.11 Registration_SummerCamp
5.2.12 Scholarship
5.2.13 SummerCamp
5.2.14 Summer_Place
5.2.15 Student
INSERT INTO `student` (`sid`, `fname`, `lname`, `emailid`, `mobileno`, `dob`, `income`,
`city`, `pincode`, `branch`, `ptr`, `type`) VALUES
('S01', 'Jenish', 'Vekariya', 'jenishvekr0031@gmail.com', '9365788787', '2001-08-13',
200000, 'Surat', 395006, 'Science', 94, 'Scholarship'),
('S02', 'Yash', 'Suhagiya', 'yashsuhagiya@gmail.com', '7878906543', '2000-07-13', 150000,
'Surat', 395006, 'Science', 93, 'Scholarship'),
('S03', 'Rishil', 'Bhalani', 'rishilbhalani98@gmail.com', '7689054321', '2000-07-14',
257000, 'Surat', 395006, 'Commerce', 84, 'Loan'),
('S04', 'Keval', 'Talaviya', 'kevaltalaviya67@gmail.com', '8980764532', '2000-07-01',
234000, 'Surat', 395006, 'Science', 93, 'Scholarship'),
('S05', 'Raj', 'Patel', 'raj5674@gmail.com', '9078653412', '2001-09-13', 150000, 'Vadodara',
396005, 'Commerce', 79, 'Loan'),
('S06', 'Dhruvang', 'Patel', 'dpc292299@gmail.com', '7890654321', '2000-02-29', 140000,
'Bharuch', 348002, 'Science', 80, 'Loan'),
('S07', 'Abhi', 'Thummar', 'abhithummar45@gmail.com', '6543217890', '2000-07-13',
200000, 'Surat', 395006, 'Commerce', 90, 'Scholarship'),
('S08', 'Pradip', 'Ghevariya', 'pradipghevariya41@gmail.com', '9786564320', '1999-11-05',
160000, 'Surat', 395006, 'Science', 93, 'Scholarship'),
('S09', 'Manan', 'Solanki', 'mnnsolnki@gmail.com', '9876543210', '1999-05-19', 190000,
'Nadiad', 387001, 'Commerce', 82, 'Loan'),
5.2.16 Student_Account
5.3 QUERIES
5.3.2 Count Number Of Students In Each Bank And Display Along With Bank Name
In Decreasing Order.
5.3.3 Display Full Name , Age And Email ID Of Person Who Register For Summer
Camp And Whose Summer Place Has More Than 5 Days.
5.3.4 Display Tool Name , New Price , Description And Address Of Agriculture Tool
Whose New Price Is In Between 40000 And 60000.
5.3.5 Display Full Name , Mobile No And Income Of Students Who Are Getting
Scholarship Amount More Than 6000.
5.3.6 Display All The Information Of Money Donor Whose Name Starts With R.
5.3.7 Count Number Of Blood Donor Who Have Same Blood Group And Display It
Where Count Is Greater Than Or Equal To 2.
5.3.8 Display Student ID , Nane And Scholarship Amount Of Three Students Who
Are Getting Maximum Scholarship.
5.3.9 Display Information About Student Whose Family Income Is Greater Than
150000.
5.4.1 This “New_Student” Procedure Works Like Insert Query But If Ptr Is Greater
Than 85 Then It Adds To Scholarship Otherwise To Loan And Insert Into Student
Account Table Also.
DELIMITER $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `New_Student`(IN `Fname`
VARCHAR(11), IN `Lname` VARCHAR(11), IN `Emailid` VARCHAR(30), IN
`Mobileno` VARCHAR(10), IN `Dob` DATE, IN `Income` INT(10), IN `City`
VARCHAR(10), IN `Pincode` INT(6), IN `Branch` VARCHAR(10), IN `Ptr` FLOAT,
IN `AccountNo` VARCHAR(11), IN `BankName` VARCHAR(11), IN `IFSC`
VARCHAR(12))
BEGIN
DECLARE CNT varchar(4);
END IF;
INSERT INTO student_account(sid,accountno,bankname,ifsccode)
VALUES(concat('S',CNT),AccountNo,BankName,IFSC);
SELECT 'Your Data Added Successfully To The Table.' AS MESSAGE;
END$$
DELIMITER ;
Output Message
Student Table
5.4.2 This “New_Money_Donor” Procedure Insert The Value Into Money Donor
Table With Checking Email Id Is Valid Or Not.
DELIMITER $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `New_Money_Donor`(IN
`Fname` VARCHAR(11), IN `Lname` VARCHAR(11), IN `Amount` VARCHAR(10),
IN `Mobileno` VARCHAR(10), IN `Emailid` VARCHAR(30), IN `DonateType`
VARCHAR(15))
BEGIN
DECLARE CNT varchar(4);
Output Message
DELIMITER $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `New_Reg_Exception`(IN
`Fname` VARCHAR(11), IN `Lname` VARCHAR(11), IN `Age` INT(3), IN `Emailid`
VARCHAR(30))
BEGIN
DECLARE CNT varchar(4);
DECLARE age_exception CONDITION FOR SQLSTATE '22012';
DECLARE EXIT HANDLER FOR age_exception
BEGIN
RESIGNAL SET MESSAGE_TEXT='You Are Not Eligile For Summer
Camp Because Your Age Is Less Then 16 Or Above 55..';
END;
INSERT INTO
registration_summercamp(peopleid,fname,lname,age,emailid)
VALUES( concat('P',CNT),Fname,Lname,Age,Emailid);
ELSE
SELECT 'YOUR EMAIL ID IS NOT VALID' AS ERROR;
END IF;
ELSE
SIGNAL age_exception;
END IF;
END$$
DELIMITER ;
1. Output Message
2. Registration Table
5.5 FUNCTIONS
DELIMITER $$
CREATE DEFINER=`root`@`localhost` FUNCTION `New_Medicine_Price`(`Mid`
VARCHAR(4), `Name` VARCHAR(50), `OldPrice` VARCHAR(10), `Discount`
VARCHAR(3), `Discription` TEXT, `Address` VARCHAR(30), `Purchaseid`
VARCHAR(4)) RETURNS varchar(10) CHARSET latin1
BEGIN
DECLARE NewPrice varchar(10);
DECLARE Price varchar(10);
SET Price=((OldPrice*Discount)/100);
SET NewPrice=OldPrice-Price;
RETURN NewPrice;
END$$
DELIMITER ;
Input
Output
5.5.2 This “Loan_Amout” Function Gives The Loan Amount Information Of Given
Student ID.
DELIMITER $$
CREATE DEFINER=`root`@`localhost` FUNCTION `Loan_Amount`(`Sid`
VARCHAR(4)) RETURNS int(6)
BEGIN
RETURN Amount;
END$$
DELIMITER ;
Input
Output
5.6 TRIGGERS
5.6.1 This “New_Student” Trigger Called After New Data Is Inserted Into Student
Table.This Trigger Insert The Data Into Scholarship Or Loan Table And Update The
Value In Foundation Account.
1. Scholarship Table
2. Foundation Table
INSERT INTO `student` (`sid`, `fname`, `lname`, `emailid`, `mobileno`, `dob`, `income`,
`city`, `pincode`, `branch`, `ptr`, `type`) VALUES ('S11', 'Keyur', 'Patel',
'keyurpatel@gmail.com', '8749256471', '2000-03-12', 140000, 'Mahesana', 354008,
'Science', 86, 'Scholarship');
1. Scholarship Table
5.6.2 This “New_Donor” Trigger Called After Insert The Value Into Money Donor
Table. This Trigger Update The Value Of Foundation Account As The Donor Donate
The Money For Scholarship Or Loan.
IF new.donate_type='Scholarship' THEN
SELECT scholarship INTO Amount FROM foundation_account;
SET NewAmount=Amount+new.amount;
UPDATE foundation_account SET scholarship=NewAmount;
ELSEIF new.donate_type='Loan' THEN
SELECT loan INTO Amount FROM foundation_account;
SET NewAmount=Amount+new.amount;
UPDATE foundation_account SET loan=NewAmount;
END IF;
END
5.7 CURSORS
5.7.1 This “SummerPlace” Cursor Gives The Information About People Full Name
And Where They Are Going For Summer Vacation.
DELIMITER $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `SummerPlace`()
BEGIN
DECLARE Fname varchar(11);
DECLARE Lname varchar(11);
DECLARE Place varchar(20);
DECLARE finished int(2);
OPEN c2;
gets: LOOP
END IF;
CLOSE c2;
END$$
DELIMITER ;
Output
5.7.2 This “Student_Scholarship” Cursor Gives The Information About Student Full
Name And Their Allocated Scholarship Amount.
DELIMITER $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `Student_Scholarship_Cursor`()
BEGIN
DECLARE Fname varchar(11);
DECLARE Lname varchar(11);
DECLARE Amount int(6);
DECLARE finished int(2);
OPEN c1;
get_detail: LOOP
IF finished=1 THEN
LEAVE get_detail;
END IF;
Output
5.8 VIEWS
5.8.2 Give The Information Of Blood Donation Camp Which Is Between Dates
‘2000-11-05’ And ‘2000-11-20’.
We will design Front-end Design in HTML , CSS , JavaScript and Develop Bank-
end in Python.
For security purpose New Registration is done using OTP.
We will make database more consistent and We are making this database efficient
and easy to implement with huge data capacity.
Methods and user data input will be lot easy after the implement of GUI.
We will also add some extra features so that the users can get answer for their
complaints as fast as possible.
7.BIBLIOGRAPHY
Reference book:
Data Base System Concepts
-Henry F. Korth & A. Silberschatz 2nd Ed. McGraw-Hill 1991
Reference Websites:
https://www.stackoverflow.com/
https://www.w3school.com/
https://www.tutorialspoint.com/
http://www.mysqltutorial.org/