Information Technology

Follow me @_shankar_831
It took me a lot of time and effort — so if you found this useful, even a small appreciation means a lot to me!

Study Note

This page contains detailed notes on Web Architecture, PHP programming syntax, Network Layers, and E-commerce models. Part A covers 5-mark concepts, and

Part B 8,9,10 are short for full marks; expand the context.

Part A
(5 Marks)
1 Explain Web Browser Architecture.

The architecture of a web browser consists of several distinct components that work together to retrieve, interpret, and display web content. The main components are:

  • User Interface: This is the part of the browser that the user interacts with directly. It includes the address bar, back/forward buttons, bookmark menu, and other visible tools. The page requested by the user is displayed within this interface.
  • Browser Engine: This component acts as a bridge between the User Interface and the Rendering Engine. It contains the mechanism to marshal actions between the UI and the rendering engine. It is responsible for querying the rendering engine based on the inputs provided in the user interface.
  • Rendering Engine: This is responsible for displaying the requested content on the screen. It interprets the HTML, XML, and JavaScript that make up a specific URL and generates the visual layout displayed in the user interface.
    • The main components here are the HTML/XML parser.
    • Note: Chrome uses multiple instances of the rendering engine (one for each tab) to ensure process separation. Different browsers use different engines (e.g., Internet Explorer uses Trident, Firefox uses Gecko).
  • Networking: This component handles internet communication and security. Its functionality is to retrieve URLs using common internet protocols like HTTP and FTP. It handles network calls and may utilize a cache for retrieved documents to improve response time.
  • JavaScript Interpreter: This parses and executes the JavaScript code embedded in a web page.
  • User Interface Backend: This is used to draw basic widgets like combo boxes and windows.
  • Data Persistence: This is a small database created on the local drive of the computer where the browser is installed. It manages user data such as bookmarks, cookies, and preferences.
2 Explain PHP Functions with Examples.

A function in PHP is a block of statements that can be used repeatedly in a program. It does not execute automatically when a page loads but is executed by a call to the function.

Creating and Calling a Function

A user-defined function declaration starts with the keyword function, followed by the name. Function names are not case-sensitive.

<?php function myMessage() { echo "Hello world!"; } myMessage(); ?>
PHP Function Arguments

Information can be passed to functions through arguments, which act like variables.

function familyName($fname) { echo "$fname Refsnes.<br>"; } familyName("Jani"); // Output: Jani Refsnes.
Default Argument Value & Returning Values

You can define a default parameter. To let a function return a value, use the return statement.

function setHeight($minheight = 50) { echo "The height is : $minheight <br>"; } setHeight(); // Will use 50 function sum($x, $y) { $z = $x + $y; return $z; }
Passing Arguments by Reference

To pass by reference (allowing the function to change the variable), use the & operator.

function add_five(&$value) { $value += 5; } $num = 2; add_five($num); echo $num; // Outputs 7
3 Explain TCP/IP Model Layers.

The TCP/IP (Transmission Control Protocol/Internet Protocol) model is the foundational framework for the internet. It is divided into four distinct layers:

  1. Application Layer:
    • Purpose: This layer is closest to the end-user and provides the interface for applications to communicate over a network. It includes protocols supporting web browsing, file transfer, and email.
    • Key Protocols: HTTP/HTTPS (Web), FTP (File Transfer), SMTP (Email), DNS (Domain Name System).
  2. Transport Layer:
    • Purpose: Manages data flow between two devices, ensuring data is transferred reliably and in the correct order.
    • Key Protocols:
      • TCP: Reliable, connection-oriented data transmission with error checking.
      • UDP: Fast, connectionless data transfer without error checking (streaming/gaming).
  3. Internet Layer:
    • Purpose: Handles logical addressing and routing of data packets across networks, determining the best path to the destination.
    • Key Protocols: IP (Addressing/Routing), ICMP (Diagnostics/Ping), ARP (Address Resolution).
  4. Network Access Layer (Link Layer):
    • Purpose: Encompasses protocols and hardware required for physical transmission over a network (e.g., cables, radio waves).
    • Key Protocols: Ethernet, Wi-Fi (IEEE 802.11), PPP.
Data Flow: When a user sends data, it is broken down. The Application layer initiates the request; the Transport layer segments data; the Internet layer attaches addressing for routing; and the Network Access layer converts packets to frames for physical transmission.
4 Discuss Ethical and Legal Issues in E-Commerce.

