THEORYTICAL BACKGROUND
DATABASE DESIGN
Record-based logical models are used in describing data at logical and view levels. In contrast to object -based data models, they are both used to specify the overall logical structure of the database and to provide a high-level description of the implementation. Record-based modules are so named because the database structure is fixed-format of several types. The use of fixed length record simplifies the physical –level implementation of database. The relational model uses a collection of tables to represent both data and relationship among those data. Each table has multiple columns and each columns has unique name. A row in a table a relationship among set of values.
WHAT IS DATABASE? Database is a systematic collection of data. Databases support storage and manipulation of data. Databases make data management easy. Let's discuss few examples. An online telephone directory would definitely use database to store data pertaining to people, phone numbers, other contact details, etc. Your electricity service provider is obviously using a database to manage billing , client related issues, to handle fault data, etc. Let's also consider the face book. It needs to store, manipulate and present data related to members, their friends, member activities, messages, advertisements and lot more.
WHY DATABASE? To some extent answer to this question depends on whether the system in question is single user or multi-user? Here the database is so small and so simple that the advantages might not be very obvious. The primary goal of a DBMS is to provide as environment that is both convenient to use in retrieving and storing information. Database systems are designed to manage large bodies of information. The management of data involves both the definition of structure for the storage of information and the provision of mechanisms for the manipulation of information. In addition, the database records are stored in various files and different application programs are written to extract records from and to add records from and to add records to the files.
ADVANTAGES OF USING DATABASE
1) Prevents Data Redundancy In non-database systems, there can be a number of applications and programs, each having their own file-set stored within the memory. Some of these files may contain duplicate data, which can get stored at different locations, thereby leading to wastage of the available memory storage space. Such duplicate data is termed as redundant data. In DBMS, all the data from the different applications are integrated into a single database, on which various checks for duplicity can be performed, and multiple copies can be logically converted into a single one. This allows for a great reduction in data redundancy, and prevents the wastage of memory. However, it must be noted that some applications may require data to be duplicated .
2)Allows Data Sharing DBMS allows sharing of the same data among numerous applications and users. The data is stored centrally (typically within servers), and a software-based locking mechanism is put in place to prevent two users from modifying it at the same time. This feature makes it possible to share and fulfill the data requirements of a newly installed application without needing to again create new data specifically for it.
3) Maintains Data Consistency When duplicate data exists at different memory locations, there are chances that an application might update one of them while the other one will continue to contain the previous values. This will cause an inconsistency in the information that is stored. In DBMS, data redundancy is greatly reduced, and so, in almost all cases, only a single copy of data exists in the database, which all the different applications and programs share. Therefore, any changes made to it are instantly available to all the programs accessing it, and as such, the consistency of data is maintained.
4) Maintains Data Integrity Data integrity is said to exist when the data entered into a database is both, accurate and consistent. These systems provide centralized control over the access to data. This allows different checks to be put in place in order to verify the accuracy of the data being entered into it.
5) Provides Data Security The data in many of organizations is highly sensitive, and may even be confidential. Unauthorized access can compromise the entire functioning of the organization. This can be very effectively prevented in DBMS, where the database
6)Administrator (DBA) can block or grant access as required. The DBA can implement a number of access procedures and authentication schemes to ensure that only the person(s) having enough privileges is granted access to critical data. Thus, a DBMS is capable of providing security to the data in an organization.
7) Automatic Backup and Restore In a file-based computer system, the user has to create a backup of the data regularly to protect it from being damaged or lost in the event of system crash or failure. This can be a very time-consuming process, and is prone to human error. Most of the DBMS have a backup-and-recovery feature built within them, that automatically backs-up all important data, and restores it when needed.
7) Data Independence The separation of data structure from the application program used to access it is known as data independence. Typically, in a DBMS, the database and the application program are maintained separately from each other, with the DBMS acting as a mediator between them. This proves to be a big advantage, as one can easily change the database structure without affecting the application program.
8) Data Abstraction Data abstraction results from data independence. It allows the DBMS to provide an abstract view of the data, without divulging the details of its physical storage or method of implementation.
9) Multiple Views of Data A DBMS allows multiple accesses to the database by many users, each having a different perspective view of the data stored in it. All these views are subsets of the database, and contain virtual data derived from the database, which doesn't exist in physical form. Thus, many users can access the data, while still maintaining the consistency of the database.
10) Ease of Application Development Many data-related issues, like concurrent access, security, data integrity, etc., are taken care of by the DBMS. Therefore, when an application programmer develops a program, he/she can focus explicitly on the needs of the users. This makes the task of application development much easier. Thus, database management systems bring about a systematization in data storage, and also provide data security. Owing to their many advantages over traditional file-based data storage systems, they are widely used in many large and small organizations alike.
DEFINITION OF PROBLEM
Here I am going to discuss the problem of manual ONLINE SHOPPING MANAGEMENT SYSTEM. The problems are as follows:
1. Records are as follows:
SYSTEM SPECIFICATIONS
HARDWARE REQUIREMENTS:-
1.Intel Pentium IV processor 2.4GHz and above. 2.128 B of main memory 3.52XCD-ROM drive for installation 4. 60 MB of free hard disk space or above for installation 5.15 inch or bigger color monitor 6. Microsoft Compatible 105 Keys keyboard 7.Mouse
SOFTWARE REQUIREMENTS: Language
: PHP
Web Server
: APACHY
Operating System : WINDOWS 7
DATABASE REQUIREMENTS :MYSQL SERVER 2000,05
SOFTWARE USED
WINDOWS 7: .
This is world’s most popular and easy to use Operating system for Desktop computers and I have no exception.
PHP: I always wanted to build 32 bit windows application and I think PHP is the easiest way to build it. From the day of its inception PHP has turned out from a tiny and limited programming tool to a windows application development environment. The most exciting feature of it is the ease of use with point and click operation. The GUI features of PHP can be used in many ways. There are also other goodies like very short SDLC, yielding better productivity with less effort.
MY SQL: While deciding on database platform, I was looking for a RDBMS system which can be used with ease and can be maintained without much effort. The RDBMS should also widely available. But the main criterion was that the created database should be portable enough. I selected over many available RDBMS software but at last I found MY SQL. Though my project was not network enabled and is developed as personal edition and the security is not as strictly maintained as in network edition. But in future, I can extend my project in network using network version of MY SQL. Then I can get benefit of it.
WHY USING THIS SOFTWARES?
WHY WINDOWS 7?
Microsoft word 2010 is a program that helps to create neat and attractive document easily and quickly. Features like spell and grammar check, easy insertion of new sentences and paragraphs in the already entered text, page numbering etc, make the functioning of a word processor easier, faster and accurate. Microsoft word also allows changing the appearance of the text and organizing the text in the document in a systematic manner, changing the font sizes, adding clipart, style and colors can change the appearance of the texts. A looks more organized if we add page numbers, page borders, headers and footers
at top and bottom of the page to display useful information. Word also allows presenting the information in tabular form, i.e. within tables. Microsoft Word can easily integrate with other Microsoft Office programs , If you have a spreadsheet that you created on Microsoft Excel , you can easily paste it into a Word document , You can work with the programs such as PowerPoint , This makes it possible to complete a wide array of computing tasks without having to spend time converting the documents or the files so that they are usable on other programs . It also supports hyperlinks. That is why I decided to prepare my documentation in Microsoft word 2010.
WHY DATABASE PROGRAMMING?
Database is a collection of related data and data is a collection of facts and figures that can be processed to produce information. Mostly data represents recordable facts. Data aids in producing information, which is based on facts. For example, if we have data about marks obtained by all students, we can then conclude about toppers and average marks. A database management system stores data in such a way that it becomes easier to retrieve, manipulate, and produce information
ANSI –SPARK/THREE LEVEL ARCHITECTURE OF DBMS
Architecture of a database system presents the design principle of DBMS, including process examples, parallel structure, storage system design, transaction system implementation, query application, and so on. It is helpful reference to database researchers, practitioners, and other fields' people, who are interested in database system design techniques. The architecture of DBMS can be broken down into two major structures: logical and physical architectures. Here, I only discuss the logical architecture of DBMS.
Following are the three levels of database architecture, 1. Physical Level 2. Conceptual Level 3. External Level
End users
View 1
View 2
View 3
View n
External Level
External/conceptual Mapping External Level Conceptual schema
Conceptual level
Conceptual/internal Mapping Internal schema
Physical level
Database
Fig: Three level architecture of DBMS
In the above diagram,
It shows the architecture of DBMS. Mapping is the process of transforming request response between various database levels of architecture. Mapping is not good for small database, because it takes more time. In External / Conceptual mapping, DBMS transforms a request on an external schema against the conceptual schema. In Conceptual / Internal mapping, it is necessary to transform the request from the conceptual to internal levels.
1. Physical Level
Physical level describes the physical storage structure of data in database. It is also known as Internal Level. This level is very close to physical storage of data. At lowest level, it is stored in the form of bits with the physical addresses on the secondary storage device. At highest level, it can be viewed in the form of files.
The internal schema defines the various stored data types. It uses a physical data model.
2. Conceptual Level
Conceptual level describes the structure of the whole database for a group of users. It is also called as the data model. Conceptual schema is a representation of the entire content of the database. This schema contains all the information to build relevant external records. It hides the internal details of physical storage.
3. External Level
External level is related to the data which is viewed by individual end users. This level includes a no. of user views or external schemas. This level is closest to the user. External view describes the segment of the database that is required for a particular user group and hides the rest of the database from that user group.
Advantages of database management system (DBMS): 1. Minimize Data Redundancy In File Processing System, duplicate data is created in many places because all the programs have their own files. This creates data redundancy which in turns wastes labor and space. In Database Management System, all the files are integrated in a
single database. The whole data is stored only once at a single place so there is no chance of duplicate data. For example: A student record in library or examination can contain duplicate values, but when they are converted into a single database, all the duplicate values are removed. Complete redundancy can be removed because somehow we needs duplicate value to relate tables with each other. But still DBMS controls data redundancy that saves lots of labor and time.
2. Sharing Of Data In DBMS, Data can be shared in between authorized user of database. All the users have their own right to access the database up to a level. Database Administration has complete access of database. He can assign users to access the database. Others users are also authorized to access database and also they can share data between them. Many users have same authority to access the database.
3. Data Consistency DBMS controls data redundancy which in turn controls data consistency. Data consistency means if you want to update data in any files then all the files should not be updated again. As in DBMS, data is stored in a single database so data becomes more consistent in comparison to file processing system. Also updated values are available to all the users immediately.
4. Data Integrity Data integrity means unification of so many files into a single file. In DBMS data is stored in different tables. A database contains different tables that are linked to each other. Many users feed entries in these tables so it is important to maintain data items and association between data items. DBMS allows data integrity that makes it easy to decrease data duplicity Data integration reduces redundancy as well as data inconsistency.
5. Backup and Recovery Data loss is a very big problem for all the organizations. In traditional file processing system, a user needs to backup the database after a regular interval of time that wastes lots of time and resources. If the volume of data is large then this process may take a very long time. DBMS solves this problem of taking backup again and again because it allows automatic backup and recovery of database. For examples, if a system fails in the middle of any process then DBMS stores the values of that state in which database were before query execution.
6. Integrity Constraints Constraints are used to store accurate data because there are many users who feed data in database. Data stored in database should always be correct and accurate. DBMS provides the capability to enforce these constraints on database. For example, the maximum marks obtained by the students can never be more than 100. Also account balance of Banks like Axis should not be less than 2500 otherwise you will be penalized.
7. Data Atomicity Any complete transaction in database is called atomic unit. It is the duty of DBMS to store a complete transaction in database. If any transaction is partially completed then it roll backs them. For example, in railway reservation system, if user has completed the process of ticket reservation then his record will be stored and amount of money will be
deducted from his account otherwise no amount will be deducted and if deducted it will be given back.
9. Concurrency Control If two users are accessing data simultaneously and they both want to update values of same record then it may create concurrency. DBMS has the power to control concurrency so that no transactions are lost.
10. Security Data security means protecting your precious data from unauthorized access. Data in database should be kept secure and safe to unauthorized modifications. Only authorized users should have the grant to access the database. There is a username set for all the users who access the database with password so that no other guy can access this information. DBMS always keep database tamperproof, secure and theft free.
10. Powerful User Language A DBMS permits end users to use database without having special training or expertise. Any untrained user can easily query, search and updates data in database. He can easily generate report or documents with less knowledge.
11. Maintaining Cost is lower DBMS systems are costly but after purchasing them their maintenance cost is very less. It can be maintained by few programmers that are not costly for an enterprise.
WHY MY SQL?
MYSQL is a database management system that allows you to manage relational databases. It is open source software backed by Oracle. MYSQL is a freely available open source Relational Database Management System (RDBMS) that uses Structured Query Language (SQL). SQL is the most popular language for adding, accessing and managing content in a database. It is most noted for its quick processing, proven reliability, ease and flexibility of use. MYSQL is an essential part of almost every open source PHP application.
HOW MYSQL WORKS?
The DBA initiates the database start-up procedure that Read the parameter initialization file. Allocates memory for SGA.
Starts up the required processes. Opens and read the control file. Opens the database data file for general access.
The DBA starts up a listener process to wait for user connection requests. A visual basic user makes a connection to the database through the network using ODBC or SQL objects for ADO. The listener process dispatches a server process to handle the user’s SQL requests. The visual basic application passes a SQL statement to the databases. An area of shared pool is allocated for the SQL statement. Required data pulled into the database buffer cache if it is not already there. Any data changes are made in memory and stored as Redo log entries in redo log buffer. Control returns to the visual basic application with a result set if appropriate. The Database writer process writes data changes back to the disk when certain criteria are met. The log writer writes changes to the redo log files when the changes are committed.
Database Buffer
Redo Buffer
cache
Shared Buffer pool
pool
Server Process
Fig: connecting oracle though a server process ADVANTAGES OF MYSQL:
1. Data Security MYSQL is globally renowned for being the most secure and reliable database management system used in popular web applications like Word Press, Drupe, Joule, Face book and Twitter. The data security and support for transactional processing that accompany the recent version of MYSQL can greatly benefit any business especially if it is an e-Commerce business that involves frequent money transfers.
2. on-Demand Scalability MYSQL offers unmatched scalability to facilitate the management of deeply embedded apps using a smaller footprint even in massive warehouses that stack terabytes of data. On-demand flexibility is the star feature of MYSQL. This open source solution allows complete customization to ecommerce businesses with unique database server requirements.
3. High Performance MYSQL features a distinct storage-engine framework that facilitates system administrators to configure the MYSQL database server for a flawless performance. Whether it is an e-Commerce website that receives a million queries every single day or a high-speed transactional processing system, MYSQL is designed to meet even the most demanding applications while ensuring optimum speed, full-text indexes and unique memory caches for enhanced performance.
4. Round-the-clock Uptime MYSQL comes with the assurance of 24X7 uptime and offers a wide range of high availability solutions like specialized cluster servers and master/slave replication configurations.
5. Comprehensive Transactional Support MYSQL tops the list of robust transactional database engines available on the market. With features like complete atomic, consistent, isolated, durable transaction support, multi-version transaction support, and unrestricted row-level locking, it is the go-to solution for full data integrity. It guarantees instant deadlock identification through server-enforced referential integrity.
6. Complete Workflow Control With the average download and installation time being less than 30 minutes, MYSQL means usability from day one. Whether your platform is Linux, Microsoft, Macintosh or UNIX, MYSQL is a comprehensive solution with selfmanagement features that automate everything from space expansion and configuration to data design and database administration.
7. Reduced Total Cost of Ownership By migrating current database apps to MYSQL, enterprises are enjoying significant cost savings on new projects. The dependability and ease of management that accompany MYSQL save your troubleshooting time which is otherwise wasted in fixing downtime issues and performance problems.
8. The Flexibility of Open Source All the fears and worries that arise in an open source solution can be brought to an end with My SQL’s round-the-clock support and enterprise indemnification. The secure processing and trusted software of MYSQL combine to provide effective transactions for large volume projects. It makes maintenance, debugging and upgrades fast and easy while enhancing the end-user experience.
WHY PHP ?
Hypertext Preprocessor/PHP is an open source server side scripting language used to create dynamic website pages. One of the most popular scripting languages in the world, PHP offers a host of advantages. In this post, we would like to discuss a few of the key advantages, application development in PHP offers:
Dynamic: PHP is a server side scripting language that creates dynamic pages with customized features. This results into creation of a user-friendly and interactive web application or website.
Ease to use: PHP is very easy to learn as compared to the other programming languages since its syntax is based on languages like C and Perl. You can place a PHP anywhere in the document and a typical PHP file contains a little PHP scripting code and HTML tags. A basic PHP script starts with .
Free of Cost: Since PHP is an open source web language, it’s completely free of cost. Today almost all the small and big companies are using PHP for web development.
Efficiency in Performance: Depending on how you code, PHP can turn out to be an efficient web language to use. In fact, PHP is known to be scalable when writing code as well as in creating applications and is very reliable when you need to serve several web pages.
Supports all Major Databases: It supports all major databases including MySQL, dBase, InterBase, FrontBase, ODBC, IBM, DB2, PostgreSQL, SQLite, etc.
Protocols: You can easily interact with other services using protocols such LDAP, HTTP, SNMP, NNTP, and others.
Object Oriented Programming: It refers to the method of programming that invokes the use of classes to organize the data and structure of an application. With PHP, OOP started to become feasible with the release of PHP 4, but really found its true meaning with PHP 5. Now, as the world awaits the release of PHP 6 we await another great leap in the evolution of PHP OOP. PHP has become popular because of its simplicity and the addition of ObjectOriented Programming that makes it more powerful and secure. Object means a real world entity such as pen, car, table etc. Object-Oriented Programming is a methodology to design a program using classes and objects. It simplifies the software development and maintenance by providing some concepts such as Class, Object, Inheritance, Polymorphism, Abstraction, Encapsulation etc. This is a technique that is widely used in the modern programming languages.
Huge Community: The PHP community is huge. Owing to its popularity, an unbelievable 21 million indexed domains use PHP and reports suggest that it is the most commonly used open source software in enterprises and more than 76% of the websites that are on the internet, use PHP. Also, some of the top sites such as
Secured: It is one of the most secured way of developing websites and web applications; as it has got a security layer to protect against viruses and threats.
Any application has two parts :
1.User interface:
A user interface (UI) is a conduit between human and computer interaction – the space where a user will interact with a computer or machine to complete tasks. The purpose of a UI is to enable a user to effectively control a computer or machine they are interacting with, and for feedback to be received in order to communicate effective completion of tasks.
2.Program: Computer programming is the act of writing computer programs, which are a sequence of instructions written using a Computer Programming Language to perform a specified task by the computer. Computer Programming is fun and easy to learn provided you adopt a proper approach. This tutorial attempts to cover the basics of computer programming using a simple and practical approach for the benefit of novice learners.
A good interface will be:
Easy to learn Easy to use Attractive
Character based system:
Character-based describes programs capable of displaying only ASCII (and extended ASCII) characters. Character-based programs treat a display screen as an array of boxes, each of which can hold one character. When in text mode, for example, PC screens are typically divided into 25 rows and 80 columns.
In contrast, graphics-based programs treat the display screen as an array of millions of pixels. Characters and other objects are formed by illuminating patterns of pixels.
Graphical User Interface (GUI):
A graphical user interface (GUI) is an interface through which a user interacts with electronic devices such as computers, handheld devices and other appliances. This interface uses icons, menus and other visual indicator (graphics) representations to display information and related user controls, unlike text-based interfaces, where data and commands are in text. GUI representations are manipulated by a pointing device such as a mouse, trackball, stylus, or a finger on a touch screen.
PHP TOOLS AND THERE ADVANTAGES
1. XAMPP This tried-and-true PHP tool is well supported, easy to install and free for anyone to download. It might have more features than you need, but it’s especially helpful if you use MySQL for database management. You can even install CMS components on top of XAMPP with the help of Bitnami.
PHP IN MYSQL WORLD
It is one of the top front-end development tools when it comes to hands-on debugging. You are going to run into many issues when building a new feature, adding a new page or fixing an existing issue. The Chrome Developer Tools are a set of debugging tools built into Chrome. These tools allow you to do a wide variety of development testing in your browser, which saves a ton of development time. There are some important reasons to use The Chrome Developer Tools than any other front-end tools-
Rapid Debugging – The built in console will direct you to errors with your code. The nice thing here is the ability to click on the error link, and you are presented with a view of the problematic code.
Easy to Use – This is more a matter of preference, but many colleagues agree with me. Chrome Dev tools are clean and easy to navigate. The barrier to entry is fairly low even for those with little development experience.
OPEN DATABASE CONNECTIVITY
What is ODBC? Open Database Connectivity—or ODBC—is an application programming interface (API) that lets software connect with database management systems while remaining independent of them. This is important, because it allows applications to interact with multiple databases simultaneously using SQL (Structured Query Language).
ODBC consists of four components, working together to enable functions. ODBC allows programs to use SQL requests that access databases without knowing the proprietary interfaces to the databases. ODBC handles the SQL request and converts it into a request each database system understands.
Four components of open database connectivity (ODBC) Process and calls the ODBC Functions and submits the SQL
APPLICATION
Statement.
ODBC API Loads driver
DRIVER MANAGER
For each Application
ODBC API Handles ODBC function calls Then submits each SQL requests
DRIVER
DRIVER
DRIVER
To the data source
The data being accessed DATA
DATA
DATA
SOURSE
SOURSE
SOURSE
And its database Operating system
The four different components of ODBC are:
Application: Processes and calls the ODBC functions and submits the SQL statements;
Driver manager: Loads drivers for each application;
Driver: Handles ODBC function calls, and then submits each SQL request to a data source; and
Data source: The data being accessed and its database management system (DBMS) OS.
This is any ODBC compliant application, such as Microsoft Excel, Tableau, Crystal Reports, Microsoft Power BI, or similar application (Spreadsheet, Word processor, Data Access & Retrievable Tool, etc.). The ODBC enabled application performs processing by passing SQL Statements to and receiving results from the ODBC Driver Manager. The ODBC Driver Manager loads and unloads ODBC drivers on behalf of an application. The Windows platform comes with a default Driver Manager, while non-windows platforms have the choice to use an open source ODBC Driver Manager like Unix ODBC and adobe. The ODBC Driver Manager processes ODBC function calls, or passes them to an ODBC driver and resolves ODBC version conflicts. The ODBC driver processes ODBC function calls, submits SQL requests to a specific data source and returns results to the application. The ODBC driver may also modify an application’s request so that the request conforms to syntax supported by the associated database .A data source is simply the source of the data. It can be a file, a particular database on a DBMS, or even a live data feed. The data might be located on the same computer as the program, or on another computer somewhere on a network.
COST BENEFIT ANALYSIS
Cost /Expenditure report for computerizing ONLINE SHOPPING MANAGEMENT SYSTEM:
SI. No.
Item
Value in Rs.
01
Hardware cost
20000.00
02.
Software cost
5000.00
03.
User training
5000.00
04.
Supply cost
1000.00
TOTAL COST
31000.00