In general, we can't connect a remote user's web browser directly to a database system. There are exceptions to this-java applets are one way around it. The browser talks to a program running on the web server that is an intermediate to the database. This program is CGI ( Common Gateway Interface) script, a java servlet or some code written inside an ASP or JSP document. The program retrieves the information from the database and sends it to the user as HTML pages. The following figure shows the interaction between a user and a web-based database system:-
E.g :- An example of an insert operation will be filling up a form on your browser to so online registration for exam. Another example for an update operation will be updating your profile on Facebook.
- The user types in a URL or fills a form or submits a search a search on a web page.
- The browser sends the user's query from the browser to the web server, which passes it on to a CGI script. CGI is a predefined system for transferring data across the Internet.
- The CGI Script converts the query into SQL commands and sends to the Database server.
- The database server executes the SQL commands passes the results to the CGI Script.
- The CGI Script generates an HTML document and sends it to the web server.
- The web server sends the HTML document to the user.
E.g :- An example of an insert operation will be filling up a form on your browser to so online registration for exam. Another example for an update operation will be updating your profile on Facebook.
No comments:
Post a Comment