E-commerce operations must adhere to specific ethical standards and legal frameworks to maintain consumer trust and avoid litigation.

  • Privacy and Data Protection:
    • Ethical Issue: Companies collect vast amounts of user data (cookies, shopping habits). Selling this data without consent is unethical.
    • Legal Issue: Businesses must comply with laws like GDPR or local data protection acts, ensuring users know how their data is used and stored.
  • Intellectual Property Rights (IPR):
    • Ethical/Legal: Using copyrighted images, copying product descriptions, or selling counterfeit goods violates IPR laws. E-commerce sites must ensure they have the rights to the content they display.
  • Cyber Laws and Fraud:
    • Legal Issue: E-commerce is governed by Cyber Laws (e.g., The IT Act in India). This covers issues like hacking, identity theft, and credit card fraud. Businesses are legally required to provide secure payment gateways.
  • Consumer Protection:
    • Ethical/Legal: Sellers must provide accurate product descriptions. Misleading advertising or hidden costs are legal violations. Laws require clear return policies and mechanisms for grievance redressal.
  • Taxation:
    • Legal Issue: E-commerce transactions are subject to sales tax/GST. Determining jurisdiction for tax collection in cross-border trade is a major legal complexity.
5 Write a note on HRIS (Human Resource Information System).

Definition: An information system specially designed to automate human resource activities in an organization is known as Human Resource MIS (or HRIS). It is concerned with all activities related to the organization's staff and future employees.

Key Components/Elements of HRIS
  1. Training Records: Captures training data of employees as a historic record for analysis.
  2. Transaction Processing System: Capable of storing, recording, updating, and retrieving employee information.
  3. Operational Database: Designed to run day-to-day operations and act as an analytic engine.
  4. Internal Database: Collection of company records gathered from employees.
  5. External Database: Where internal documents or digital files are stored.
  6. Database of Validation Transactions: Refers to the accuracy and completeness of information.
  7. Human Resource DSS: Decision support systems assisting in HR strategy development.
  8. Human Resource ES: Executive systems for senior managers.
  9. Human Resource Outputs: Collected in hard copies or computerized forms.

Functional Areas Supported:

  • Tracking leaves and staff records (permanent vs. temporary).
  • Tracking workers with obsolete jobs who are rehired.
  • Maintaining demographic details for succession planning.
  • Collective bargaining (cost of benefits/adjustments).
  • Employee profiles (training, abilities).
  • Performance assessments and overtime administration.
Part B
(10 Marks)
6 Explain Types of Servers in detail.

Servers are the backbone of network architecture, handling specific tasks to manage network resources and data. There are three primary categories of servers: Web Servers, Database Servers, and Application Servers.

I. Web Server

Definition: Web servers are computers that deliver (or "serve up") Web pages. Every Web server has an IP address and possibly a domain name.

Fundamental Operation: A client (browser) enters a URL. This sends a request to the Web server. The server fetches the page (e.g., index.html) and sends it back to the browser.

Functions of a Web Server:

  • Request Acceptance: Accepts HTTP requests sent from the web browser.
  • Processing: The user request is processed internally by the web server software.
  • Response: Responds to users by providing the services or documents demanded.
  • Application Serving: Serves web-based applications.
  • DNS Translation: Translates domain names into IP addresses.
  • Verification and Execution: Verifies addresses, finds files, runs scripts, and exchanges cookies.
  • Session Handling: Participates in session handling to maintain state.

Examples: Apache Web Server (Open-source), IIS Web Server (Microsoft), Google Web Server (GWS).

II. Database Server

Definition: A Database Server is a computer in a LAN dedicated to database storage and retrieval. It holds the DBMS and the databases themselves.

How it Works: Upon requests from client machines (via SQL), the database server searches the database for selected records and passes the results back over the network.

Key Features:

  • Efficiency: More efficient than simple file servers for large data.
  • Back-End Functionality: Provides central DBMS functions (back-end) to client applications (front-end).
  • Security & Management: Manages recovery, security, and enforces constraints.
  • Concurrency: Handles concurrent access control for multi-user environments.
  • Backup: Allows DBAs to easily create backups of central data.

Examples: Oracle, MySQL, SQL Server, DB2.

III. Application Server

Definition: An application server is a server program in a distributed network that provides the business logic for an application program. It is part of the three-tier architecture.

The Three-Tier Architecture:

  1. First-tier (Front-end): Web browser GUI.
  2. Middle-tier: Business logic (Application Server).
  3. Third-tier (Back-end): Database server.

Examples: Jboss, Glassfish, Weblogic (Oracle), Websphere (IBM).

Comparison:
  • App Server vs. Web Server: App servers expose business logic and handle enterprise applications (high resource usage). Web servers handle HTTP protocol and serve web content (lower resource usage).
  • Web Server vs. Database Server: Web servers use PHP/ASP/JSP for content. Database servers use SQL for raw data management.
7 Discuss PHP Variables, Constants, and Data Types.

I. PHP Variables

Variables are "containers" for storing information. A variable is created the moment you first assign a value to it.

Rules:

  • A variable starts with the $ sign, followed by the name.
  • Must start with a letter or underscore (cannot start with a number).
  • Can only contain alpha-numeric characters and underscores.
  • Names are case-sensitive ($age and $AGE are different).

Data Types: String, Integer, Float, Boolean, Array, Object, NULL, Resource. You can use var_dump() to inspect types.

