You are on page 1of 11

M.E.S.

INDIAN SCHOOL
DOHA-QATAR

Informatics Practices Project


(2020-21)

BIRTH CERTIFICATE GENERATOR

SUBMITTED BY: Aaisha Zuber Siddiqui


UNDER THE GUIDANCE OF: Mrs.Abirami Ramesh

BONAFIED CERTIFICATE
This is to certify that Miss
........................................................... of class XII has
completed her Informatics Practices project during the academic year 2020-2021 at
M.E.S Indian School Doha, Qatar and her project report is certified.

Signature of Teacher In charge: ...........................................


Name: ....................................................................
Date: .......................................................................
School Stamp:
Roll Number/Registration Number

Submitted for All India Senior School Certificate Practical Examination (Class XII)
held ar M.E.S India School, Doha-Qatar on ....................................
Internal Examiner External Examiner
Signature..................................
Signature......................
Name........................................
Name..............................

. ACKNOWLEDGEMENT .

I am extremely privileged and greateful to express my sincere thanks to all who


have helped me complete this project. At first, I thank the Lord Almighty for
giving me the strength to take up this task. I express my sincere thanks to Mrs.
Hameeda Kadar, Principal and Mrs. AnnammaShammy,

H.O.S. Girls� for their constant support and encouragement. This project would not
have reached its completion without the support, guidance, and advice of my
computer science teacher, Mrs.Abirami Ramesh for which I am extremely thankful to
her.
Last but not the least, I thank my parents and acquaintances for all their support
and love.

CONTENT
Synopsis
About python
About MYSQL
System requirements
Source codes
Output
MYSQL Tables
Future scope
Bibliography

. SYNOPSIS .
This software project is developed to automate functionalities of a birth
certificate generator. The purpose of this software project is:
To provide a user friendly integrated and centralized environment for computerized
Birth Certificate Generator.
The proposed system should maintain all the records and should generate the
required reports and information when required.
To provide efficient and secured Information storage, flow and retrieval system,
ensuring the integrity and validity of records.
To provide user-friendly interface to interact with a centralized database based on
client-server architecture.
To identify the critical operation procedure and possibilities of simplification
using modern IT tools and practices.
This project is mainly based on generating Birth Certificates. It will store the
information and can be extracted when needed.
It will ask for all the information like name, age, date of birth, address etc.
which is required to produce the birth certificate.

. ABOUT PYTHON .

Python is a high level programming language developed by Guido van


Rossum in 1991 at National Research Institute for Mathematics,Netherlands.It is
presently owned by Python software Foundation (PSF).
Features of Python
1. Python is an interpreted, interactive, directly executedlanguage.
2. It is free open-source software having large repository oflibraries.
3. It is extensible and highly efficient as there is no wastage oftime in declaring
variables.
Advantages of Python
1. Platform independent � It can run across different platforms
like windows, Linux, Mac OS and other OS.
2. Easy to use (Readability) � It uses simple, concise and
English like instructions that are easy to read and understand.
3. High Productivity � It is a simple language with small codes
and extensive libraries. Therefore it offers higher productivity to
programmers as compared to C++ and java.
4. Less learning time� Because of simple and shorter code,
lesser time is required to understand and learn python.
5. Syntax highlighting � It allows to distinguish between input,
output and error message by different colour codes.
6. Interpreted language � Code execution & interpretation line by line

. HOW TO WORK IN PYTHON .


