Vehicle Breakdown Assistance Management System Praveen S and Team
Vehicle Breakdown Assistance Management System Praveen S and Team
S.No. Title
1 Introduction
1.1.Abstract
1.2.Objectives
1.3.Descriptionofthe System
1.4.ProposedSystemanditsAdvantages
1.5.FeasibilityStudy
1.6.ExposedSystem
2 SystemAnalysisandDesign
2.1. SystemDesign
2.2. TableStructure
2.3. SystemTestingandAnalyzing
2.4. DatabaseDesign
3 SystemRequirements
3.1. HardwareRequirements
3.2. SoftwareRequirements
3.3. Functional Requirements
3.4. Non-FunctionalRequirements
4 Front-EndApplication
4.1. HTML5,CSS3
4.2. Ajax
4.3. J-Query,Bootstrap
5 Back-EndApplication
5.1. PHP5.7,JavaScript
5.2. My-SQL8,WampServer2.0i
6 SourceCode&Outputs
7 Conclusion
8 Bibliography
CHAPTER–1
INTRODUCTION
ABSTRACT
Theserviceproviderwillusuallyassistyoutotowittoyourpreferredlocation.In this
application, the user does not need to register himself/themselves they only fill
out one form and roadside assistance will be available.
LanguageUsed PHP5.6,PHP7.x
Database MySQL5.x
UserInterface
HTML5,CSS3,AJAX,JQUERY,JAVASCRIPT
Design
WebBrowser Mozilla,GoogleChrome,IE8,OPERA
Software XAMPP/Wamp/Lamp(anyone),MacromediaDreamweaver 8
OBJECTIVES
“VehicleBreakdownAssistanceManagementSystem”isaweb-basedtechnology that
brings up various roadside assistance companies online. This application can
beincrediblyhandywhenyourvehiclebreaksdownandit’snotpossibletorepair it on
the spot. The service provider will usually assist you to tow it to your preferred
location In this application user does not need to register himself they only fill
out one form and roadside assistance will be available.
Today most people use their own vehicle for travel. While traveling most of the
drivers face trouble as vehicle breakdown on the road. Vehicle breakdown cause
to waste the user valuable time. That is a worst experience they have to face.As
well as it causes to get tired for the journey. when the vehicle breakdown on the
road, the driver has to search for a mechanic and have to see a spare-part shops
near to their location.At that time if the driver unable to search a good mechanic
they have to ask for help someone, but that may be not good technological help
for driver
Advantages:
• The system allows an automated roadside assistance system.
• Allows for faster service.
• Easy,user-friendlyGUI.
• Validation of data will ensure only accurate valid and complete data stored
in the database.
• Easy retrieval of data will be made possible by finding techniques.
• Report generation will help make it easy to analyse the performance.
It is very easy to record the information on online sales and purchases in
databases.
FEASIBILITYSTUDY
This phase implies the primary job of recognizing the problem. In this stage, we
define what the problem is and study the various inputs and outputs of thesystem.
Recognizing the demands of the system and clearly defining the system must be
the output of this phase of software development life cycle.
The output of the preliminary investigation phase is the input to this phase. This
stage aims at analytical conclusions of developer.This phase implies at analysing
whether it is feasible on the part of programmer and for the user to build the
system.The feasibility study is done in terms of resources such as economy, time
etc. More over system requirements are also interpreted from the user and
deductions are made.
The feasibility study is carried out to test if the proposed system is worth being
implemented. Given unlimited resources and infinite time, all projects are
feasible.After performing a Preliminary Investigation, gathering and interpreting
data and details concerning the project, a Feasibility Check is done which
involves a series of steps to check the Technical, Financial, and Operational
feasibilities.
During this phase, various solutions to the existing problems were examined. For
each of these solutions, the Cost and Benefits were the major criteria to be
examined before deciding on any of the proposed systems.
(b) Aclear-cut description of what tasks will be done manually and what needs
to be handled by the automated system.
(c) Specifications of new computing equipment needed.
A system that passes the feasibility tests is considered a feasible system. Let
ussee some feasible tests in my project.
Theimplementationabilityisintermsoflogistics,resourceavailability,cost factors
and time. We did two types of feasibility study.
❖ Economic Feasibility
❖ Operational Feasibility
ECONOMICFEASIBILITY:
Economic Feasibility can be established by cost /benefit analysis of the project
while considering both the direct as well as the indirect cost against the tangible
benefits. In software system intangible benefits are visible at the start & hence a
system analyst must try to convert such intangible benefits into measurable
derivatives of such benefits.
OPERATIONALFEASIBILITY:
Our Project is operationally feasible since there is no need for special training of
staff member and whatever little instructing on this system is required can be
done so quite easily and quickly as it is essentially This project is beingdeveloped
keeping in mind the general people who one has very little knowledge
ofcomputeroperation,butcaneasilyaccesstheirrequireddatabaseandother
related information. The redundancies can be decreased to a large extent as the
system will be fully automated.
OperationalFeasibilitycanbefurtherdividedintotwotypes:
1). TechnicalFeasibility(regardingimplementation)
2). Usage/ApplicationFeasibility
1) TECHNICALFEASIBILITY:
It is related to the software and equipment specified in the design for
implementing a new system. Technical feasibility is a study of function,
performance and constraints that may affect the ability to achieve an acceptable
system. During technical analysis, the analyst evaluates the technical merits
ofthesystem,atthesametimecollectingadditionalinformationaboutperformance,
reliability,maintainabilityandproductivity.Technicalfeasibilityisfrequentlythe
most difficult areas to asset.
The main technical issue raised during feasibility is the existence of necessary
technologyandwhethertheproposedequipmenthasthecapacitytoholdrequired data.
The technical guarantee of accuracy, reliability, ease and data were also
investigated
AssessingSystemPerformance:
It involves ensuring that the system responds to user queries and is efficient,
reliable, accurate and easy to use. Since we have the excellent network setup
which is supported and excellent configuration of servers with 80 GB hard disk
and 512 MB RAM, it satisfies the performance requirement.
After the conducting the technical analysis, we found that our project fulfills all
the technical pre-requisites environments, if necessary are also adaptable
according to the project.
2) APPLICATIONFEASIBILITY:
Itisestablished by the analysis of the systems applicability, ease of use &
efficiency under various possible operating environments with respect to
specified constraints.
ECONOMICFEASIBILITY
Thisfeasibilityhasgreat importance asit canoutweigh otherfeasibilitiesbecause
costs affect organization decisions. The concept of Economic Feasibility deals
with the fact that a system that can be developed and will be used on installation
must be profitable for the Organization. The cost to conduct a full system
investigation, the cost of hardware and software, the benefits in the form of
reduced expenditure are all discussed during the economic feasibility.
ReturnonInvestment
TherewillberevenueintermsofmoreCustomerSubscriptions.
i. Therewillbecostreductionintermsofmaintaininghugeamountsofpaper
records, stationary, humans.
ii. TherewillbetrackingoftheSubscribersfromacentralizeddatabase.
iii. TherewillbeawarenessamongnotonlytheSubscribers,butgeneralpublic
regarding the good points of the issue.
CostofNoChange
The cost will be in terms of utilization of resources leading to the cost to the
company. Since our cost of project is our efforts, which is obviously less than the
long-term gain for the company, the project should be made.
EXPOSEDSYSTEM
DISADVANTAGES:
Thefollowingarethedisadvantagesoftheexistingsystem
• Itreducesemploymentashumaneffortsarebeingautomatedbythissystem.
• Moremanualhoursneedtogeneraterequiredreports.
CHAPTER–2
SYSTEMANALYSISANDANDDESIGN
SystemDesign
“VehicleBreakdownAssistanceManagementSystem” is a web-based
technology that brings up various roadside assistance companies online. This
application can be incredibly handy when your vehicle breaks down and it’s
impossibletorepairthespot.Theserviceproviderwillusuallyassistyoutotowit to your
preferred location In this application user does not need to register himself/herself
they only fill out one form and roadside assistance will be available.
1. Admin
2. Driver
3. User
AdminModules
Dashboard: In this section, the admin can briefly view the total driver, total new
request,totalapprovedrequest,totalrejectedrequestbyadmin,totaldriveronthe way
request, and total completed request.
Driver:Inthissection,theadmincanmanage thedriver(Add/Update).
Requests: In this section, the admin can view the booking request and the admin
also has the right to change the booking status according to the current status and
give his/her remarks.
Search: In this section, admin can search a particular booking detail by booking
number, name, and mobile number.
Report: In this section, admin can view between-dates appointment reports and
driver wise report according to dates.
Admin can also update his profile, change the password and recover the
password.
DriverModules
Dashboard: Inthissection,driver canbrieflyviewtotalnewassignrequest,total
completed request and total in progress requests.
AssignBooking: In this section, driver can view the booking request which is
assign by the admin and driver has rights to change the request status accordingto
current status.
Search: In this section, driver can search a particular booking request detail by
booking number, name and mobile number.
Reports: In this section, employee can view how many booking requests has
been assign, how many booking request has been completed and how many
booking request has been pending in his/her end.
Driver can also update his profile, change the password and recover thepassword.
Users: In this application user does not need to register himself/herself they only
fill single form for vehicle assistance.
TableDesign
ProductPerspective
It will be able to manage information about different tutorials in a more user-
friendlyway.Thissystemwillmanagetutorialinformationatvariouspages.User ID
and password has been given to all the field in admin accounts so that theycan
enter their see by this information to login from admin and.
UserInterface
▪ TheSystemwillbehavinguserprivileges-based menu.
▪ Userwillhavetoselect theoptionstoformthegivenmenu.
▪ TheSystemwillbeselectingdesiredtutorialinformationfromthe database.
▪ Theformswillbe designedtoenterthedata.
▪ Buttonswillbeusedtoinsert,delete,clear,andmodifythedata.
▪ Buttonstoexit fromtheforms.
TableStructure
Driver(Add/
Update)
ManageRequest
(Approve/Reject)
Search
Register
ADMINLOGIN
Home GenerateReports
UpdateProfile
Password
DATABASE Recovery
Dashboard
DRIVERLOGIN Register
Home
AssignedRequest
Search
ViewReports
UpdateProfile
PasswordRecovery
ClassDiagram
Adescriptionofsetofobjectsthatsharethesameattributesoperations,relationships, and
semantics.
SYSTEMTESTINGANDANALYZING
ObjectivesofTesting:
This section introduces the concept of testing and how important is, for the
successful implementation of the project. Different phases of testing aredescribed
along with the level of testing incorporated in this particular project.
Testing is vital to the success of any system. Testing is done at different stages
within the phase. System testing makes a logical assumption that if all phases of
the system are correct, the goals will be achieved successfully. Inadequate testing
at leads to errors that may come up after a long time when the correction would
be extremely difficult.Another objective of testing is its utility as a user-oriented
vehicle before implementation. The testing of the system was done on both
artificial and live data.
Typically, the project team includes a mix of testers and developers who work
closely together, with the overall QA processes being monitored by the project
managers.
TestingPrinciples
Davissuggestedasetoftestingprinciplesin1995.These are:
1) Alltestsshould betraceabletothecustomerrequirements.
2) Testshouldbeplannedlongbeforetestingbegins.
3) Testingshouldbegininsmallandprogressedtowardstestinginthe large.
4) Exhaustivetestingisnot possible.
5) For effective results, testing should be conducted by an independent
thirdparty.
Attributesofagoodtest
Agoodtestshould havethefollowingcharacteristics:-
1) Agoodtestmusthave ahighprobabilityoffindinganerror.
2) Agood testis non redundant.
3) A good test should be best of breed, i.e. testing should be in time and
according t6o resource limitation.
4) Agood test should be neither too simple nor too complex. Sometimes it is
possible to combine a series of tests into one test.
Testing is usually relied on to detect the faults introduced during the coding
phase. Due to this different level of testing are used in the testing process and
each level of testing aims to test different aspects of the system.
Levels of testing
ClientNeeds AcceptanceTesting
SystemRequirementSpecification SystemTesting
Design Integration
Coding UnitTesting
TypesofTesting
BlackBoxTesting
Also known as functional testing, this isa software testing technique whereby the
testerdoesnotknowtheinternalworkingoftheitembeingtested.Black-boxtest design
treats the system as a “black-box”, so it does not explicitly use knowledge ofthe
internalstructure.Black-boxtest design isusually describedasfocusing on testing
functional requirements. Synonyms for black-box includes behavioural,
functional, opaque-box and closed-box.
WhiteBoxTesting
White box test design allows one to peek inside the “box”, and it focuses
specifically on using internal knowledge of the software to guide the selection of
test data. Synonyms for white-box include: structural, glass-box and clear- box.
ConditionTesting
DataLife-CycleTesting
It is based upon the consideration that in the software code, a variable is at some
stage created, and subsequently may have its value changed or used in a
controlling expression several times before being destroyed. If only locally
declared Boolean used in control conditions are considered then an examination
ofthesourcescodewillindicatetheplaceinthesourcecodewherethevariableis created,
places where it is given a value is used as a part of a control expression and the
place where it is destroyed.
This approach to testing requires all possible feasible lifecycles of the variable to
be covered whilst the module is under test.
UnitTesting
Thepurposeofthisphaseistotesttheindividualunitsofthedevelopingsoftware
component. This phase is recursive and is to be repeated, as many as there are,
levels of testing. In the DGLW project, each individual form has been testedusing
techniques of testing namely: Client-side testing using JavaScript.
Each individual form has been validated so that user enters only valid data at
every time.
FunctionalTesting:
This is done for each module / sub module of the system. Functional testing
serves as a means of validating whether the functionality of the system Confers
the original user requirement i.e. doesthe module do what it wassupposed to do?
Separate schedules were made for functional testing. It involves preparation ofthe
test data, writing of test cases, testing for conformance to test cases and
preparation of bugs listing for non-conformities.
SystemTesting:
System testing is done when the entire system has been fully integrated. The
purpose of the system testing is to test how the different modules interact with
each other and whether the entire system provides the functionality that was
expected.
Systemtestingconsistsofthefollowing steps:
a) ProgramTesting
b) StringTesting
c) SystemTesting
d) System Documentation
e) UserAcceptanceTesting
VariousLevelsofTesting
Beforeimplementationthesystemistestedattwolevels:
Level1Testing(AlphaTesting)Level
2Testing(BetaTesting)Level1Testin
g(AlphaTesting)
At this level a test data is prepared for testing. Project leaders test the system on
this test data keeping the following points into consideration:
● Propererrorhandling
● ExitPintsin code
● Exception handling
● Glassboxtesting
● Blackboxtesting
If the system is through with the testing phase at LEVEL1 then it is passed on to
LEVEL 2.
Level2Testing(BetaTesting)
Here the testing is done on the live database. If errors are detected then it is sent
back to LEVEL1 for modification otherwise it is passed on to LEVEL3.
This is the level at which the system actually becomes live and implemented for
the use of END USERS.
Wehavealsocheckedtheproposedsystemfor:Recovery&Security
A forced system failure is induced to test a backup recovery procedure for file
integrity. Inaccurate data are entered to see how the system responds in terms of
error detection and protection. Related to file integrity is a test to demonstratethat
data and programs are secure from unauthorized access.
UsabilityDocumentation&Procedure:
The usability test verifies the user-friendly nature of the system. This relates to
normal operating and error-handling procedures.
Testing-QualityAssurance:
Proper documentation is must for mainframe of any software.Apart from In- line
documentation while coding. Help coding, help files corresponding to each
program were prepared so as to tackle the person-dependency of the existing
system.
DATABASEDESIGN
CLIENT-SIDESERVER
ADMINSERVER
CHAPTER–3
SYSTEMREQUIREMENTS
SoftwareSpecifications
1. HardwareRequirements
2. SoftwareRequirements
3. Functional Requirements
4. Non-functional Requirements
HardwareRequirements
❖ IntelPentium4 processor
❖ 80GBharddisk
❖ 1GBRAM
❖ OS:WindowsXP/Windows7
❖ InternetUsage4.2MBPS
SoftwareRequirements
❖ HTML5
❖ CSS3
❖ PHP(AdvancedVersion–Core)
❖ JavaScript
❖ J-Query
❖ MySQL
❖ Apache
❖ MacromediaDreamweaverCS6
❖ WampServer2.0i
FunctionalRequirements
When part of an intranet is made accessible to customers and others outside the
business, that part becomes part of an extranet. Businesses can send private
messages through the public network, using special encryption/decryption and
other security safeguards to connect one part of their intranet to another.
Non-FunctionalRequirements
Workforceproductivity:VehicleBreakdownAssistanceManagementSystem
can help users to locate and view information faster and use applications relevant
to their roles and responsibilities.With the help of a web browser interface, users
can access data held in any database the organization wants to make available,
anytimeand—subjecttosecurityprovisions—fromanywherewithinthe
company workstations, increasing employees' ability to perform their jobs faster,
more accurately, and with confidence that they have the right information. It also
helps to improve the services provided to the users.
Businessoperationsandmanagement:VehicleBreakdownAssistanceManagem
entSystem are also being used as a platform for developing and deploying
applications to support business operations and decisions across the
internetworked enterprise.
Cost-effective: Users can view information and data via web-browser rather than
maintaining physical documents such as procedure manuals, internal phone list
and requisition forms.
CHAPTER–4
FRONT-ENDAPPLICATION
HTML5&CSS3
HTMLstandsforHyperTextMark-upLanguage.HTML5isarevisedversionof
theoriginalHTMLstandardcreated in1990bytheWorldWideWebConsortium to
define an Open Web Platform.HTML is a language used for structuring and
presenting content on the Web consistently, across web browsers. HTML5 is the
evolution of that standard to meet the increasing demands presented by today’s
rich media, cross device and mobile internet access requirements.As such, it is a
greatcandidateforcross-platformmobileapplicationdevelopment,asmanyofits
features have been adapted with the consideration of running on low powered
devices, such as Smart Phones and Tablets and providing web developers with
tools like CSS3.Importantly whilst running within a web browser, (as HTML5
does) it is not tied to the underlying operating system, freeing applications from
the significant development and support overhead of multiple native applications
(e.g. iOS, Android, Blackberry etc.)
HTML5 is already supported in the latest web browsers on PCs and tablets and
according to StrategyAnalytics there will be one billion HTML5-capable phones
sold in 2013, a huge increase from the 336 million units sold in 2011. This
increase means that it is impossible to ignore the importance of HTML5 when
considering your mobile site.Indeed, in some B2C and retail ecommerce client
implementations Byte9 are seeing 40% of visitors accessing sites on mobile
devices; this is only going to rise.
CascadingStyleSheets(CSS)
CSS stands for ‘Cascading Style Sheets’ and is the language of design for web
pages, giving site designers the ability to suggest how their site documents are
styled.CSSisinterpretedbyallgraphicalwebbrowsersregardlessofdeviceor
operatingsystem.Itallowsalogicaldivisionbetweenthestructureofawebpage,
(handled by the HTML) and the way it should look. CSS can be used to tailor the
appearance of a web page specific to a particular device or screen size. In short,
CSS is the language used for implementing front-end web design.
AdvantagesofHTML5andCSS
Using HTML5 and CSS3 provides advantages to businesses that develop and
deploy web content and web applications, to create refined and accurate web
pages and web systems that operate across devices, operating systems and web
browsers. Write once, run anywhere.The plethora of devices, operating systems
and screen sizes present numerous designs, functional and layout considerations
and problems if standards are not adhered to.
TheadvantagesofastandardsbasedHTML5andCSS3approachareasfollows:
1. CosteffectiveMulti-PlatformDevelopment
A single batch of code can be used across platforms, devices and different
markets; this is an advantage because it results in lower development and
maintenance costsoverthewebsite orwebapplication'slifetime,enablingyouto use
your resources elsewhere. Current best practice for cross platform (e.g. IOS and
Android) application development is a ‘hybrid’ approach, whereby web standards
are followed within a native application ‘wrapper’that can be placed in the iOS or
Android store.
2. Goodpageranking
3. Offlinebrowsing
In a similar way that ‘apps’ can be used offline, without an internet connection,
HTML5 supports local storage of web application code and content, through the
offline application cache. This is a tremendous advantage to businesses, like
publishers, who can provide an offline web experience for readers on the move.
The offline cache also produces significant performance enhancements as moreof
the site or system code and content is accessed quickly, locally.
4. Consistencyacrossmultiplebrowsers
Not all browsers support all web pages or web applications, however, the
implementation of HTML5 and CSS3 helps the designer to create a compatible
site or system within all browsers.
5. BettermobileaccesstoBusinessIntelligence
6. Extensionofvideotoawiderangeofplatforms
7. Geolocation
HTML5supportsgeolocation.OnceauseroptstosharetheirlocationanHTML5
application can use the user's location. This can be of primary importance when
developing location-based services or apps.
8. Abetteruserexperience
HTML5 offers a wider range of design and presentation tools across media types,
giving the developers greater scope to produce a better web sites and web
applications. This is vital from a business point of view, as user engagement and
retention is a key to increase site and system use and conversion. Creating an
accessible and usable site or system means that users will be more likely to
engage.
AJAX
What isAJAX?
AJAX=AsynchronousJavaScriptAndXML. AJAX
AJAXjustusesacombinationof:
• A browserbuilt-inXMLHttpRequestobject(torequestdatafromaweb server)
• JavaScriptandHTMLDOM(todisplayorusethe data)
AJAXallowswebpagestobeupdatedasynchronouslybyexchangingdatawitha web
server behind the scenes. This means that it is possible to update parts of a web
page, without reloading the whole page.
HowAJAXWorks
J-Query&Bootstrap
J-Query
jQuery is a fast, small, and feature-rich JavaScript library. It makes things like
HTML document traversal and manipulation, event handling, animation, and
Ajax much simpler with an easy-to-use API that works across a multitude of
browsers.Witha combinationofversatilityandextensibility, jQueryhaschanged the
way that millions of people write JavaScript.
One important thing to know is that jQuery is just a JavaScript library. All the
power of jQuery is accessed via JavaScript, so having a strong grasp ofJavaScript
is essential for understanding, structuring, and debugging your code. While
working with jQuery regularly can, over time, improve your proficiency with
JavaScript, it can be hard to get started writing jQuery without a working
knowledge of JavaScript'sbuilt-inconstructsandsyntax.Therefore,if you're new to
JavaScript, we recommend checking out the JavaScript basics tutorial on the
Mozilla Developer Network (MDN).
Bootstrap
Bootstrap is the most popular CSS Framework for developing responsive and
mobile-first websites.
Bootstrap5isthenewestversionof Bootstrap
Bootstrapdevelopmentframework
Bootstrap's12-columngridsystemcanupdateresponsivelybasedonscreensize. What
Bootstrap makes responsive web design a reality. It makes it possible for a web
page or app to detect the visitor's screen size and orientation and automatically
adapt the display accordingly. The mobile-first approach assumes smartphones,
tablets and task-specific mobile apps are employees' primary tools for getting
work done. Bootstrap addresses the requirements of those technologies in design
and includes UI components, layouts, JavaScript tools and the implementation
framework.
Whatisbootstrapinacomputer?
What isBootstrapCSS?
The most popular CSS framework for developing responsive and mobile-first
websites is Bootstrap. The newest version is Bootstrap 5.
What isbootstrappinginstatistics?
What isBootstrapProtocol?
What isbootstrapCDN?
What isbootstrappingingeneralterms?
In the physical world, a bootstrap is a small strap or loop at the back of a leather
boot that enables the boot to be pulled on. In general use, bootstrapping is
leveraging a small initial effort into something larger and more significant. The
metaphor, "pulling yourself up by your bootstraps," means to achieve success
from a small beginning.
CHAPTER–5
BACK-ENDAPPLICATION
PHP:
HypertextPre-processor (PHP) is a programming language that allows web
developers to create dynamic content that interacts with databases.
PHP started out as a small open source project that evolved as more and more
people found out how useful it was. Rasmus Lerdorf unleashed the first versionof
PHP way back in 1994.
• PHPisarecursiveacronymfor"PHP:HypertextPre-processor".
• PHPisforgiving:PHPlanguagetriestobeasforgivingas possible.
• PHPSyntaxisC-Like.
CommonusesofPHP:
• PHP performssystemfunctions,i.e.fromfilesonasystemitcancreate, open,
read, write, and close them.
• PHP can handle forms, i.e. gather data from files, save data to a file,
thruemail you can send data, return data to the user.
• Youadd,delete,andmodifyelementswithinyourdatabasethru PHP.
• Accesscookiesvariablesandset cookies.
• UsingPHP,youcanrestrictuserstoaccesssomepagesofyourwebsite.
• Itcanencryptdata.
CharacteristicsofPHP
FiveimportantcharacteristicsmakePHP'spracticalnaturepossible:
• Simplicity
• Efficiency
• Security
• Flexibility
• Familiarity
JavaScript:
JavaScript is a simple, powerful, and popular programming language that is built
into web browsers. Learning JavaScript is especially useful if you are a web
designer and already know HTML and CSS, because it is used to make webpages
interactive. However, JavaScript is not limited to making interactive web pages;
you can also use it for server-side programming using a framework like Node.js.
In this tutorial you'll learn some JavaScript basics, including two basic computer
programming concepts—calculations and variables. If you want to learn to make
interactive websites using JavaScript, you need to learn core computer
programming concepts. Using HTML and JavaScript, you can change the
contents of HTML elements in response to user events, such as a button click.
WritingasimpleHelloWorldJavaScriptprogram
Intheexampleabove,theJavaScriptcodeisthelinebetween
the <script> and </script>. This line contains a JavaScript alert command that
instructs the web browser to display a message box that contains the text between
the quotation marks. Note that in JavaScript, the quotes around the message can
be single or double quotes, as long as they are both the same.
If we are familiar with HTML, we may be wondering why the example does not
contain <html>, <head> and <body>tags. In actual fact, these tags are optional in
both HTML4 and HTML5. The examples in this tutorial follow the Google style
guide, which recommends leaving out optional tags.
Torunthisprogram,followthesesteps:
1. Copy the five lines of code and paste them into a text editor (such as
Dreamweaver or Notepad)
2. Savethe fileastest.html
3. Openthefileusingyourfavouriteweb browser
4. AmessageboxthatsaysHelloWorld!appearsassoonasthepageloads
5. If we'd like, we can edit test.html to change the message that appears in the
message box, then save our code and click F5 while our web browser is
active to refresh the page.
Notice that the alert statement ends with a semi-colon. In JavaScript, the semi-
colonisoptional—unlikeprogramminglanguagessuchasCandJava.However,
since there are a few cases where leaving off the semi-colon causes problems, itis
recommended that you a semi-colon after each command.
Performingcalculations
All the regular math rules regarding order of operation and the use of parenthesis
(or round brackets) also apply in JavaScript. So, for example, multiplication (*)or
division (/) calculations occur before addition (+) and subtraction (–). The
following JavaScript code example displays the result of a simple calculation in
an alert box:
alert(32 +9 * 1.8);
JavaScript is a scripting language that will allow you to add real programming to
our webpages.
We can create small application type processes with JavaScript, like a calculator
or a primitive game of some sort.
However,therearemoreserioususesforJavaScript:
BrowserDetection:
Cookies:
Storing information on the visitor's computer, then retrieving this information
automatically next time the user visits our page. This technique is called
"cookies".
ControlBrowsers:
Validateforms:
Many database-driven websites that use MySQL also use a Web scripting
language like PHP to access information from the database. MySQL commands
can be incorporated into the PHP code, allowing part or all of a Web page to be
generated from database information. Because both MySQL and PHP are both
open source (meaning they are free to download and use), the PHP/MySQL
combination has become a popular choice for database-driven websites.
WhatisMySQL?
• MySQLisadatabasesystem usedontheweb
• MySQLisideal forbothsmallandlargeapplications
• MySQLisveryfast,reliable,andeasytouse
• MySQLsupportsstandardSQL
• MySQLcompilesonanumberofplatforms
• MySQLisfreetodownloadanduse
Databasesareusefulwhenstoringinformationcategorically.Acompanymay have a
database with the following tables:
• Employees
• Products
• Customers
• Orders
PHP+MySQL
Queries
Aqueryisaquestionorarequest.
Wecanqueryadatabaseforspecificinformationandhavearecordsetreturned. Look at
SELECTLastNameFROM Employees
TolearnmoreaboutSQL,pleasevisitourSQLtutorial. Starting
MySQLis preinstalled on our virtual machine and automatically starts when you
boot the VM. Once you log in to the VM, you can start the MySQL command-
line interface by typing MySQL:
cs144@cs144:~$ MySQL
Thenyoushouldreceivethefollowingprompt
MySQL>
ChoosingaDatabaseinMySQL
SHOWDATABASES;
Wewillseeanoutputlike
+ +
|Database |
+ +
|information_schema|
|CS144 |
| TEST |
+ +
information_schema is a database that MySQL creates automatically and uses to
maintain some internal statistics on database and tables. The other two databases,
CS144 and TEST, are what we created for the project (note database names are
case-sensitive in MySQL). This two database setup mimics commondevelopment
environments in the real world. The CS144 database is your "production"
database, meant for use in the final versions of your code. TheTEST database is
for any experimentation and for use during development and debugging. Select
the TEST database for the rest of this tutorial by issuing the command
USETEST;
Itisalsopossibletospecifyadatabaseasacommandlineparametertothe MySQL
command:
cs144@cs144:~$mysqlTEST
CreatingaTable
Once we select a database, we can execute any SQLcommand. For example, we
can create a table using the CREATE TABLE command:
CREATETABLE<tableName>(
<listofattributesandtheirtypes>
);
Notethatallreservedkeywords(likeCREATEandTABLE)arecase- insensitive and
identifiers (like table names and attribute names) are case- sensitive in MySQL
by default. That is, a table named STUDENT is different from the student table.
We may enter a command on one line or on several lines. If your command runs
over several lines, we will be prompted with " ->" until you type the semicolon
that ends any command.An example table-creation command is:
CREATETABLEtbl(aint,bchar(20));
Thiscommandcreatesatablenamedtblwithtwoattributes.Thefirst,nameda,is an
integer, and the second, named b, is a character string of length (up to) 20.
When we create a table, you can declare a (set of) attribute(s) to be the primary
key like:
CREATETABLE<tableName>(...,a<type>PRIMARYKEY,b,...);
or
CREATETABLE<tableName>(<attrsandtheirtypes>,PRIMARY KEY(a,b,c));
InsertingandRetrievingTuples
Having created a table, we can insert tuples into it. The simplest way to insert is
with the INSERT command:
INSERTINTO<tableName>
VALUES(<listofvaluesforattributes,inorder>);
Forinstance,wecaninsertthetuple(10,'foobar')intorelationtblbyINSERT INTO tbl
VALUES (10, 'foobar');
Oncetuplesareinserted,wecanseethetuplesinarelationwiththecommand: SELECT *
FROM<tableName>;
Forinstance,aftertheabovecreateandinsertstatements,thecommand
SELECT*FROMtbl;
producesthe result
+ + +
|a |b |
+ + +
|10 |foobar |
+ + +
CreatingIndex
Havingcreatedatable,wecancreateanindexonsomeattributesofthetable. The
command for creating an index is:
CREATEINDEX<indexName>ON<tableName>(<listofattributes>);Forinstance,
we can create an index on b attribute of table tbl by
CREATEINDEXIdxOnAttrBONtbl(b);
Later,ifyouwanttodropanindex,youusethefollowingcommandDROP INDEX
<indexName> ON <tableName>;
like
DROPINDEXIdxOnAttrBONtbl;
Note that in MySQL, an index is automatically created on primary keys and
unique attributes.
MySQL is a powerful database. It's very good and free of charge. Many
developers in the world selected MySQL and php for developing their website.
The MySQL® database has become the world's most popular open source
database because of its consistent fast performance, high reliability and ease of
use. It's used in more than 6 million installations ranging from large corporations
to specialized embedded applications on every continent in the world. (Yes, even
Antarctica!)
Not only is MySQL the world's most popular open source database, it's also
become the database of choice for a new generation of applications built on the
LAMP stack (Linux, Apache, MySQL, PHP / Perl / Python.) MySQL runs on
more than 20 platforms including Linux, Windows, OS/X, HP-UX, AIX,
Netware, giving you the kind of flexibility that puts you in control.
Whetheryou'renewtodatabasetechnologyoranexperienceddeveloperorDBA,
MySQLoffers a comprehensive range of certified software, support, training and
consulting to make you successful.
MySQLHomepage
1. ScalabilityandFlexibility
The MySQL database server provides the ultimate in scalability, sporting the
capacity to handle deeply embedded applications with a footprint of only 1MB to
running massive data warehouses holding terabytes of information. Platform
flexibility is a stalwart feature of MySQL with all flavours of Linux, UNIX, and
Windows being supported. And, of course, the open source nature of MySQL
allowscompletecustomizationforthosewantingtoadduniquerequirementsto
thedatabaseserver.
2. HighPerformance
3. HighAvailability
MySQL offers one of the most powerful transactional database engines on the
market. Features include complete ACID (atomic, consistent, isolated, durable)
transaction support, unlimited row-level locking, distributed transaction
capability, and multi-version transaction support where readers never block
writersand vice-versa. Full data integrity isalso assured through server-enforced
referential integrity, specialized transaction isolation levels, and instant deadlock
detection.
5. WebandDataWarehouseStrengths
MySQL is the de-facto standard for high-traffic web sites because of its high-
performance query engine, tremendously fast data insert capability, and strong
support for specialized web functions like fast full text searches. These same
strengths also apply to data warehousing environments where MySQL scales up
into the terabyte range for either single servers or scale-out architectures. Other
features like main memory tables, B-tree and hash indexes, and compressed
archive tables that reduce storage requirements by up to eighty-percent make
MySQL a strong standout for both web and business intelligence applications.
6. StrongDataProtection
Because guarding the data assets of corporations is the number one job of
database professionals, MySQL offers exceptional security features that ensure
absolute data protection. In terms of database authentication, MySQL provides
powerful mechanisms for ensuring only authorized users have entry to the
database server, with the ability to block users down to the client machine level
being possible. SSH and SSLsupport are also provided to ensure safe and secure
connections. A granular object privilege framework is present so that users only
see the data they should, and powerful data encryption and decryption functions
ensurethatsensitivedataisprotectedfromunauthorizedviewing.Finally,backup and
recovery utilities provided through MySQLand third-party software vendors
allow for complete logical and physical backup as well as full and point-in-time
recovery.
7. ComprehensiveApplicationDevelopment
One of the reasons MySQL is the world's most popular open source database is
that it provides comprehensive support for every application development need.
Within the database, support can be found for stored procedures, triggers,
functions, views, cursors, ANSI-standard SQL, and more. For embedded
applications, plug-in libraries are available to embed MySQL database support
into nearly any application. MySQL also provides connectors and drivers(ODBC,
JDBC, etc.) that allow all forms of applications to make use of MySQL as a
preferred data management server. It doesn't matter if it's PHP, Perl, Java, Visual
Basic, or .NET, MySQL offers application developers everything they need to be
successful in building database-driven information systems.
8. ManagementEase
MySQL offers exceptional quick-start capability with the average time from
software download to installation completion being less than fifteen minutes.This
rule holds true whether the platform is Microsoft Windows, Linux, Macintosh, or
UNIX. Once installed, self-management features like automatic space expansion,
auto-restart, and dynamic configuration changes take much of the burden off
already overworked database administrators. MySQL alsoprovides a complete
suite of graphical management and migration tools thatallowa DBAtomanage,
troubleshoot, andcontrolthe operationofmanyMySQL servers from a single
workstation. Many third-party software vendor tools arealso available for
MySQLthat handle tasks ranging from data designand ETL, to
completedatabaseadministration,jobmanagement,andperformancemonitoring.
9. OpenSourceFreedomand24x7Support
Many corporations are hesitant to fully commit to open source software because
they believe they can't get the type of support or professional service safety nets
they currently rely on with proprietary software to ensure the overall success of
their key applications. The questions of indemnification come up often as well.
These worries can be put to rest with MySQL as complete around-the-clock
supportaswellasindemnificationisavailablethroughMySQLNetwork.
MySQL is not a typical open source project as all the software is owned and
supported by MySQLAB, and because of this, a unique cost and support model
are available that provides a unique combination of open source freedom and
trusted software with support.
10. LowestTotalCostofOwnership
Bymigratingcurrentdatabase-driveapplicationstoMySQL,orusingMySQLfor new
development projects, corporations are realizing cost savings that many times
stretch into seven figures.
WampServer
WampServer installs automatically all you need to start developing web
applications and is very intuitive to use. You will be able to tune your server
without even touching the setting files.
INSTALLING
• Double click on the downloaded file and just follow the instructions.
Everything is automatic. The WampServer package is delivered with the latest
releases of Apache, MySQL and PHP.
• Each release ofApache, MySQLand PHPhas its own settings and its own
files (datas for MySQL).
UsingWampServer