II. PHP Variables Scope

  • Global Scope: Declared outside a function. Can only be accessed outside. To access inside a function, use the global keyword.
    $x = 5; $y = 10; function myTest() { global $x, $y; $y = $x + $y; }
  • Local Scope: Declared within a function. Only accessible there.
  • Static Scope: Normally, variables are deleted after function execution. Use static to preserve the value.
    function myTest() { static $x = 0; echo $x; $x++; }

III. PHP Constants

Constants are identifiers for simple values that cannot be changed. Unlike variables, they do **not** use the $ sign and are automatically **global**.

1. Using define():

define("GREETING", "Welcome to IT Department!"); echo GREETING;

2. Using const keyword:

const MYCAR = "Volvo";

3. Array Constants:

define("cars", [ "Ford", "BMW", "Toyota"]); echo cars[0];
8 Explain Wired and Wireless Media.

Communication media refers to the means by which data is transmitted in a network.

A. Wired Media

Physical cables connecting devices. More stable and secure.

  1. Twisted Pair Cable:
    • Overview: Pairs of insulated copper wires twisted to reduce interference. Most common for LANs.
    • Types:
      • Unshielded (UTP): Cost-effective, used in Ethernet (Cat5e, Cat6).
      • Shielded (STP): Extra shielding for high-interference areas.
  2. Coaxial Cable:
    • Structure: Single copper conductor, insulation, metallic shield, outer jacket.
    • Advantages: Resistant to interference, supports higher bandwidth over distance (Cable TV).
  3. Fiber Optic Cable:
    • Overview: Uses glass/plastic strands to transmit data as pulses of light. Extremely high speed.
    • Types: Single-Mode (Long distance/Telecom) and Multi-Mode (Short distance).
  4. Serial Cables: RS-232, USB, Thunderbolt.
B. Wireless Media

Uses electromagnetic waves without physical conductors. Offers mobility but can suffer from interference.

  • Wi-Fi: Most used in LANs. Connects devices to internet.
  • Bluetooth: Short-range communication (Headphones, Smartwatches).
  • NFC: Very short distance (Contactless payments).
  • Microwave Transmission: Point-to-point, requires line of sight. Used for long-distance telecom.
  • Satellite: Orbiting satellites rebroadcast signals (GPS, Global TV).
  • Infrared: Short-range (Remotes), cannot penetrate obstacles.
9 Explain B2B and B2C E-Commerce Models.

I. Business-to-Consumer (B2C)

B2C involves the sale of products or services directly from a business to individual consumers (e.g., Amazon, Walmart).

Key Elements:

  • Online Storefronts: Websites/Apps for browsing.
  • Marketing & Service: SEO, Social media, and multiple support channels.
  • Logistics: Inventory management and shipping partnerships.
  • Security: SSL encryption for payments.

B2C Models:

  • Direct-to-Consumer (D2C): Brand sells directly (No middlemen).
  • Online Retailing: Buying bulk and reselling (Amazon).
  • Marketplace: Platforms connecting buyers/sellers (eBay, Etsy).
  • Subscription: Recurring fees (Netflix).
  • Freemium: Free basic service, paid premium features.

II. Business-to-Business (B2B)

B2B models focus on transactions between businesses (Manufacturers, Wholesalers, Retailers).

Primary B2B Models:

  1. Supplier-Oriented (Supplier-Centric): A supplier establishes a platform where buyers purchase (e.g., Alibaba, Grainger). Good for bulk orders.
  2. Buyer-Oriented (Buyer-Centric): Large buyers set up a marketplace inviting suppliers to bid. Common in automotive industries (GM, Ford).
  3. Intermediary-Oriented: Third-party platforms where multiple buyers and sellers interact (Amazon Business).
  4. Direct Sales Model: Manufacturers interact directly with wholesalers without intermediaries (Dell, Cisco).
  5. Distribution-Oriented: Distributors buy in bulk and sell smaller quantities to other businesses (Staples).
10 Explain Transaction Processing System (TPS).

Definition: A Transaction Processing System (TPS) is an information processing system used for business transactions involving the collection, modification, and retrieval of transaction data. It ensures data availability, security, and integrity.

Key Components
  • Inputs: Original requests (bills, invoices, orders).
  • Output: Generated documents (receipts) validating the transaction.
  • Storage: Databases where input/output data is kept securely.
  • Processing System: The logic that converts inputs to outputs.
Types of TPS
  • Batch Processing: Processes transactions as a set (batch) at a later time.
    Example: Payroll systems processing salaries every two weeks.
  • Real-Time Processing: Processes transactions immediately to prevent delays.
    Example: Buying a T-shirt online (Instant credit card approval).

Features: Controlled Access, Fast Response, Reliability, Inflexibility (Standard format), Connection with external environments.

Advantages & Disadvantages:

  • Pros: Saves funds, fast and accurate, automates revenue management.
  • Cons: High setup cost, lack of standard format, potential hardware incompatibility.