STARTING IDLE From Start Menu, open IDLE as follows: Start menu--> Apps by name--
>IDLE(Python 3.7 32 bit) Or Click on the icon to start IDLE It always starts up in
the shell. Python IDLE comprises Python shell (Interactive mode) and Python Editor
(Script mode). INTERACTING WITH PYTHON �PYTHON SHELL: Python shell is an
interactive window where you can type in the python code and see the output on the
same window. It is an interface between the python command and the OS.
. About MYSQL .
What is MySQL ?
The management of data in a database system is done by means of a general-purpose
software package called a Database Management System (DBMS). Some commercially
available RDBMS are MS SQL Server, MS ACCESS, INGRES, ORACLE, and Sybase.
MySQL, the most popular Open Source SQL database management system, is developed,
distributed, and supported by Oracle Corporation. MySQL is named after co-founder
Monty Widenius's daughter, My. The name of the MySQL Dolphin (our logo) is
�Sakila,�.
MySQL is a database management system.
A database is a structured collection of data. It may be anything from a simple
shopping list to a picture gallery or the vast amounts of information in a
corporate network. To add, access, and process data stored in a computer database,
you need a database management system such as MySQL Server. Since computers are
very good at handling large amounts of data, database management systems play a
central role in computing, as standalone utilities, or as parts of other
applications.
MySQL is based on SQL.
A relational database stores data in separate tables rather than putting all the
data in one big storeroom. This adds speed and flexibility. The SQL part of �MySQL�
stands for �Structured Query Language.� SQL is the most common standardized
language used to access databases and is defined by the ANSI/ISO SQL Standard. The
SQL standard has been evolving since 1986 and several versions exist. In this
manual, �SQL-92� refers to the standard released in 1992, �SQL:1999� refers to the
standard released in 1999, and �SQL:2003� refers to the current version of the
standard.

MySQL software is Open Source.


Open Source means that it is possible for anyone to use and modify the software.
Anybody can download the MySQL software from the Internet
and use it without paying anything. If you wish, you may study the source code and
change it to suit your needs. The MySQL software uses the GPL (GNU General Public
License),
The MySQL Database Server is very fast, reliable, and easy to use.
If that is what you are looking for, you should give it a try. MySQL Server also
has a practical set of features developed in close cooperation with our users. You
can find a performance comparison of MySQL Server with other database managers on
our benchmark page. MySQL Server was originally developed to handle large databases
much faster than existing solutions and has been successfully used in highly
demanding production environments for several years. Although under constant
development, MySQL Server today offers a rich and useful set of functions. Its
connectivity, speed, and security make MySQL Server highly suited for accessing
databases on the Internet.

MySQL Server works in client/server or embedded systems.


The MySQL Database Software is a client/server system that consists of a multi-
threaded SQL server that supports different backends, several different client
programs and libraries, administrative tools, and a wide range of application
programming interfaces (APIs).
The Main Features of MySQL
Written in C and C++.
Works on many different platforms.
Uses multi-layered server design with independent modules.
Provides transactional and nontransactional storage engines.
Designed to make it relatively easy to add other storage engines. This is useful if
you want to provide an SQL interface for an in-house database.
Uses a very fast thread-based memory allocation system.
Executes very fast joins using an optimized nested-loop join.

Implements SQL functions using a highly optimized class library that should be as
fast as possible. Usually there is no memory allocation at all after query
initialization.
Provides the server as a separate program for use in a client/server networked
environment, and as a library that can be embedded (linked) into standalone
applications. Such applications can be used in isolation or in environments where
no network is available.
Password security by encryption of all password traffic when you connect to a
server.
Support for large databases. We use MySQL Server with databases that contain 50
million records. We also know of users who use MySQL Server with 200,000 tables and
about 5,000,000,000 rows.
MySQL client programs can be written in many languages. A client library written in
C is available for clients written in C or C++, or for any language that provides C
bindings.
APIs for C, C++, Eiffel, Java, Perl, PHP, Python, Ruby, and Tcl are available,
enabling MySQL clients to be written in many languages.
The Connector/ODBC (MyODBC) interface provides MySQL support for client programs
that use ODBC (Open Database Connectivity) connections.
The Connector/J interface provides MySQL support for Java client programs that use
JDBC connections. Clients can be run on Windows or Unix. Connector/J source is
available.

What is Database?
Introduction and Concepts:
A database is a collection of information related to a particular subject or
purpose, such as tracking customer orders or maintaining a music collection. Using
any RDBMS application software like MS SQL Server, MySQL, Oracle, Sybase etc, you
can manage all your information from a single database file. Within the file,
divide your data into separate storage containers called tables. You may and
retrieve the data using queries.
A table is a collection of data about a specific topic, such as products or
suppliers. Using a separate table for each topic means you can store that data only
once, which makes your database more efficient and reduces data-entry errors. Table
organises data into columns (called fields) and rows (called records).

