Q. 1. Write a PERL program that records a file with 4 fields from the database. The fields are Emp_Code, emp_name, basic_pay,
Also program to find the following:
HRA = 12% of Basic_pay
DA = 6% of Basic_Pay
Vehicle Allowance (VA) = 2.4% of Basic_Pay
Professional Tax (PT) = 1% of Basic_Pay
PF = 12% of Basic_Pay
Net_Pay = Basic_Pay + HRA+ DA + VA- PF - PT
Ans:
#Including the library file.
require "cgi-lib.pl";
#Prints the content type
print "Content-type:text/html\n\n";
#Specifying the ODBC Driver
use Win32::ODBC;
#The SQL
$sql = "SELECT * FROM EMPLOYEE;";
#The data source name
$dsn="Employee";
#Getting the connectivity
$dataBase=new Win32::ODBC($dsn);
#Setting the SQL Statement
$dataBase -> Sql($sql);
#Display to the Web Page
print "
Example
print "
";
print "
print "
Basic Pay
#Loop until there is data in the database and display the results on the web page
while ($dataBase -> FetchRow())
{
($EMP_NO, $EMP_NAME,$BASIC_PAY)=$dataBase->Data("EMP_NO","EMP_NAME","BASIC_PAY");
print " $EMP_NO";
print " $EMP_NAME";
print " $BASIC_PAY";
$HRA=$BASIC_PAY/100 * 12 ;
$DA=$BASIC_PAY/100 * 6 ;
$VA=$BASIC_PAY/100 * 2.4 ;
$PT=$BASIC_PAY/100 * 1;
$PF=$BASIC_PAY/100 * 12;
$NP=$BASIC_PAY+$HRA+$DA+$VA-$PF-$PT;
print " $HRA";
print " $DA";
print " $VA";
print " $PT";
print " $PT";
print " $NP";
}
#close the database connection
$database -> Close();
print "";
print "";
Q. 2. List the various services offered on the internet.
Ans.
The Internet
The Internet is a worldwide network of computer networks. It is comprised of thousands of separately administered networks of many sizes and types. Each of these networks is comprised of as many as tens of thousands of computers; the total number of individual users of the Internet is in the millions. This high level of connectivity fosters an unparalleled degree of communication, collaboration, resource sharing, and information access. In the United States, the National Science Foundation Network (NSFNet) comprises the Internet "backbone" (a very high speed network that connects key regions across the country). The NSFNet will likely evolve into the National Research and Education Network (NREN) as defined in the High- Performance Computing Act of 1991 (P.L. 102-194, signed into law by President Bush on December 9, 1991).
Physical Connections and Logical Agreements
For the Internet to exist, there must be connections between computers and agreements on how they are to communicate. Connections can consist of any of a variety of communication media or methods: metal wires, microwave links, packet radio or fiber optic cables. These connections are usually established within areas or regions by the particular networking organization with authority or economic interest in that area. For example, a university academic department may lay Ethernet cable to connect its personal computers and workstations into a local area network (LAN), which is then connected to the cables the campus laid to connect its buildings together, which is then linked to cables laid by a regional network, which itself ties into the NSFNet backbone, the infrastructure for which was funded by the U.S. government. Therefore the path between any two points on the Internet often traverses physical connections that are administered by a variety of independent authorities.
For disparate computers (from personal computers to mainframes) to communicate with other computers over a network, there must be agreements on how that should occur. These agreements are called communication protocols. At present, the Transmission Control Protocol/Internet Protocol (TCP/IP) suite of protocols defines how Internet computers are to communicate. In the future, the Open Systems Interconnection (OSI) suite of protocols promulgated by the International Standards Organization (ISO) may be supported on the Internet as well. These protocols define how certain applications are to be accomplished: electronic messaging, online connections, and the transfer of files.
Electronic Mail
Electronic mail, or e-mail, is a fast, easy, and inexpensive way to communicate with other Internet users around the world. In addition, it is possible for Internet users to exchange e-mail with users of other independent networks such as CompuServe, Applelink, the WELL, and others. Internet users often find that the expanded capability to communicate with colleagues around the world leads to important new sources of information, collaboration, and professional development.
Besides basic correspondence between two network users, e-mail presents additional opportunities for communication. Through various methods for distributing e-mail messages to lists of "subscribers," e-mail supports electronic discussions on a wide range of topics. These discussions bring together like-minded individuals who use such forums for discussing common problems, sharing solutions, and arguing issues.
Another type of electronic communication that is growing in popularity is the electronic journal, or "e-journal." Although some e-journals require certain types of software and hardware to display each issue, most e-journals are distributed to a list of subscribers as an e-mail text message, either complete as one issue, or retrievable at the article level by mailing a command to a software program that automatically sends the appropriate file. The very definition of a "journal" is undergoing change in the electronic environment, as e-journal publishers experiment with different publication models (e.g., sending articles out individually as soon as they are ready rather than waiting until a group of articles are gathered for an "issue").
Remote Login
Remote login is the ability of a computer user in one location to establish an online connection with another computer elsewhere. Once a connection is established with a remote computer, the user can use that remote system as if their computer were a hard-wired terminal of that system. Within the TCP/IP protocol suite, this facility is called Telnet. Utilizing Telnet, an Internet user can establish connections with a multitude of bibliographic databases (primarily library catalogs), campus information systems of various universities, full-text databases, data files (e.g., statistics, oceanographic data, meteorologic data, geographic data, etc.), and other online services. Many of these systems are available for any Internet user to access and use without an account.
What makes this application truly remarkable is that ease and speed of access are not dependent upon proximity. An Internet user can connect to a system on the other side of the globe as easily as (and generally not much slower than) he or she can connect to a system in the next building. In addition, since many Internet users are not at present charged for their network use by their institutions, or at least are not charged by the level of their use, cost is often not a significant inhibitor of usage. Therefore the barriers of distance, time and cost, which are often significant when using other forms of electronic communication, can be reduced in the Internet environment. A compensating disadvantage is that initial costs for Internet connection can be high, and access can be technically demanding.
File Transfer
Another application of the Internet is the ability to transfer files from one Internet-connected computer to another. This function is provided by the File Transfer Protocol (FTP) of the TCP/IP protocol suite. In a method similar to using Telnet, network users initiate an online connection with another Internet computer via FTP. But unlike Telnet, this online connection can perform only functions related to locating and transferring files. This includes the ability to change directories, list files, retrieve files, etc.
Types of files that can be transferred using FTP include virtually every kind of file that can be stored on a computer: text files, software programs, graphic images, sounds, files formatted for particular software programs (e.g., files with word processing formatting instructions), and others. Many computer administrators have set aside portions of their machines to offer files for anyone on the Internet to retrieve. These archive sites support "anonymous" logins that do not require an account to access, and therefore are called anonymous FTP sites. To locate files, Internet users can use the Archie service, which indexes files from over 900 separate anonymous FTP sites (Tennant, 1993).
Extended Services
The three basic Internet applications of electronic mail, remote login, and file transfer are also building blocks of more sophisticated applications that usually offer increased functionality and ease of network use. Tools such as Gopher, WAIS, and World Wide Web go beyond the three basic Internet functions to make information on the network easier to locate and use. Gopher is a project of the University of Minnesota that uses a series of menus to organize and automate access to information and other online systems wherever they reside on the Internet. The Wide Area Information Servers (WAIS) project of Thinking Machines, Apple Computer, Dow Jones & Co., and KPMG Peat Marwick, seeks to provide a common interface to a multitude of Internet databases. World Wide Web is a hypertext interface to Internet information resources that was developed at CERN in Switzerland (Tennant, 1993). This trend toward more powerful, user- friendly networked information resource access systems is likely to continue as the Internet grows and matures.
Future Possibilities
The backbone infrastructure for the United States portion of the Internet (the NSFNet, or the Interim NREN) is largely supported through federal government funding. For this reason, use of the network has been limited to non-profit research and educational uses, and commercial companies have established networking arrangements that avoid using the NSFNet. Most recently, however, dialogues have begun about commercialization and privatization of the NSFNet infrastructure. The full effects of such a move on current Internet users, especially research and educational institutions, has yet to be seen. One certainty is that the breadth of information and the services offered on the Internet will continue to burgeon, at an ever more rapid rate.
Saturday, May 16, 2009
MI 17 – 01 WEBSITE MANAGEMENT AND DESIGN
Subscribe to:
Post Comments (Atom)
0 Comments:
Post a Comment