Contact Management System Project Report
Contact Management System Project Report
“SAIYAM GULATI”
Enrolment No. AJU/190537
Page 1 of 115
Food ordering System
PROJECT REPORT
ON
INFORMATION TECHNOLOGY
BATCH 2019-22
SUBMITTED TO
DEPARTMENT OF COMPUTER SCIENCE & IT
Page 2 of 115
Page 3 of 115
ABSTRACT
We conducted a lab study to test how well these criteria predict contact
importance. Subjects identified important contacts from their email
archives. We then analyzed their email to extract features for all contacts.
Reciprocity, recency and longevity of email interaction proved to be
strong predictors of contact importance. The experiment also identified
another contact management problem: removing ‘stale’ contacts from
long term archives. We discuss the design and theoretical implications of
these results.
Page 4 of 115
ACKNOWLEDGEMENT
Last but not the least, I would like to thank friends who help me to
assemble the parts and gave a suggestion about the project.
Page 5 of 115
Page 6 of 115
CONTENT
ABSTRACT .............................................................................................5
ACKNOWLEDGEMENT .....................................................................6
DECLARATION ....................................................................................7
Chapter 1 ............................................................................................... 11
1. Introduction .......................................................................................11
1.1 Introduction to system .....................................................................11
1.2 Scope of the System.........................................................................12
1.3 Field study of contact management .................................................13
Chapter 2 ............................................................................................... 14
2. Analysis ..............................................................................................14
2.1 The Value of Contact Information ..................................................14
2.2 Problems: 15
2.3 Contact Selection .............................................................................16
2.4 Data Entry: 17
2.5 Diversity of Tools ............................................................................17
2.6 Criteria for Determining ..................................................................18
Chapter 3 ............................................................................................... 19
3. Experimental Study of factors underlying perceptions of
contact importance ...............................................................................19
3.1 Hypotheses: 20
3.2 Frequency: 20
3.3 Reciprocity: 21
3.4 Recency: 21
3.5 Method: 22
3.6 Results: 23
Page 7 of 115
Chapter 4 ............................................................................................... 24
4. Comprison of field and lab studies..................................................24
Chapter 5 ............................................................................................... 25
5. Design and theory implications .......................................................25
Chapter 6 ............................................................................................... 26
6. Hardware and Software specifications ............................................ 26
Chapter 7 ............................................................................................... 27
7. About Python ....................................................................................27
Chapter 8 ............................................................................................... 32
8. SQLite databases ..............................................................................32
Chapter 9 37
9. Software development process ..........................................................37
Chapter 10 49
10. Data Flow Diagram (DFD) ............................................................... 49
SYMBOLS ....................................................................................49
Data flow diagram symbol.............................................................49
10.1. Context level DFD – 0 level .........................................................50
10.2. DFD 1 level...................................................................................50
10.3. DFD 2 level...................................................................................51
10.5. ER Diagram ..................................................................................53
Chapter 11 .............................................................................................54
11. Program Code and Testing ............................................................54
Chapter 13 .............................................................................................91
13. Testing Approach............................................................................91
13.1. Type of Testing ...........................................................................101
13.2. Use Case 101
Every use case contains three essential elements .........................102
Page 8 of 115
The writing process includes .......................................................102
Benefits OF USE CASE ..............................................................103
Other benefits of use case development include .........................103
12.3 Test Case 103
Test Case Template......................................................................104
Chapter 14 ...........................................................................................106
14. Output Screen of Contact Management System .......................106
14.1 CMS Home Page .........................................................................106
14.2 Operational Keys .........................................................................107
14.3 New contact entry ........................................................................108
14.4 Search Contact .............................................................................109
14.5 View All Contact .........................................................................110
14.6 Update record...............................................................................111
14.7 Reset All field ..............................................................................112
14.8 Delete Contact .............................................................................113
Conclusion ...........................................................................................114
Application Highlights: .......................................................................114
Bibliography ........................................................................................115
Page 9 of 115
Chapter 1
1. Introduction
Theorizing about asynchronous communication ha8s been dominated by comparisons with faceto-
face communication . Early asynchronous theories emphasized media differences arguing that
non-verbal information afforded by gaze and gesture. However, the emphasis on media differences
leaves other crucial aspects of asynchronous communication unexamined, particularly those that stem
from its persistent nature. We explore those persistent aspects of asynchronous communication in this
paper. Research on email, voicemail, and Usenet has revealed various critical features of
multiple messages exchanged over a fairly extended period of time: days, weeks, or even months.
This extension of conversations over time implies that people are typically engaged in multiple
conversations at any given time. And each conversation often involves multiple people. These
properties lead to significant problems of conversation management. People find it difficult to keep
track of the content and status of their multiple conversations, as well as the identity, contact
information, and expertise of all their conversational partners. Maintaining knowledge of one’s
contacts is a significant problem in its own right we refer to this problem as contact management.
Contact management is clearly complex. A major problem is that people are exposed to an
lists . It would be both onerous and unnecessary to store detailed information about all these potential
contacts. As a result, individuals must decide: (a) which of these potential contacts are important
enough to retain information about; and (b) what sorts of information to retain about these chosen
contacts.
Page 10 of 115
1.2 Scope of the System
The system will be a Stand-Alone System for Contact Management System Unit of ARKA JAIN
UNIVERSITY. This system will be designed to minimize the manual work in maintaining Contect
details, Phone number and all other activities under phone contect system. It aims to maximize the
productivity and provide improved managed System. This System will be easy to understand and use.
More specifically, this system is designed to allow an admin to manage the records of stocks and
goods. The software will facilitate creation of different Reports such as Expense and several other
Reports.
Page 11 of 115
1.3 Field study of contact management
We present new findings about contact management derived from a field study of workplace
communication practices. Other aspects of this study have been reported elsewhere . The study had
two related goals: (1) to identify the main problems informants experienced with current
communication applications; and (2) to document the key strategies that users had evolved to address
these problems. The study consisted of semi-structured interviews and observations of 20 business
professionals. They included financial analysts, lawyers, brokers, estate agents, bankers, IT managers,
public relations specialists. They worked in a variety of settings from multinational corporations to
personally owned small businesses. We asked them what communication tools they used, to explain
how they used these tools, to describe the main problems with these tools, and to identify strategies
they used to cope with the problems. The main tools used were email, voicemail, IM, fax, phone, and
written documents. We observed the informants using their tools, also focusing on their use of
communication support tools (such as address books, PDAs, and post-it notes) to manage contact
information. We first describe the nature and value of contact information and the ad hoc set of tools
used to manage it. We then elaborate: (a) the problems people experience in deciding whom to
maintain contact information about; and (b) the onerous nature of data entry for the large number of
contacts that most people possess. Finally, we document the criteria people use to decide which of
Page 12 of 115
Chapter 2
2. Analysis
We observed a wide variety of tools being used to store and retrieve contact information. They
included: dedicated tools such as personal address books (both digital and physical); corporate
directories; organization charts; “tool-specific” address books in email and speed-dial lists for phones;
business cards – either in rolodexes or kept loose; ‘hotlists’ – small sets of frequently called numbers
placed in salient locations; pieces of paper on refrigerator doors, post-it notes, notes on calendars. A
first question we put to informants was why they thought it was so important to maintain their own
personal contact information, when much of the information they stored was publicly available. This
is particularly true for employees of large corporations, who have access to corporate directories and
organization charts. Three features of current business practice led people to keep personal contact
information: (1) Informants often worked with partners or clients from other organizations, and they
did not have access to corporate directories for these people; (2) They often needed access to contact
information while on the move. It is much easier to take one’s contact information along in a PDA or
filofax than to access a corporate database from a hotel room or client’s office; (3) Corporate
databases do not contain the esoteric, personal information needed to maintain a relationship with a
contact (birthdays, universities, sports team allegiances, number of children, and so on). Informants
were unanimous about the value of their contact information. This was evident not only from their
comments, but also from the time they invested in creating and maintaining contact archives. As one
informant, Mary, a freelance researcher, pointed out, her personal contact list was a resource that
Page 13 of 115
2.2 Problems:
Contact Selection, Data Entry, Tool Diversity However, contact management has a number of
associated difficulties. At first glance, the main problem informants had was the number of contacts
they needed to manage. We estimate that this number varied from a low of several hundred to well
into the thousands, although reliable estimation was hard given the large number of contact
management tools people typically used, and the fact that there was often duplication between these.
Upon further examination, though, deeper problems concerned: (a) the need to make an explicit
decision that someone was a valuable contact; (b) the diversity of tools used; and (c) data entry.
Page 14 of 115
2.3 Contact Selection:
When someone calls you on the phone, leaves you voicemail, sends you email, or hands you a
business card, what do you do? Do you record their contact information or not? The difficulty is that
it is hard to anticipate whether, and to what extent, you will need to communicate with that person in
the future. Whether someone is an “important contact” only becomes clear over time. The ease of
electronic communication, especially the ability to broadcast messages to large numbers of people at
little cost, exacerbates this problem: you may be cc’ed on messages, get email from various
distribution lists, or receive mass mailings. To be safe, our informants often “over-saved”
information, leading to huge rolodexes, overflowing booklets of business cards, and faded post-it
notes scattered around their work areas. Despite this strategy, participants were still exposed to many
more contacts than they recorded information about. One reason for this was the laborious nature of
Page 15 of 115
2.4 Data Entry:
Informants made it clear that contact information is costly to acquire and especially hard to maintain.
They often wanted to record various types of addressing information for a particular contact: work,
home, and mobile phone numbers, fax number, email address, postal address, instant messaging alias,
as well as the IM system it was good for, and so on. And, as we mentioned earlier, some people found
it important to include detailed personal and social information that was useful in maintaining an
All the informants used ad hoc combinations of tools, with some people evolving highly complex
and idiosyncratic systems. For example, Mary, the freelance researcher, had over 1000 people in her
email address book, a 60 page Word document containing over 1200 people, over 400 people in her
PDA, as well as miscellaneous people in Christmas card lists. Ollie, a corporate research scientist,
kept 7 different address books, using 2 PDAs, Microsoft Outlook, and 4 independent email address
books. He also wrote key work numbers on his office blackboard. One reason why these complex
systems evolved was that informants seldom ‘cleaned up’ their contact information. People were loath
to delete any contact information. This seemed to be motivated both by the effort of data entry, along
with the belief that even little used contact information may be relevant at some future time.
Page 16 of 115
2.6 Criteria for Determining:
Contact Importance Returning to the basic decision people face – is this an important contact? –
we sought to find out how our informants dealt with this issue. Informants responded with a
surprising consensus. Since they could not make this decision at first exposure, they relied largely
on the history of their prior interactions. Further individual factors, such as communication style
seemed to affect the number and type of contacts selected. In our interviews, we probed informants
to identify specific aspects of interaction history and communication style that were critical in
determining important contacts. We asked people to walk us through their contact management
Page 17 of 115
Chapter 3
The experiment examined the criteria underlying user’s judgments of contact importance. We
presented people with sets of contacts automatically extracted from their email archive. The archives
included messages sent by the user to others. They excluded messages that users had received but
deleted, as we had no way of accessing these. For each extracted contact we asked users whether they
wanted to include that contact in their contact management system in order to keep in touch with
them. For each email contact, we also recorded header information from the email archive about each
message involving the contact. From this data, we can compute quantitative characteristics of that
contact’s communication history involving the user, including the frequency, recency, reciprocity and
longevity of their exchanges. We can therefore determine the extent to which the decision to select a
particular contact correlated with these aspects of communication history. The second part of the
an alternative experimental design, where instead of having users select contacts extracted from
email, we simply looked at the contacts already in their email address books. However our field study
research suggested using existing contact entries was problematic: address books often contained out-
of-date contacts who had never been removed, or contacts who had been added in anticipation of
interactions that never materialized. We wanted instead to collect information about currently
important contacts.
Page 18 of 115
3.1 Hypotheses:
The hypotheses are derived from the criteria suggested by our users in the field study.
longevity. First we expected important contacts to interact more frequently with the user. Frequency
is defined as the total number of messages exchanged between contact and user, divided by the
3.2 Frequency:
Important contacts should have more frequent exchanges with the user than unimportant ones. We
also expected important contacts to show greater reciprocity, so that messages exchanged with
important contacts should contain roughly equal numbers of sent and received messages. Reciprocity
This definition gives a high reciprocity score to a user sending multiple messages to a contact, but
receiving few in return. This situation demonstrates a high investment on the part of the user in
maintaining the communication, which we would expect to be reflected in a high perceived value for
the contact. Other possible definitions of reciprocity involve the use of message replies (re:). However
the header logs that we collected did not contain the message subject lines needed to extract this
information.
Page 19 of 115
3.3 Reciprocity:
Important contacts should demonstrate greater communication reciprocity than unimportant ones
We also made a more specific prediction about unsolicited communication, which is a specific
instance of (lack of) reciprocity. We define unsolicited communication as cases where a contact sends
messages to the user, but there is never any communication from the user to the contact. While this
who have sent messages that the user intends to respond to. Unsolicited communication: Contacts
who send messages to the user, but never receive any communication from the user should be more
likely to be classified as unimportant. The next two hypotheses concern the temporal aspects of the
communication history, longevity and recency. Longevity is defined as the total number of days
between the dates of the first and last messages exchanged by contact and user. Recency is the number
of days since the last message exchanged between user and contact. Longevity: Important contacts
3.4 Recency:
Important contacts should have interacted with the user more recently than unimportant ones.
Individual differences in communication style The next hypothesis concerned individual differences
between users in terms of their communication style. We classified all users into high and low
frequency communicators based on whether they exchanged more messages with contacts than the
overall sample mean. We expected more intense communicators to select more contacts because of
Page 20 of 115
3.5 Method:
Users Seventeen users from a large corporate research laboratory took part in the experiment.
They included researchers, managers, secretaries, computer support staff and marketing managers.
Participants had been using their email system for an average of 3.0 years (standard deviation 1.8
years), and so all had substantial numbers of messages in their archives. Task We presented users
with an on-line list of extracted contacts. For each contact we showed contact name (e.g. Abhi ,
jaiswal), email name (e.g. ajaiswal), domain name (gmaiil.com), the number of messages received
by the user from that contact, the number of message sent by the user to that contact, the date of the
first message exchanged by user and contact, the date of the last message exchanged. This
information was presented in a spreadsheet-like table. The columns could be sorted, making it
possible to order contacts by the number of messages they sent to the user, or by the domain name
of the contact, and so on. This allowed users to examine and order the extracted contacts in multiple
ways, while making their choices. One concern is that the columns in the table may have biased
users to focus on particular contact characteristics. However, pilot studies showed that without
techniques to systematically sort and view data, users quickly became overwhelmed by the task of
judging hundreds of contacts. We asked users to select important contacts for inclusion in their
contact management system. They were told to choose contacts based on whether ‘you might want
to be in contact with them again’. Users could make three possible judgments. They could decide
that contacts: (a) should be added to their contact management system, i.e. that they were worth
keeping in touch with; (b) should be excluded from the system, i.e. they were not worth keeping in
touch with; and (c) that they were unsure of the status of the contact.
Page 21 of 115
3.6 Results:
Characteristics of Extracted Contacts and the Selection Process Before testing our hypotheses,
we present some general observations about the characteristics of the original archives and the set
of contacts our users rated as important. We also present some observations about the selection
process.
Page 22 of 115
Chapter 4
4. Comprison of field and lab studies
Our field data suggested a significant, but currently under researched problem, that of contact
management. People are exposed to large numbers of potential contacts, but the onerous nature of
data entry means that they end up being conservative about who they add to their contact
management systems. Despite this, people have a large number of contacts that they have to
manage, but end up using a variety of ad hoc tools for this purpose. Our experimental results
confirm the interview data in two important respects. First, consistent with the interview data,
people are exposed to a large number of contacts (859 on average), only 19% of whom they judge
as important. This supports the idea that people are exposed to many more contacts than they want
to keep in touch with. This in turn suggests that contact selection is an important process. Second,
the experiment confirmed the criteria that our interviewees suggested for identifying important
contacts. We found evidence that a contact’s communication history, and communication style were
important determinants of whether a contact was selected. Frequency, reciprocity, longevity, and
recency predicted subjective importance, as did contact affiliation and the style of the user’s
communication.
Page 23 of 115
Chapter 5
5. Design and theory implications
Several design suggestions follow from these results. First, our regression analysis is a model for
identifying important contacts in email, and this could be implemented directly as an algorithm. The
ability to automatically identify important contacts from communication archives might be used in a
provide social recommendation. Messaging applications are currently poorly integrated with contact
management tools, but future systems could exploit information about important contacts in a
variety of ways. These might include alerting, filtering and prioritization of incoming email or
voicemail messages based on the sender’s importance. Tighter integration of contact information
with messaging logs could be also used to manage relationships with contacts, e.g. reminding the
user when they haven’t talked to an important contact in a long time. We have implemented
contact-based alerting and reminding in a social network-based user interface to communication and
information . Finally social recommendation systems might be able to exploit information about a
register of important contacts to either direct a user query or guide information access. Other design
implications concern contacts management tools directly. We could improve address book utility by
using our algorithm to automatically recommend that a potentially important contact should be
added to the address book, based on their communication history. But even if we provide ways to
better identify significant contacts, data entry is still a major problem. One possible way to address
this would be to identify contact information from other sources, such as Internet home pages
containing addresses. We may also be able to mine other types of records such as phone and
voicemail logs or use reverse lookup to provide detailed addresses for contacts. Having general
Page 24 of 115
Chapter 6
6. Hardware and Software specifications
RAM 4GB TO 16 GB
Language Python
Page 25 of 115
Chapter 7
7. About Python
programming are fully supported, and many of its features support functional programming and
Many other paradigms are supported via extensions, including design by contract and logic
programming.
Python uses dynamic typing, and a combination of reference counting and a cycle-detecting
garbage collector for memory management. It uses dynamic name resolution (late binding), which
Python is an easy to learn, powerful programming language. It has efficient high-level data
structures and a simple but effective approach to object-oriented programming. Python’s elegant
syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting
Its design offers some support for functional programming in the Lisp tradition. It has
filter,mapandreduce functions; list comprehensions, dictionaries, sets, and generator expressions. The
standard library has two modules (itertools and functools) that implement functional tools borrowed
Page 26 of 115
from Haskell and Standard ML.
Its core philosophy is summarized in the document The Zen of Python (PEP 20), which includes
aphorisms such as
Readability counts.
Rather than building all of its functionality into its core, Python was designed to be highly
extensible via modules. This compact modularity has made it particularly popular as a means of
adding programmable interfaces to existing applications. Van Rossum's vision of a small core
language with a large standard library and easily extensible interpreter stemmed from his frustrations
Python strives for a simpler, less-cluttered syntax and grammar while giving developers a choice
in their coding methodology. In contrast to Perl's "there is more than one way to do it" motto, Python
embraces a "there should be one—and preferably only one—obvious way to do it" philosophy. Alex
Martelli, a Fellow at the Python Software Foundation and Python book author, wrote: "To describe
Page 27 of 115
Python's developers strive to avoid premature optimization and reject patches to non-critical parts
of the CPython reference implementation that would offer marginal increases in speed at the cost of
clarity. When speed is important, a Python programmer can move time-critical functions to extension
modules written in languages such as C; or use PyPy, a just-in-time compiler. Cython is also available,
which translates a Python script into C and makes direct C-level API calls into the Python interpreter.
Python's developers aim for it to be fun to use. This is reflected in its name—a tribute to the British
comedy group Monty Python—and in occasionally playful approaches to tutorials and reference
materials, such as examples that refer to spam and eggs (a reference to a Monty Python sketch) instead
A common neologism in the Python community is pythonic, which has a wide range of meanings
related to program style. "Pythonic" code may use Python idioms well, be natural or show fluency in
the language, or conform with Python's minimalist philosophy and emphasis on readability. Code that
is difficult to understand or reads like a rough transcription from another programming language is
called unpythonic.
Python users and admirers, especially those considered knowledgeable or experienced, are often
referred to as Pythonistas
Page 28 of 115
Methods
Methods on objects are functions attached to the object's class; the syntax
instance.method(argument) is, for normal methods and functions, syntactic sugar for
instance data, in contrast to the implicit self (or this) in some other object-oriented programming
languages (e.g., C++, Java, Objective-C, Ruby). Python also provides methods, often called dunder
methods (due to their names beginning and ending with double-underscores), to allow user-defined
classes to modify how they are handled by native operations including length, comparison, in
Typing
Python uses duck typing and has typed objects but untyped variable names. Type constraints are
not checked at compile time; rather, operations on an object may fail, signifying that it is not of a
suitable type. Despite being dynamically-typed, Python is strongly-typed, forbidding operations that
are not well-defined (for example, adding a number to a string) rather than silently attempting to make
sense of them.
Python allows programmers to define their own types using classes, most often used for object-
oriented programming. New instances of classes are constructed by calling the class (for example,
SpamClass() or EggsClass()), and the classes are instances of the metaclass type (itself an instance of
Page 29 of 115
Before version 3.0, Python had two kinds of classes (both using the same syntax): old-style and
The long-term plan is to support gradual typing. Python's syntax allows specifying static types,
but they are not checked in the default implementation, CPython. An experimental optional static
Page 30 of 115
Chapter 8
8. SQLite databases
SQLite is a C library that provides a lightweight disk-based database that doesn’t require a separate
server process and allows accessing the database using a nonstandard variant of the SQL query
language. Some applications can use SQLite for internal data storage. It’s also possible to prototype
an application using SQLite and then port the code to a larger database such as PostgreSQL or Oracle.
The sqlite3 module was written by Gerhard Häring. It provides an SQL interface compliant with
the DB-API 2.0 specification described by PEP 249, and requires SQLite 3.7.15 or newer.
To use the module, start by creating a Connection object that represents the database. Here the
import sqlite3
con = sqlite3.connect('example.db')
cur = con.cursor()
Page 31 of 115
Design
Unlike client–server database management systems, the SQLite engine has no standalone
processes with which the application program communicates. Instead, the SQLite library is linked
in and thus becomes an integral part of the application program. Linking may be static or dynamic.
The application program uses SQLite's functionality through simple function calls, which reduce
latency in database access: function calls within a single process are more efficient than inter-
process communication.
SQLite stores the entire database (definitions, tables, indices, and the data itself) as a single cross-
platform file on a host machine. It implements this simple design by locking the entire database
file during writing. SQLite read operations can be multitasked, though writes can only be
performed sequentially.
Due to the server-less design, SQLite applications require less configuration than client–server
databases. SQLite is called zero-conf because it does not require service management (such as
startup scripts) or access control based on GRANT and passwords. Access control is handled by
means of file-system permissions given to the database file itself. Databases in client–server
systems use file-system permissions that give access to the database files only to the daemon
process.
Another implication of the serverless design is that several processes may not be able to write to
the database file. In server-based databases, several writers will all connect to the same daemon,
which is able to handle its locks internally. SQLite, on the other hand, has to rely on file-system
locks. It has less knowledge of the other processes that are accessing the database at the same
time. Therefore, SQLite is not the preferred choice for write-intensive deployments.However, for
Page 32 of 115
simple queries with little concurrency, SQLite performance profits from avoiding the overhead of
SQLite uses PostgreSQL as a reference platform. "What would PostgreSQL do" is used to make
sense of the SQL standard. One major deviation is that, with the exception of primary keys,
SQLite does not enforce type checking; the type of a value is dynamic and not strictly constrained
by the schema (although the schema will trigger a conversion when storing, if such a conversion is
Features
SQLite implements most of the SQL-92 standard for SQL, but lacks some features. For example,
it only partially provides triggers and cannot write to views (however, it provides INSTEAD OF
triggers that provide this functionality). Its support of ALTER TABLE statements is limited.
SQLite uses an unusual type system for a SQL-compatible DBMS: instead of assigning a type to a
column as in most SQL database systems, types are assigned to individual values; in language
terms it is dynamically typed. Moreover, it is weakly typed in some of the same ways that Perl is:
one can insert a string into an integer column (although SQLite will try to convert the string to an
integer first, if the column's preferred type is integer). This adds flexibility to columns, especially
when bound to a dynamically typed scripting language. However, the technique is not portable to
other SQL products. A common criticism is that SQLite's type system lacks the data integrity
mechanism provided by statically typed columns in other products. The SQLite web site describes
a "strict affinity" mode, but this feature has not yet been added. However, it can be implemented
Page 33 of 115
Tables normally include a hidden rowid index column, which gives faster access. If a database
includes an Integer Primary Key column, SQLite will typically optimize it by treating it as an alias
for rowid, causing the contents to be stored as a strictly typed 64-bit signed integer and changing
may include a command to introspect whether a column has behavior like that of rowid to
Keys.[failed verification]
Full support for Unicode case-conversions can be optionally be enabled through an extension.
Several computer processes or threads may access the same database concurrently. Several read
accesses can be satisfied in parallel. A write access can only be satisfied if no other accesses are
currently being serviced. Otherwise, the write access fails with an error code (or can automatically
be retried until a configurable timeout expires). This concurrent access situation would change
when dealing with temporary tables. This restriction is relaxed in version 3.7 when write-ahead
Version 3.6.19 released on October 14, 2009 added support for foreign key constraints.
SQLite version 3.7.4 first saw the addition of the FTS4 (full-text search) module, which features
enhancements over the older FTS3 module.FTS4 allows users to perform full-text searches on
documents similar to how search engines search webpages. Version 3.8.2 added support for
creating tables without rowid,[29] which may provide space and performance improvements.
Common table expressions support was added to SQLite in version 3.8.3.[31] 3.8.11 added a
newer search module called FTS5, the more radical (compared to FTS4) changes requiring a bump
in version.
Page 34 of 115
In 2015, with the json1 extension and new subtype interfaces, SQLite version 3.9 introduced
SQLite's code is hosted with Fossil, a distributed version control system that is itself built upon an
SQLite database.
a database, define tables, insert and change rows, run queries and manage an SQLite database file.
It also serves as an example for writing applications that use the SQLite library.
SQLite uses automated regression testing prior to each release. Over 2 million tests are run as part
of a release's verification. Starting with the August 10, 2009 release of SQLite 3.6.17, SQLite
releases have 100% branch test coverage, one of the components of code coverage. The tests and
Page 35 of 115
Chapter 9
9. Software development process
development work into smaller, parallel, or sequential steps or sub-processes to improve design,
product management. It is also known as a software development life cycle (SDLC). The
methodology may include the pre-definition of specific deliverables and artifacts that are created
Most modern development processes can be vaguely described as agile. Other methodologies
include waterfall, prototyping, iterative and incremental development, spiral development, rapid
methodologies and a software development "process" a more specific term to refer to a specific
process chosen by a specific organization.[citation needed] For example, there are many specific
software development processes that fit the spiral life-cycle model. The field is often considered
Page 36 of 115
Prototyping
Software prototyping is about creating prototypes, i.e. incomplete versions of the software
try out particular features in the context of a full methodology (such as incremental, spiral, or
Attempts to reduce inherent project risk by breaking a project into smaller segments and
The client is involved throughout the development process, which increases the likelihood of
While some prototypes are developed with the expectation that they will be discarded, it is
A basic understanding of the fundamental business problem is necessary to avoid solving the
Methodologies
Agile development
Main article: Agile software development
iterative development, where requirements and solutions evolve via collaboration between self-
Page 37 of 115
organizing cross-functional teams. The term was coined in the year 2001 when the Agile
Agile software development uses iterative development as a basis but advocates a lighter and
incorporate iteration and the continuous feedback that it provides to successively refine and
The Agile model also includes the following software development processes:
Kanban
Scrum
Crystal
Atern
Continuous integration
Continuous integration is the practice of merging all developer working copies to a shared
mainline several times a day.[5] Grady Booch first named and proposed CI in his 1991 method,
although he did not advocate integrating several times a day. Extreme programming (XP)
adopted the concept of CI and did advocate integrating more than once per day – perhaps as
Incremental development
Page 38 of 115
Main article: Iterative and incremental development
Various methods are acceptable for combining linear and iterative systems development
methodologies, with the primary objective of each being to reduce inherent project risk by
breaking a project into smaller segments and providing more ease-of-change during the
development process.
A series of mini-Waterfalls are performed, where all phases of the Waterfall are completed for a
The initial software concept, requirements analysis, and design of architecture and system core
iterative development and the rapid construction of prototypes instead of large amounts of up-
front planning. The "planning" of software developed using RAD is interleaved with writing the
software itself. The lack of extensive pre-planning generally allows software to be written much
Page 39 of 115
The rapid development process starts with the development of preliminary data models and
business process models using structured techniques. In the next stage, requirements are verified
using prototyping, eventually to refine the data and process models. These stages are repeated
iteratively; further development results in "a combined business requirements and technical
The term was first used to describe a software development process introduced by James Martin
Key objective is for fast development and delivery of a high quality system at a relatively low
investment cost.
Attempts to reduce inherent project risk by breaking a project into smaller segments and
Aims to produce high quality systems quickly, primarily via iterative Prototyping (at any stage of
development), active user involvement, and computerized development tools. These tools may
include Graphical User Interface (GUI) builders, Computer Aided Software Engineering (CASE)
Key emphasis is on fulfilling the business need, while technological or engineering excellence is
of lesser importance.
Page 40 of 115
Project control involves prioritizing development and defining delivery deadlines or “timeboxes”.
If the project starts to slip, emphasis is on reducing requirements to fit the timebox, not in
Generally includes joint application design (JAD), where users are intensely involved in system
interaction.
Standard systems analysis and design methods can be fitted into this framework.
Page 41 of 115
Waterfall development
Software design
Implementation
Testing
Maintenance
The first formal description of the method is often cited as an article published by Winston W.
Royce[8] in 1970, although Royce did not use the term "waterfall" in this article. Royce
The Project is divided into sequential phases, with some overlap and splash back acceptable
between phases.
Emphasis is on planning, time schedules, target dates, budgets, and implementation of an entire
Tight control is maintained over the life of the project via extensive written documentation,
formal reviews, and approval/signoff by the user and information technology management
occurring at the end of most phases before beginning the next phase. Written documentation is an
Page 42 of 115
The waterfall model is a traditional engineering approach applied to software engineering. A
strict waterfall approach discourages revisiting and revising any prior phase once it is
complete.[according to whom?] This "inflexibility" in a pure waterfall model has been a source
of criticism by supporters of other more "flexible" models. It has been widely blamed for several
large-scale government projects running over budget, over time and sometimes failing to deliver
on requirements due to the Big Design Up Front approach.[according to whom?] Except when
contractually required, the waterfall model has been largely superseded by more flexible and
Page 43 of 115
SOFTWARE DESIGN
artifact intended to accomplish goals, using a set of primitive components and subject to
constraints.Software design may refer to either "all the activity involved in conceptualizing,
activity following requirements specification and before programming, as ... [in] a stylized
Software design usually involves problem-solving and planning a software solution. This
includes both a low-level component and algorithm design and a high-level, architecture
design.
Software design is the process of envisioning and defining software solutions to one or
more sets of problems. One of the main components of software design is the software
requirements analysis (SRA). SRA is a part of the software development process that lists
centered, software design may involve user experience design yielding a storyboard to help
user interface), a software design may be as simple as a flow chart or text describing a
planned sequence of events. There are also semi-standard methods like Unified Modeling
Language and Fundamental modeling concepts. In either case, some documentation of the
plan is usually the product of the design. Furthermore, a software design may be platform-
independent or platform-specific, depending upon the availability of the technology used for
the design.
Page 44 of 115
The main difference between software analysis and design is that the output of a software
analysis consists of smaller problems to solve. Additionally, the analysis should not be
designed very differently across different team members or groups. In contrast, the design
focuses on capabilities, and thus multiple designs for the same problem can and will exist.
Depending on the environment, the design often varies, whether it is created from reliable
operation systems, webpages, mobile devices or even the new cloud computing paradigm.
Software design is both a process and a model. The design process is a sequence of steps
that enables the designer to describe all aspects of the software for building. Creative skill,
past experience, a sense of what makes "good" software, and an overall commitment to
quality are examples of critical success factors for a competent design. It is important to
note, however, that the design process is not always a straightforward procedure; the design
model can be compared to an architect's plans for a house. It begins by representing the
totality of the thing that is to be built (e.g., a three-dimensional rendering of the house);
slowly, the thing is refined to provide guidance for constructing each detail (e.g., the
plumbing lay). Similarly, the design model that is created for software provides a variety of
different views of the computer software. Basic design principles enable the software
engineer to navigate the design process. Davis[3] suggests a set of principles for software
design, which have been adapted and extended in the following list:
The design process should not suffer from "tunnel vision." A good designer should consider
alternative approaches, judging each based on the requirements of the problem, the
Page 45 of 115
The design should be traceable to the analysis model. Because a single element of the
design model can often be traced back to multiple requirements, it is necessary to have a
means for tracking how requirements have been satisfied by the design model.
The design should not reinvent the wheel. Systems are constructed using a set of design
patterns, many of which have likely been encountered before. These patterns should always
be chosen as an alternative to reinvention. Time is short and resources are limited; design
time should be invested in representing (truly new) ideas by integrating patterns that already
The design should "minimize the intellectual distance" between the software and the
problem as it exists in the real world. That is, the structure of the software design should,
The design should exhibit uniformity and integration. A design is uniform if it appears fully
coherent. In order to achieve this outcome, rules of style and format should be defined for a
design team before design work begins. A design is integrated if care is taken in defining
The design should be structured to accommodate change. The design concepts discussed in
The design should be structured to degrade gently, even when aberrant data, events, or
Design is not coding, coding is not design. Even when detailed procedural designs are
created for program components, the level of abstraction of the design model is higher than
the source code. The only design decisions made at the coding level should address the
Page 46 of 115
small implementation details that enable the procedural design to be coded.
The design should be assessed for quality as it is being created, not after the fact. A variety
of design concepts and design measures are available to assist the designer in assessing
sometimes a tendency to focus on minutiae when the design is reviewed, missing the forest
for the trees. A design team should ensure that major conceptual elements of the design
(omissions, ambiguity, inconsistency) have been addressed before worrying about the
Page 47 of 115
Chapter 10
10. Data Flow Diagram (DFD)
DFD is an important tool used by system analysis. A data flow diagram model, a system using
external entities from which data flows to a process which transforms the data and create output
data transforms which go to other processes or external entities such as files. The main merit of
DFD is that it can provide anoverview of what data a system would process.
SYMBOLS
A Circle represents a process that transforms incoming data flow into outgoing data flows
An Arrow identifies data flow direction. It is the pipeline through which the information
flows.
Data Flow – Data flow are pipelines through the packets of information
Entity : Entity are object of the system. A source or destination data of a system.
Page 49 of 115
10.1. Context level DFD – 0 level
The context level data flow diagram (dfd) is describing the whole system. The (o) level dfd describe the all-
user module who operate the system. Below data flow diagram of contact management system application
Page 50 of 115
10.3. DFD 2 level
Page 51 of 115
10.4. ENTITY-RELATIONSHIP Diagram
A flowchart is a type of diagram that represents a workflow or process. A flowchart can also be
task. The flowchart showsthe steps as boxes of various kinds, and their order by connecting the
Page 52 of 115
10.5. ER Diagram
Page 53 of 115
Chapter 11
11. Program Code and Testing
#import libraries
import sqlite3
import string
import phonenumbers
def Database():
conn = sqlite3.connect("contactdb.db")
cursor = conn.cursor()
cursor.execute(
KEY AUTOINCREMENT NOT NULL, FNAME TEXT, LNAME TEXT, GENDER TEXT,
Page 54 of 115
#defining function for creating GUI Layout
def DisplayForm():
#creating window
display_screen = Tk()
display_screen.geometry("1200x500")
global tree
global btn_submit
global SEARCH
global fname,lname,gender,address,contact
btn_submit= StringVar()
SEARCH = StringVar()
fname = StringVar()
lname = StringVar()
gender = StringVar()
address = StringVar()
contact = StringVar()
TopViewForm.pack(side=TOP, fill=X)
LFrom.pack(side=LEFT, fill=Y)
Page 55 of 115
LeftViewForm = Frame(display_screen, width=500,bg="#0B4670")
LeftViewForm.pack(side=LEFT, fill=Y)
MidViewForm.pack(side=RIGHT)
18), width=600,bg="cyan")
lbl_text.pack(fill=X)
12),bg="#15244C",fg="white").pack(side=TOP)
Entry(LFrom,font=("Arial",10,"bold"),textvariable=fname).pack(side=TOP, padx=10,
fill=X)
12),bg="#15244C",fg="white").pack(side=TOP)
fill=X)
12),bg="#15244C",fg="white").pack(side=TOP)
fill=X)
gender.set("Select Gender")
content={'Male','Female'}
Page 56 of 115
Label(LFrom, text="", font=("Arial", 12), bg="#15244C", fg="white").pack(side=TOP)
12),bg="#15244C",fg="white").pack(side=TOP)
fill=X)
12),bg="#15244C",fg="white").pack(side=TOP)
fill=X)
"bold"),command=register,bg="cyan")
fg="white").pack(side=TOP)
8),bg="#0B4670",fg="white")
lbl_txtsearch.pack()
Page 57 of 115
#creating search button
#setting scrollbar
"Gender","Address","Contact"),
xscrollcommand=scrollbarx.set)
scrollbary.config(command=tree.yview)
scrollbary.pack(side=RIGHT, fill=Y)
scrollbarx.config(command=tree.xview)
scrollbarx.pack(side=BOTTOM, fill=X)
Page 58 of 115
tree.heading('Contact Id', text="Contact Id", anchor=W)
tree.pack()
DisplayData()
def Update():
Database()
fname1=fname.get()
lname1=lname.get()
gender1=gender.get()
address1=address.get()
contact1=contact.get()
else:
Page 59 of 115
if phone(contact1) == 'false':
tkMessageBox.showinfo("Warning",
else:
phone(contact1)
curItem = tree.focus()
contents = (tree.item(curItem))
selecteditem = contents['values']
#update query
?',(fname1,lname1,gender1,address1,contact1, selecteditem[0]))
conn.commit()
tkMessageBox.showinfo("Message","Updated successfully")
#reset form
Reset()
DisplayData()
conn.close()
def register():
Database()
fname1=fname.get()
lname1=lname.get()
Page 60 of 115
gender1=gender.get()
address1=address.get()
contact1=contact.get()
else:
if phone(contact1) == 'false':
else:
#execute query
(FNAME,LNAME,GENDER,ADDRESS,CONTACT) \
VALUES (?,?,?,?,?)',(fname1,lname1,gender1,address1,contact1));
conn.commit()
successfully")
DisplayData()
conn.close()
def phone(phone):
string_phone_number =phone
try:
Page 61 of 115
phone_number = phonenumbers.parse(string_phone_number)
returnvalue=phonenumbers.is_possible_number(phone_number)
except Exception as e:
print(e)
return 'false'
def Reset():
tree.delete(*tree.get_children())
DisplayData()
SEARCH.set("")
fname.set("")
lname.set("")
gender.set("")
address.set("")
contact.set("")
btn_submit['state'] = 'normal'
def Delete():
#open database
Database()
if not tree.selection():
else:
record?',
Page 62 of 115
icon="warning")
if result == 'yes':
curItem = tree.focus()
contents = (tree.item(curItem))
selecteditem = contents['values']
tree.delete(curItem)
selecteditem[0])
conn.commit()
cursor.close()
conn.close()
def SearchRecord():
#open database
Database()
if SEARCH.get() == "":
!!")
else:
tree.delete(*tree.get_children())
Page 63 of 115
cursor=conn.execute("SELECT * FROM REGISTRATION WHERE FNAME LIKE
fetch = cursor.fetchall()
cursor.close()
conn.close()
def DisplayData():
#open database
Database()
tree.delete(*tree.get_children())
#select query
fetch = cursor.fetchall()
tree.bind("<Double-1>",OnDoubleClick)
cursor.close()
conn.close()
Page 64 of 115
def OnDoubleClick(self):
curItem = tree.focus()
contents = (tree.item(curItem))
selecteditem = contents['values']
fname.set(selecteditem[1])
lname.set(selecteditem[2])
gender.set(selecteditem[3])
address.set(selecteditem[4])
contact.set(selecteditem[5])
btn_submit['state'] = 'disabled'
#calling function
DisplayForm()
#Running Application
mainloop()
#import libraries
import sqlite3
import string
import phonenumbers
Page 65 of 115
#function to define database
def Database():
conn = sqlite3.connect("contactdb.db")
cursor = conn.cursor()
cursor.execute(
KEY AUTOINCREMENT NOT NULL, FNAME TEXT, LNAME TEXT, GENDER TEXT,
def DisplayForm():
#creating window
display_screen = Tk()
display_screen.geometry("1200x500")
global tree
global btn_submit
global SEARCH
Page 66 of 115
global fname,lname,gender,address,contact
btn_submit= StringVar()
SEARCH = StringVar()
fname = StringVar()
lname = StringVar()
gender = StringVar()
address = StringVar()
contact = StringVar()
TopViewForm.pack(side=TOP, fill=X)
LFrom.pack(side=LEFT, fill=Y)
LeftViewForm.pack(side=LEFT, fill=Y)
MidViewForm.pack(side=RIGHT)
18), width=600,bg="cyan")
lbl_text.pack(fill=X)
Page 67 of 115
Label(LFrom, text="First Name ", font=("Arial",
12),bg="#15244C",fg="white").pack(side=TOP)
Entry(LFrom,font=("Arial",10,"bold"),textvariable=fname).pack(side=TOP, padx=10,
fill=X)
12),bg="#15244C",fg="white").pack(side=TOP)
fill=X)
12),bg="#15244C",fg="white").pack(side=TOP)
fill=X)
gender.set("Select Gender")
content={'Male','Female'}
12),bg="#15244C",fg="white").pack(side=TOP)
fill=X)
12),bg="#15244C",fg="white").pack(side=TOP)
Page 68 of 115
Entry(LFrom, font=("Arial", 10, "bold"),textvariable=contact).pack(side=TOP, padx=10,
fill=X)
"bold"),command=register,bg="cyan")
fg="white").pack(side=TOP)
8),bg="#0B4670",fg="white")
lbl_txtsearch.pack()
Page 69 of 115
#creating delete button
#setting scrollbar
"Gender","Address","Contact"),
xscrollcommand=scrollbarx.set)
scrollbary.config(command=tree.yview)
scrollbary.pack(side=RIGHT, fill=Y)
scrollbarx.config(command=tree.xview)
scrollbarx.pack(side=BOTTOM, fill=X)
Page 70 of 115
tree.column('#2', stretch=NO, minwidth=0, width=150)
tree.pack()
DisplayData()
def Update():
Database()
fname1=fname.get()
lname1=lname.get()
gender1=gender.get()
address1=address.get()
contact1=contact.get()
else:
if phone(contact1) == 'false':
tkMessageBox.showinfo("Warning",
else:
phone(contact1)
curItem = tree.focus()
contents = (tree.item(curItem))
Page 71 of 115
selecteditem = contents['values']
#update query
?',(fname1,lname1,gender1,address1,contact1, selecteditem[0]))
conn.commit()
tkMessageBox.showinfo("Message","Updated successfully")
#reset form
Reset()
DisplayData()
conn.close()
def register():
Database()
fname1=fname.get()
lname1=lname.get()
gender1=gender.get()
address1=address.get()
contact1=contact.get()
else:
if phone(contact1) == 'false':
Page 72 of 115
tkMessageBox.showinfo("Warning", "The phone number must be number with
else:
#execute query
(FNAME,LNAME,GENDER,ADDRESS,CONTACT) \
VALUES (?,?,?,?,?)',(fname1,lname1,gender1,address1,contact1));
conn.commit()
successfully")
DisplayData()
conn.close()
def phone(phone):
string_phone_number =phone
try:
phone_number = phonenumbers.parse(string_phone_number)
returnvalue=phonenumbers.is_possible_number(phone_number)
except Exception as e:
print(e)
return 'false'
def Reset():
Page 73 of 115
tree.delete(*tree.get_children())
DisplayData()
SEARCH.set("")
fname.set("")
lname.set("")
gender.set("")
address.set("")
contact.set("")
btn_submit['state'] = 'normal'
def Delete():
#open database
Database()
if not tree.selection():
else:
record?',
icon="warning")
if result == 'yes':
curItem = tree.focus()
contents = (tree.item(curItem))
selecteditem = contents['values']
tree.delete(curItem)
Page 74 of 115
cursor = conn.execute("DELETE FROM REGISTRATION WHERE RID = %d" %
selecteditem[0])
conn.commit()
cursor.close()
conn.close()
def SearchRecord():
#open database
Database()
if SEARCH.get() == "":
!!")
else:
tree.delete(*tree.get_children())
fetch = cursor.fetchall()
Page 75 of 115
tree.insert('', 'end', values=(data))
cursor.close()
conn.close()
def DisplayData():
#open database
Database()
tree.delete(*tree.get_children())
#select query
fetch = cursor.fetchall()
tree.bind("<Double-1>",OnDoubleClick)
cursor.close()
conn.close()
def OnDoubleClick(self):
curItem = tree.focus()
contents = (tree.item(curItem))
Page 76 of 115
selecteditem = contents['values']
fname.set(selecteditem[1])
lname.set(selecteditem[2])
gender.set(selecteditem[3])
address.set(selecteditem[4])
contact.set(selecteditem[5])
btn_submit['state'] = 'disabled'
#calling function
DisplayForm()
#Running Application
mainloop()
Calling function
DisplayForm()
#Running Application
mainloop()
Page 77 of 115
function to define database
def Database():
conn = sqlite3.connect("contactdb.db")
cursor = conn.cursor()
cursor.execute(
KEY AUTOINCREMENT NOT NULL, FNAME TEXT, LNAME TEXT, GENDER TEXT,
def DisplayForm():
#creating window
display_screen = Tk()
display_screen.geometry("1200x500")
global tree
global btn_submit
Page 78 of 115
global SEARCH
global fname,lname,gender,address,contact
btn_submit= StringVar()
SEARCH = StringVar()
fname = StringVar()
lname = StringVar()
gender = StringVar()
address = StringVar()
contact = StringVar()
TopViewForm.pack(side=TOP, fill=X)
LFrom.pack(side=LEFT, fill=Y)
LeftViewForm.pack(side=LEFT, fill=Y)
MidViewForm.pack(side=RIGHT)
18), width=600,bg="cyan")
lbl_text.pack(fill=X)
Page 79 of 115
Label(LFrom, text="First Name ", font=("Arial",
12),bg="#15244C",fg="white").pack(side=TOP)
Entry(LFrom,font=("Arial",10,"bold"),textvariable=fname).pack(side=TOP, padx=10,
fill=X)
fg="white").pack(side=TOP)
12),bg="#15244C",fg="white").pack(side=TOP)
padx=10, fill=X)
fg="white").pack(side=TOP)
12),bg="#15244C",fg="white").pack(side=TOP)
padx=10, fill=X)
gender.set("Select Gender")
content={'Male','Female'}
fg="white").pack(side=TOP)
12),bg="#15244C",fg="white").pack(side=TOP)
padx=10, fill=X)
Page 80 of 115
Label(LFrom, text="", font=("Arial", 12), bg="#15244C",
fg="white").pack(side=TOP)
12),bg="#15244C",fg="white").pack(side=TOP)
padx=10, fill=X)
fg="white").pack(side=TOP)
"bold"),command=register,bg="cyan")
fg="white").pack(side=TOP)
fg="white").pack(side=TOP)
font=('verdana', 8),bg="#0B4670",fg="white")
lbl_txtsearch.pack()
command=SearchRecord,bg="cyan")
Page 81 of 115
#creating view button
command=DisplayData,bg="cyan")
#setting scrollbar
"Gender","Address","Contact"),
xscrollcommand=scrollbarx.set)
scrollbary.config(command=tree.yview)
scrollbary.pack(side=RIGHT, fill=Y)
scrollbarx.config(command=tree.xview)
scrollbarx.pack(side=BOTTOM, fill=X)
Page 82 of 115
tree.heading('LName', text="LastName", anchor=W)
tree.pack()
DisplayData()
def Update():
Database()
fname1=fname.get()
lname1=lname.get()
gender1=gender.get()
address1=address.get()
contact1=contact.get()
Page 83 of 115
if fname1=='' or lname1==''or gender1=='' or address1==''or contact1=='':
else:
if phone(contact1) == 'false':
tkMessageBox.showinfo("Warning",
else:
phone(contact1)
curItem = tree.focus()
contents = (tree.item(curItem))
selecteditem = contents['values']
#update query
?',(fname1,lname1,gender1,address1,contact1, selecteditem[0]))
conn.commit()
tkMessageBox.showinfo("Message","Updated successfully")
#reset form
Reset()
DisplayData()
conn.close()
Page 84 of 115
Function for new entry
def register():
Database()
fname1=fname.get()
lname1=lname.get()
gender1=gender.get()
address1=address.get()
contact1=contact.get()
else:
if phone(contact1) == 'false':
else:
#execute query
(FNAME,LNAME,GENDER,ADDRESS,CONTACT) \
VALUES (?,?,?,?,?)',(fname1,lname1,gender1,address1,contact1));
conn.commit()
successfully")
Page 85 of 115
#refresh table data
DisplayData()
conn.close()
tree.delete(*tree.get_children())
DisplayData()
SEARCH.set("")
fname.set("")
lname.set("")
gender.set("")
address.set("")
contact.set("")
btn_submit['state'] = 'normal'
Page 86 of 115
Delete selected data from table
def Delete():
#open database
Database()
if not tree.selection():
else:
result = tkMessageBox.askquestion('Confirm', 'Are you sure you want to delete this record?',
icon="warning")
if result == 'yes':
curItem = tree.focus()
contents = (tree.item(curItem))
selecteditem = contents['values']
tree.delete(curItem)
selecteditem[0])
conn.commit()
cursor.close()
conn.close()
Page 87 of 115
Function to search data
def SearchRecord():
#open database
Database()
if SEARCH.get() == "":
else:
tree.delete(*tree.get_children())
str(SEARCH.get()) + '%',))
fetch = cursor.fetchall()
cursor.close()
conn.close()
Page 88 of 115
Defining function to access data from SQLite database
def DisplayData():
#open database
Database()
tree.delete(*tree.get_children())
#select query
fetch = cursor.fetchall()
tree.bind("<Double-1>",OnDoubleClick)
cursor.close()
conn.close()
Page 89 of 115
DoubleClick function
def OnDoubleClick(self):
curItem = tree.focus()
contents = (tree.item(curItem))
selecteditem = contents['values']
fname.set(selecteditem[1])
lname.set(selecteditem[2])
gender.set(selecteditem[3])
address.set(selecteditem[4])
contact.set(selecteditem[5])
btn_submit['state'] = 'disabled'
Page 90 of 115
Chapter 13
13. Testing Approach
Software testing is the act of examining the artifacts and the behavior of the software under test by
validation and verification. Software testing can also provide an objective, independent view of the
software to allow the business to appreciate and understand the risks of software implementation.
analyzing the product requirements for completeness and correctness in various contexts like
reviewing the product architecture and the overall design of the product
working with product developers on improvement in coding techniques, design patterns, tests
that can be written as part of code based on various techniques like boundary conditions, etc.
Software testing can provide objective, independent information about the quality of software
To build up our project we use software testing process for executing a program with
task and also trying to find the error in a program as it is destructive process.
Although software testing can determine the correctness of software under the
assumption of some specific hypotheses (see the hierarchy of testing difficulty below),
testing cannot identify all the failures within the software. Instead, it furnishes a criticism
Page 91 of 115
or comparison that compares the state and behavior of the product against test oracles —
may include (but are not limited to) specifications, contracts, comparable products, past
versions of the same product, inferences about intended or expected purpose, user or
discovered and corrected. Testing cannot establish that a product functions properly
under all conditions, but only that it does not function properly under specific
conditions.[4] The scope of software testing may include the examination of code as well
examining the aspects of code: does it do what it is supposed to do and do what it needs
separate from the development team. There are various roles for testing team members.
Information derived from software testing may be used to correct the process by which
software is developed.
Every software product has a target audience. For example, the audience for video game
develops or otherwise invests in a software product, it can assess whether the software
product will be acceptable to its end users, its target audience, its purchasers, and other
Page 92 of 115
TESTING APPROACH
inspections are referred to as static testing, whereas executing programmed code with a
Static testing is often implicit, like proofreading, plus when programming tools/text editors
check source code structure or compilers (pre-compilers) check syntax and data flow as
static program analysis. Dynamic testing takes place when the program itself is run.
Dynamic testing may begin before the program is 100% complete in order to test particular
sections of code and are applied to discrete functions or modules.Typical techniques for
Static testing involves verification, whereas dynamic testing also involves validation.
Passive testing means verifying the system behavior without any interaction with the
software product. Contrary to active testing, testers do not provide any test data but look at
system logs and traces. They mine for patterns and specific behavior in order to make some
Page 93 of 115
Exploratory approach
simultaneous learning, test design, and test execution. Cem Kaner, who coined the
term in 1984,[18]: 2 defines exploratory testing as "a style of software testing that
continually optimize the quality of his/her work by treating test-related learning, test
design, test execution, and test result interpretation as mutually supportive activities
Software testing methods are traditionally divided into white- and black-box testing.
These two approaches are used to describe the point of view that the tester takes
when designing test cases. A hybrid approach called grey-box testing may also be
"arbitrary distinction" between black- and white-box testing has faded somewhat.
White-box testing
White-box testing (also known as clear box testing, glass box testing, transparent box
Page 94 of 115
testing, an internal perspective of the system (the source code), as well as
programming skills, are used to design test cases. The tester chooses inputs to
exercise paths through the code and determine the appropriate outputs. This is
While white-box testing can be applied at the unit, integration, and system levels of
the software testing process, it is usually done at the unit level. It can test paths within
a unit, paths between units during integration, and between subsystems during a
system–level test. Though this method of test design can uncover many errors or
requirements.
API testing – testing of the application using public and private APIs (application
programming interfaces)
Code coverage – creating tests to satisfy some criteria of code coverage (e.g., the test
designer can create tests to cause all statements in the program to be executed at least
once)
testing strategies
Code coverage tools can evaluate the completeness of a test suite that was created
with any method, including black-box testing. This allows the software team to
Page 95 of 115
examine parts of a system that are rarely tested and ensures that the most important
function points have been tested. Code coverage as a software metric can be reported
as a percentage for:
Statement coverage, which reports on the number of lines executed to complete the
test
Decision coverage, which reports on whether both the True and the False branch of a
100% statement coverage ensures that all code paths or branches (in terms of control
flow) are executed at least once. This is helpful in ensuring correct functionality, but
not sufficient since the same code may process different inputs correctly or
incorrectly. Pseudo-tested functions and methods are those that are covered but not
specified (it is possible to remove their body without breaking any test case).
Black-Box Testing
Black-box testing (also known as functional testing) treats the software as a "black box,"
the source code. The testers are only aware of what the software is supposed to do, not how it
does it.[27] Black-box testing methods include: equivalence partitioning, boundary value
analysis, all-pairs testing, state transition tables, decision table testing, fuzz testing, model-
based testing, use case testing, exploratory testing, and specification-based testing
Page 96 of 115
provided to the tester, who then can simply verify that for a given input, the output value (or
behavior), either "is" or "is not" the same as the expected value specified in the test case. Test
cases are built around specifications and requirements, i.e., what the application is supposed
to do. It uses external descriptions of the software, including specifications, requirements, and
designs to derive test cases. These tests can be functional or non-functional, though usually
functional.
One advantage of the black box technique is that no programming knowledge is required.
Whatever biases the programmers may have had, the tester likely has a different set and may
emphasize different areas of functionality. On the other hand, black-box testing has been said
to be "like a walk in a dark labyrinth without a flashlight." Because they do not examine the
source code, there are situations when a tester writes many test cases to check something that
could have been tested by only one test case or leaves some parts of the program untested.
This method of test can be applied to all levels of software testing: unit, integration, system
and acceptance. It typically comprises most if not all testing at higher levels, but can also
Component interface testing is a variation of black-box testing, with the focus on the data
values beyond just the related actions of a subsystem component. The practice of component
interface testing can be used to check the handling of data passed between various units, or
subsystem components, beyond full integration testing between those units. The data being
Page 97 of 115
passed can be considered as "message packets" and the range or data types can be checked,
for data generated from one unit, and tested for validity before being passed into another unit.
One option for interface testing is to keep a separate log file of data items being passed, often
with a timestamp logged to allow analysis of thousands of cases of data passed between units
for days or weeks. Tests can include checking the handling of some extreme data values while
other interface variables are passed as normal values. Unusual data values in an interface can
Visual testing
The aim of visual testing is to provide developers with the ability to examine what was
happening at the point of software failure by presenting the data in such a way that the
developer can easily find the information she or he requires, and the information is
expressed clearly.
At the core of visual testing is the idea that showing someone a problem (or a test failure),
rather than just describing it, greatly increases clarity and understanding. Visual testing,
therefore, requires the recording of the entire test process – capturing everything that occurs
on the test system in video format. Output videos are supplemented by real-time tester input
drastically because testers can show the problem (and the events leading up to it) to the
developer as opposed to just describing it and the need to replicate test failures will cease to
exist in many cases. The developer will have all the evidence she or he requires of a test
Page 98 of 115
failure and can instead focus on the cause of the fault and how it should be fixed.
Ad hoc testing and exploratory testing are important methodologies for checking
software integrity, because they require less preparation time to implement, while the
important bugs can be found quickly. In ad hoc testing, where testing takes place in
an improvised, impromptu way, the ability of the tester(s) to base testing off
documented methods and then improvise variations of those tests can result in more
procedures are maintained, one of the limits of ad hoc testing is lack of repeatability.
Grey-box testing
internal data structures and algorithms for purposes of designing tests while executing
those tests at the user, or black-box level. The tester will often have access to both
"the source code and the executable binary." Grey-box testing may also include
not qualify as grey-box, as the input and output are clearly outside of the "black box"
that we are calling the system under test. This distinction is particularly important
when conducting integration testing between two modules of code written by two
different developers, where only the interfaces are exposed for the test.
By knowing the underlying concepts of how the software works, the tester makes better-
informed testing choices while testing the software from outside. Typically, a grey-box
tester will be permitted to set up an isolated testing environment with activities such as
Page 99 of 115
seeding a database. The tester can observe the state of the product being tested after
performing certain actions such as executing SQL statements against the database and then
executing queries to ensure that the expected changes have been reflected. Grey-box
testing implements intelligent test scenarios, based on limited information. This will
Type of testing we Use in Our Project Here we just mentioned that how the testing is
related to this software and in which way we have test the software? In our project we
I. Unit testing: Unit testing where individual program unit or object classes
are tested here by using this testing we have focused on testing the
functionality of methods.
II. Module Testing : Where this is the combination of unit is called module.
Here we tested the unit program is where the module program have
dependency
III. Sub- system Testing : The we combined some module for the preliminary
IV. System Testing : where it is the combination of two or more sub – system
and then it is tested. Here we tested and entire system as per the
requirements.
A use case is a methodology used in system analysis to identify, clarify and organize
particular goal.
I. The actor. The system user -- this can be a single person or a group of
II. The goal. The final successful outcome that completes the process.
III. The system. The process and steps taken to reach the end goal,
behaviours.
I. Identifying all system users and creating a profile for each one. This
II. Selecting one user and defining their goal -- or what the user hopes
III. Describing the course taken for each use case through the system to
A single use case can benefit developers by revealing how a system should
behave while alsohelping identify any errors that could arise in the process.
I. The list of goals created in the use case writing process can be used to
II. By focusing both on the user and the system, real system needs can be
III. Since use cases are written primarily in a narrative language they are
IV. The creation of extending use cases and the identification of exceptions
The process of developing test cases can also help find problems in the requirements
or design of anapplication.
A test case can have the following elements. Note, however, that a test management
tool is normallyused by companies and the format is determined by the tool used.
Test Suite ID The ID of the test suite to which this test case belongs.
To start a contact management application, we have to run a CMS.py file. Then the screen of the
application will be opened.
User has to enter all required fields and then click on the ‘Submit’ button to save the record. System
will notify that a new record has been stored.
Once new record is stored in system then it will display on right side table as below:
If you want to search any specific user record then you must enter user Firstname of the user is search
Search results will be displayed on the right-side table for the specific user.
After searching any specific user recored, you have to clicked on ‘View All’ button to disply all
recoreds.
If the user wants to update any specific contact details then the user must double click on the specific
record, then the selected record will be available on the left side field. And the ‘Submit’ button will
be disable then the user can modify the respective field value and click on the ‘Update’ button. Then
If user want to clear all fields then he/she has to click on ‘Reset all’ button
If a user wants to delete any record from the contact management system, then he/she has to click on
a specific record, then click on the ‘Delete’ button. System will ask for confirmation with a message,
The project titled as Contact Management System (CMS) was deeply studied and
analyzed to design the code and implement. It was done under the guidance of the
experienced project guide. All the current requirements and possibilities have been
Application Highlights:-
CMS application is written in python . The project file contains a python script
(index.py)
This is simple GUI based project which is very easy to understand to use.
Talking about the system, it contains all the required function which include
While adding the contact the person, he/she provide first name, last name,
For Python
https://www.w3schools.com/python/
https://www.python.org/
https://docs.python.org/3/tutorial/
https://www.tutorialspoint.com/python/index.htm
For SQLite
https://www.sqlitetutorial.net/sqlite-python/
https://docs.python.org/3/library/sqlite3.html
https://pynative.com/python-sqlite/