A Primary key is one or more fields whose value or values uniquely identify each
record in a table. In a relationship, a primary key is used to refer to specific
record in one table from another table. A primary key is called foreign key when it
is referred to from another table.
To find and retrieve just the data that meets conditions you specify, including
data from multiple tables, create a query. A query can also update or delete
multiple records at the same time, and perform built-in or custom calculations on
your data.

Role of RDBMS Application Program:


A computer database works as a electronic filing system, which has a large number
of ways of cross-referencing, and this allows the user many different ways in which
to re-organize and retrieve data. A database can handle business inventory,
accounting and filing and use the information in its files to prepare summaries,
estimates and other reports. The management of data in a database system is done by
means of a general-purpose software package called a Database Management System
(DBMS). Some commercially available DBMS are MS SQL Server, MS ACCESS, INGRES,
ORACLE, and Sybase. A database management system, therefore, is a combination of
hardware and software that can be used to set up and monitor a database, and can
manage the updating andretrieval of database that has been stored in it. Most of
the database management systems have the following capabilities:
Creating of a table, addition, deletion, modification of records.
Retrieving data collectively or selectively.
The data stored can be sorted or indexed at the user's discretion and direction.
Various reports can be produced from the system. These may be either standardized
report or that may be specifically generated according to specific user definition.
Mathematical functions can be performed and the data stored in the database can be
manipulated with these functions to perform the desired calculations.
To maintain data integrity and database use.

The DBMS interprets and processes users' requests to retrieve information from a
database. In most cases, a query request will have to penetrate several layers of
software in the DBMS and operating system before the physical database can be
accessed. The DBMS responds to a query by invoking the appropriate subprograms,
each of which performs its special function to interpret the query, or to locate
the desired data in the database and present it in the desired order.

. Python �MySQL Connectivity .

Database connectivity-Database connectivity refers to connection and communication


between an application and a databasesystem.
Any user interface designed in any programming language is Front End where as data
given by database as response is known as Back-Enddatabase.
SQL is just a query language; it is not a database. To perform SQL queries, we need
to install any database for example Oracle, MySQL, MongoDB, PostGres SQL, SQL
Server, DB2etc.
The Python standard for database interfaces is the Python DB-API. Python Database
API supports a wide range of database servers, like msql ,mysql, postgressql,
Informix, oracle, Sybaseetc.

Steps for Creating Database connectivity Applications


Start python
Import sqlinterface with following command
import mysql.connector
3. Open and establish a connection to database
4. Create cursor object
A database cursor is a special control structure that facilitates row by row
processing and accessing of records in the result set(set of records retrieved
according the query)
5. Execute a query
cursor.execute() method is used to execute sql queries
6. Extract data from result set
7. Clean up the environment

Understanding the python MySQL Database connection program

import mysql.connector
This line imports the MySQL connector python module in theprogram
Myql-connector Error object is used to show an error when we fail to connect
databaseobject
mysql.connector.connect( )
Using this function we can connect the MySQLdatabase;
This function accepts four parameters: Host, User, Passwd,database.
connect() : This method is used for creating a connection to our database it have
four arguments:
o Host Name
o Database User Name
o Database Password
o Database Name

Connection.cursor()
This method returns a cursor object.
Using cursor object,we can executequeries
cursor() : This method creates a cursor object that is capable for executing sql
query on database.
execute() : This method is used for executing sql query on database. It takes a
sqlquery( as string) as an argument.
close() : This method close the database connection.

Read Operation

Read operation on any database means to fetch some useful information from the
database.We can use fetchone() method to fetch single record, fetchall() method to
fetch multiple values from a database table.

fetchone() ? It fetches the next row of a query result set.


A result set is an object that is returned when a cursor object is used to query a
table

fetchall() ? It fetches all the rows in a result set.


If some rows have already been extracted from the result set
then it retrieves the remaining rows from the result set

rowcount()?This is a read-only attribute and returns the number of rows that were
affected by an execute() method.

. SYSTEM REQUIREMNETS .

HARDWARE REQUIREMENTS

Processor
Keyboard
Minimum memory - 2GB

2. SOFTWARE REQUIREMENTS

Python IDLE
MYSQL

. SOURCE CODE .
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
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 */;

--
-- Database: `birth-certificate`
--

-- --------------------------------------------------------

--
-- Table structure for table `tbl_admin`
--

CREATE TABLE `tbl_admin` (


`adminId` int(11) NOT NULL,
`firstName` varchar(50) NOT NULL,
`lastName` varchar(50) NOT NULL,
`email` varchar(50) NOT NULL,
`userPass` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tbl_admin`
--

INSERT INTO `tbl_admin` (`adminId`, `firstName`, `lastName`, `email`, `userPass`)


VALUES
(1, 'Admin', 'Admin', 'admin@admin.com', '5f4dcc3b5aa765d61d8327deb882cf99');

-- --------------------------------------------------------

--
-- Table structure for table `tbl_births`
--

CREATE TABLE `tbl_births` (


`entryNo` int(11) NOT NULL,
`childFirstName` varchar(50) NOT NULL,
`childOtherName` varchar(50) NOT NULL,
`fatherTribalName` varchar(50) NOT NULL,
`childDateOfBirth` datetime NOT NULL,
`sex` varchar(10) NOT NULL,
`placeOfBirth` varchar(50) NOT NULL,
`townOfBirth` varchar(50) NOT NULL,
`countyOfBirth` varchar(50) NOT NULL,
`fatherFirstName` varchar(50) NOT NULL,
`fatherOtherName` varchar(50) NOT NULL,
`theFatherTribalName` varchar(50) NOT NULL,
`motherId` int(50) NOT NULL,
`nameOfRegOfficer` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tbl_births`
--

INSERT INTO `tbl_births` (`entryNo`, `childFirstName`, `childOtherName`,


`fatherTribalName`, `childDateOfBirth`, `sex`, `placeOfBirth`, `townOfBirth`,
`countyOfBirth`, `fatherFirstName`, `fatherOtherName`, `theFatherTribalName`,
`motherId`, `nameOfRegOfficer`) VALUES
(2, 'Hildah', 'Mueni', 'Musau', '2018-01-17 00:00:00', 'Female', 'Nursing',
'Kitale', 'Mombasa', 'Simon', 'Ndululu', 'Musau', 12345678, 1);

-- --------------------------------------------------------

--
-- Table structure for table `tbl_counties`
--

CREATE TABLE `tbl_counties` (


`countyId` int(11) NOT NULL,
`countyName` varchar(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tbl_counties`
--

INSERT INTO `tbl_counties` (`countyId`, `countyName`) VALUES


(1, 'Mombasa'),
(2, 'Kwale');

-- --------------------------------------------------------

--
-- Table structure for table `tbl_mothers`
--

CREATE TABLE `tbl_mothers` (


`idNumber` int(20) NOT NULL,
`firstName` varchar(50) NOT NULL,
`lastName` varchar(50) NOT NULL,
`email` varchar(50) NOT NULL,
`phoneNumber` varchar(15) NOT NULL,
`userPass` varchar(50) NOT NULL,
`dateCreated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE
CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tbl_mothers`
--

INSERT INTO `tbl_mothers` (`idNumber`, `firstName`, `lastName`, `email`,


`phoneNumber`, `userPass`, `dateCreated`) VALUES
(12345678, 'Mercy', 'Mathu', 'mercy@mathu.com', '0712345678',
'5f4dcc3b5aa765d61d8327deb882cf99', '2018-04-02 18:35:06');

-- --------------------------------------------------------
--
-- Stand-in structure for view `view_birth_certificates`
-- (See below for the actual view)
--
CREATE TABLE `view_birth_certificates` (
`entryNo` int(11)
,`childFirstName` varchar(50)
,`childOtherName` varchar(50)
,`fatherTribalName` varchar(50)
,`childDateOfBirth` datetime
,`sex` varchar(10)
,`placeOfBirth` varchar(50)
,`townOfBirth` varchar(50)
,`countyOfBirth` varchar(50)
,`fatherFirstName` varchar(50)
,`fatherOtherName` varchar(50)
,`theFatherTribalName` varchar(50)
,`motherId` int(50)
,`nameOfRegOfficer` int(10)
,`idNumber` int(20)
,`motherFirstName` varchar(50)
,`motherLastName` varchar(50)
,`email` varchar(50)
,`phoneNumber` varchar(15)
,`adminId` int(11)
,`adminFirstName` varchar(50)
,`adminLastName` varchar(50)
);

-- --------------------------------------------------------

--
-- Structure for view `view_birth_certificates`
--
DROP TABLE IF EXISTS `view_birth_certificates`;

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW


`view_birth_certificates` AS select `tbl_births`.`entryNo` AS
`entryNo`,`tbl_births`.`childFirstName` AS
`childFirstName`,`tbl_births`.`childOtherName` AS
`childOtherName`,`tbl_births`.`fatherTribalName` AS
`fatherTribalName`,`tbl_births`.`childDateOfBirth` AS
`childDateOfBirth`,`tbl_births`.`sex` AS `sex`,`tbl_births`.`placeOfBirth` AS
`placeOfBirth`,`tbl_births`.`townOfBirth` AS
`townOfBirth`,`tbl_births`.`countyOfBirth` AS
`countyOfBirth`,`tbl_births`.`fatherFirstName` AS
`fatherFirstName`,`tbl_births`.`fatherOtherName` AS
`fatherOtherName`,`tbl_births`.`theFatherTribalName` AS
`theFatherTribalName`,`tbl_births`.`motherId` AS
`motherId`,`tbl_births`.`nameOfRegOfficer` AS
`nameOfRegOfficer`,`tbl_mothers`.`idNumber` AS `idNumber`,`tbl_mothers`.`firstName`
AS `motherFirstName`,`tbl_mothers`.`lastName` AS
`motherLastName`,`tbl_mothers`.`email` AS `email`,`tbl_mothers`.`phoneNumber` AS
`phoneNumber`,`tbl_admin`.`adminId` AS `adminId`,`tbl_admin`.`firstName` AS
`adminFirstName`,`tbl_admin`.`lastName` AS `adminLastName` from ((`tbl_mothers`
join `tbl_births`) join `tbl_admin`) where ((`tbl_births`.`nameOfRegOfficer` =
`tbl_admin`.`adminId`) and (`tbl_births`.`motherId` = `tbl_mothers`.`idNumber`)) ;
--
-- Indexes for dumped tables
--

--
-- Indexes for table `tbl_admin`
--
ALTER TABLE `tbl_admin`
ADD PRIMARY KEY (`adminId`),
ADD UNIQUE KEY `email` (`email`);

--
-- Indexes for table `tbl_births`
--
ALTER TABLE `tbl_births`
ADD PRIMARY KEY (`entryNo`),
ADD KEY `motherId` (`motherId`),
ADD KEY `nameOfRegOfficer` (`nameOfRegOfficer`);

--
-- Indexes for table `tbl_counties`
--
ALTER TABLE `tbl_counties`
ADD PRIMARY KEY (`countyId`);

--
-- Indexes for table `tbl_mothers`
--
ALTER TABLE `tbl_mothers`
ADD PRIMARY KEY (`idNumber`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `tbl_admin`
--
ALTER TABLE `tbl_admin`
MODIFY `adminId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `tbl_births`
--
ALTER TABLE `tbl_births`
MODIFY `entryNo` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `tbl_counties`
--
ALTER TABLE `tbl_counties`
MODIFY `countyId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `tbl_births`
--
ALTER TABLE `tbl_births`
ADD CONSTRAINT `tbl_births_ibfk_1` FOREIGN KEY (`motherId`) REFERENCES
`tbl_mothers` (`idNumber`),
ADD CONSTRAINT `tbl_births_ibfk_2` FOREIGN KEY (`nameOfRegOfficer`) REFERENCES
`tbl_admin` (`adminId`);
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;


/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

BIBLIOGRAPHY

In order to work on this project titledPAITHAL PARADISE, the following are referred
by me during the various phases of development of the project.
http://www.mysql.org/
2). python.org
3) Informatics Practices with python XII
-by PreetiArora

Various Websites of Discussion Forum and software development activities.


Other than the above-mentioned, the suggestions and supervision of my teacher and
my class experience also helped me to develop this software project.

You might also like