0% found this document useful (0 votes)
132 views73 pages

Xii Ca em Study Material 2023 2024

Uploaded by

vignesh m
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
132 views73 pages

Xii Ca em Study Material 2023 2024

Uploaded by

vignesh m
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 73

COMPUTER

APPLICATIONS
XII - STUDY MATERIAL
2023-2024

1
TABLE OF CONTENTS
COMPUTER APPLICATIONS - II YEAR

CHAPTER NO CHAPTER TITLE

1 MULTIMEDIA

2 AN INTRODUCTION TO ADOBE PAGEMAKER

3 INTRODUCTION TO DATABASE MANAGEMENT SYSTEM

4 PHP: HYPERTEXT PREPROCESSOR

5 FUNCTION AND ARRAY IN PHP

6 CONDITIONAL STATEMENTS IN PHP

7 LOOPING IN PHP

8 FORMS AND FILES


/Piv
9 CONNECTING PHP AND MYSQL
Opener
10 INTRODUCTION TO COMPUTER NETWORKS

11 NETWORK EXAMPLES AND PROTOCOLS

12 DOMAIN NAME SYSTEM (DNS)

13 NETWORK CABLING

14 OPEN SOURCE CONCEPTS

15 E-COMMERCE

16 ELECTRONIC PAYMENT SYSTEMS

17 E-COMMERCE SECURITY SYSTEMS

18 ELECTRONIC DATA INTERCHANGE- EDI

3
1. MULTIMEDIA
PART - I
Choose the correct answer
1. What is multimedia?
a) a type of computer hardware
b) a type of computer software
c) a type of computer network
d) the use of multiple forms of media to communicate information
2. has five major components like text, images, sound, video and animation.
a) Multimedia b) Master page c) Master item d) Multi-word
3. What is a raster image?
a) a type of image made up of pixels
b) a type of image made up of geometric shapes
c) a type of image made up of text
d) a type of image made up of sound waves
4. What is vector image?
a) a type of image made of pixels
b) a type of image made up of geometric shapes
c) a type of image made up of text
d) a type of image made up of sound waves
5. Which of the following is raster image file format?
a) JPEG b) EPS c) CDR d) SVG
6. Which of the following is a vector image fde format?
a) PSD b) JPEG c) EPS d) BMP
7. RTF(Rich Text Format) file format was introduced by_
a) TCS b) Microsoft c) Apple Inc. d) IBM
8. The expansion of JPEG is
a) Joint Photographic Experts Group
b) Joint Photo Experts Group
c) Joint Photon Experts Group
d) Joint Photographic Express Group
9. AIFF file format was developed by
a) TCS b) Microsoft c) Apple Inc. d) IBM
1(). Which of the following is an audio file format?
a) MP3 b) AVI c) MPEG d) PNG
PART -II
Shor Answers
1. Define Multimedia and their features.
• The word multimedia consists of two words “multi” and “media”.
• Multimedia is a computer based presentation technique that incorporates text, images, sound, video and
animation.
2. List out Multimedia Components
• Multimedia has five major components like text, images, sound, video and animation.
• Dynamic elements : video, animation, audio
• Static elements : text, graphics.
3. Classify the TEXT component in multimedia.
• Text is classified as static and hyper text.

4
1) Static Text
> Static text will remain static as a heading or in a line, or in a paragraph.
2) Hypertext
> A Hypertext is a system which consists of nodes, the text and the links between the nodes, which
defines the paths for accessing the text in non-sequential ways.
4. Classify the IMAGE component in multimedia
• Images are generated by the computer in two ways, as raster images and as vector images.
1) Raster Images
> Raster image is made up of the tiny dots called pixel.
2) Vector Images
> Vector image is type of image made up of geometric shapes.
5. Define Animation
> Animation is the process of displaying still images so quickly so that they give the impression of
continuous movement.
> In animation the screen object is a vector image.
PART - III
Explain in Brief Answers
1. List out image file formats.
• TIFF (Tagged Image File Format)
• BMP (Bitmap)
• DIB (Device Independent Bitmap)
• GIF (Graphics Interchange Format)
• JPEG (Joint Photographic Experts Group)
• TGA (Tagra)
• PNG (Portable Network Graphics)
2. List out audio file formats.
• WAV (Waveform Audio File Format)
• MP3 (MPEG Layer-3 Format)
• OGG
• AIFF (Audio Interchange File Format)
• WMA (Windows Media Audio)
• RA (Real Audio Format)
3. List out video file formats.
• AVI (Audio/Video Interleave)
• WMV (Windows Media Video)
• FLV (Flash Video)
• MPEG (Moving Picture Experts Group)
PART - IV
Explain in detail
1. Explain in detail about production team roles and responsibilities
1. Production Manager
• The role of production manager is to define, and coordinate, the production of the multimedia
project in time and with full quality.
5
• The production manager should be an expertise in the technology, good at proposal writing, good
communication skills and budget management skills.
2. Content Specialist
• Content specialist is responsible for performing all research activities concerned with the proposed
application’s content.
3. Script Writer

virtual reality integration into the program.


4. Text Editor

structured and correct grammatically.


5. Multimedia Architect

music, video, photos and animation by using an authoring software.


6. Computer Graphic Artist
• Computer Graphic Artist deals with the graphic elements of the programs like backgrounds,
bullets, buttons, pictures editing,3-D objects, animation, and logos etc.
7. Audio and Video Specialist
• Audio and Video Specialist are needed for dealing with narration and digitized videos to be added
in a multimedia presentation.
• They are responsible for recording, editing sound effects and digitizing.
8. Computer Programmer
• The computer programmer writes the lines of code or scripts in the appropriate language.
shape of video windows controlling peripherals and so on.
9. Web Master
• The responsibility of the web master is to create and maintain an Internet web page.
• They convert a multimedia presentation into a web page.
• Final multimedia product is ready for consultation is a joint effort of the entire team.
2. Explain in detail about different file formats in multimedia files
1. Text File Formats:
• RTF(Rich Text Format)
Rich Text Format is the primary file format introduced in 1987 by Microsoft
• Plain text
Plain text files can be opened, read, and edited with most text editors.
2. Image File Formats:
• TIFF (Tagged Image File Format)
> This format is common in desktop publishing world (high quality output)
> Supported by almost all software packages.
> Recent versions of TIFF allow image compression
> This format is comfortable for moving large files between computers.
• DIB (Device Independent Bitmap)
> Allows the files to be displayed on a variety of devices.
6
• GIF (Graphics Interchange Format)
> GIF is a compressed image format.
> This file format is best suitable for graphics that uses only limited colors
> 8-bit Color look up table is used by the GIF format to identify its color values.
• JPEG (Joint Photographic Experts Group)
> JPEG was designed to attain maximum image compression.
> It uses lossy compression technique.
> It works good with photographs, naturalistic artwork
3. Digital Audio File Formats:
• AIFF (Audio Interchange File Format)
> A standard audio file format used by Apple which is like a WAV file for the Mac.
• WAV (Waveform Audio File Format)
> It is the most popular audio file format in windows for storing uncompressed sound files.
• MP3 (MPEG Layer-3 Format)
> MPEG Layer-3 format is the most popular format for storing and downloading music.
• WMA (Windows Media Audio)
> It is a popular windows media audio format owned by Microsoft. WMA is a file extension used with
windows media player.
• RA (Real Audio Format)
> Real Audio format is designed for streaming audio over the Internet.
4. Digital Video File Formats:
• AVI (Audio/Video Interleave)
> AVI is the video file format for Windows.
> Here sound and picture elements are stored in alternate interleaved chunks in the file.
• MPEG (Moving Picture Experts Group)
> MPEG is the standards for digital video and audio compression.
2. AN INTRODUCTION TO ADOBE PAGEMAKER
PART -I
Choose the correct answer
1. DTP stands for
(a) Desktop Publishing (b) Desktop Publication (c) Doctor To Patient (d) Desktop Printer
2. is a DTP software.
(a) Lotus 1-2-3 (b) PageMaker (c) Maya (d) Flash
3. Which menu contains the New option?
(a) File menu (b) Edit menu (c) Layout menu (d) Type menu
4. In PageMaker Window, the area outside of the dark border is referred to as
(a) page (b) pasteboard (c) blackboard (d) dashboard
5. Shortcut to close a document in PageMaker is
(a) Ctrl + A (b) Ctrl + B (c) Ctrl + C (d) Ctrl + W
6. A tool is used for magnifying the particular portion of the area.
(a) Text tool (b) Line tool (c) Zoom tool (d) Hand tool
7. tool is used for drawing boxes.
(a) Line (b) Ellipse (c) Rectangle (d) Text
8. Place option is present in menu.
(a) File (b) Edit (c) Layout (d) Window

7
9. To select an entire document using the keyboard, press
(a) Ctrl + A (b) Ctrl + B (c) Ctrl + C (d) Ctrl + D
10. Character formatting consists of which of the following text properties?
(a) Bold (b) Italic (c) Underline (d) All of these
11. Which tool lets you edit text?
(a) Text tool (b) Type tool (c) Crop tool (d) Hand tool
12. Shortcut to print a document in Pagemaker is
(a) Ctrl + A (b) Ctrl + P (c) Ctrl + C (d) Ctrl + V
PART - II
Short Answers
1. What is desktop publishing?
•Desktop publishing (abbreviated DTP) is the creation of page layouts for documents using DTP
Software.
2. Give some examples of DTP software.
• Popular DTP software are Adobe PageMaker, Adobe InDesign, QuarkXPress, etc.
3. Write the steps to open PageMaker.
• We can open Adobe PageMaker using the command sequence,
• StartsAll Programs —> Adobe —> Pagemaker 7.0 —> Adobe PageMaker 7.0.
4. How do you create a New document in PageMaker?
I. Choose File New in the menu bar. (or) Press Ctrl + N in the keyboard.
II. Now Document Setup dialog box appears.
III. Enter the appropriate settings for your new document in the Document Setup dialog box.
IV. Click on OK. Now a new document called Untitled - 1 opens on the screen.
5. What is a Pasteboard in PageMaker?
• A document page is displayed within a dark border.
• The area outside of the dark border is referred to as the pasteboard.
• Data placed in the pasteboard is not visible when you print the document.
• Pasteboard is used to temporarily hold elements while designing your document.
6. Write about the Menu bar of PageMaker.
• Menu Bar contains the following menus,
> File, Edit, Layout, Type, Element, Utilities, View, Window, Help.
• When you click on a menu item, a pull down menu appears.
• There may be sub-menus under certain options in the pull-down menus.
7. Differentiate Ellipse tool from Ellipse frame tool.

Ellipse Tool Used to draw circles and ellipses.

Ellipse Frame Tool Used to create elliptical placeholders for text and graphics.
8. What is text editing?
• Editing means making changes to the text.
• Editing is the process of inserting and deleting words, correcting errors, moving and copying text in the
document.
9. What is threading text blocks?
• A Text block can be connected to other text block to enable the flow of text.
8
• Text blocks that are connected in this way are threaded.
• The process of connecting text among Text blocks is called threading text.
10. How do you insert a page in PageMaker?
1. Go to the page where you want to insert.
2. Choose Layout^ Insert Pages in the menu bar. The Insert Pages dialog box appears.
3. Type the number of pages you want to insert.
4. To insert pages after the current page, choose ‘after’ from the pop-up menu.
5. Click on Insert.
6. The new pages are inserted in your publication
PART - III
Explain in Brief Answers
1. What is PageMaker? Explain its uses.
• Adobe PageMaker is a page layout software.
• It is used to design and produce documents that can be printed.
• Page layout software includes tools that allow you to easily position text and graphics on document pages.
• Example: Creating a newsletter that includes articles and pictures on each page using PageMaker.
2. Mention three tools in PageMaker and write their keyboard shortcuts.

Sl.No Tools Keyboard Shortcut


1 Pointer Tool F9
2 Rotating Tool Shift + F2
3 Line Tool Shift + F3

3. Write the use of any three tools in PageMaker along with symbols.

4. How do you rejoin split blocks?

top.

down if necessary.
5. How do you link frames containing text?
1. Draw a second frame with the Frame tool of your choice.
2. Click the first frame to select it.
3. Click on the red triangle to load the text icon.
4. Click the second frame.
5. PageMaker flows the text into the second frame.

9
6. What is the use of Master Page?
• Any text or object that you place on the master page will appear on the entire document pages to which the
master is applied.
• Master Pages commonly contain repeating logos, page numbers, headers, and footers.
• Master items cannot be selected on a document page.
7. How do you insert page numbers in Master pages?
1. Click on Master Pages icon.
2. Then click on Text Tool. Now the cursor changes to I - beam.
3. Then Click on the left Master page where you want to put the page number.
4. Press Ctrl + Alt + P.
5. The page number displays as ‘LM’ on the left master page.
6. Similarly click on the right Master page where you want to put the page number.
7. Press Ctrl + Alt + P.
8. The page number displays as ‘RM’ on the right master page, but will appear correctly
on the actual pages.
PART - IV
Explain in detail
1. Explain the tools in PageMaker toolbox.
Toolbo
Tool Cursor Use
X

Pointer Tool
* Used to select, move, and resize text objects and graphics.

Text tool T Used to type, select, and edit text.

Rotating tool Used to select and rotate objects.

Cropping tool Used to trim imported graphics.

Line tool
+ Used to draw straight lines in any direction.

Constrained line tool 1“ 1 Used to draw vertical or horizontal lines.

Rectangle tool Used to draw squares and rectangles.

Rectangle frame tool fxl Used to create rectangular placeholders for text and graphics.

Ellipse tool <2? Used to draw circles and ellipses.

ol®
Ellipse frame tool Used to create elliptical placeholders for text and graphics.

Polygon tool Used to draw polygons.

Polygon frame tool 0 1 Used to create polygonal placeholders for text and graphics.

Hand tool |n| Used to scroll the page (an alternative to the scroll bar)

10
Zoom tool Used to magnify or reduce an area of the page.
2. Write the steps to place the text in a frame.
1. Click on one of a Frame tool from the Toolbox.
2. Draw a frame with one of PageMaker’s Frame tools (Rectangle frame tool or Ellipse Frame Tool or
Polygon frame Tool). Make sure the object remains selected.
3. Click on File. The File menu will appear.
4. Click on Place. The Place dialog box will appear.
5. Locate the document that contains the text you want to place, select it.
6. Click on Open.
7. Click in a frame to place the text in it. The text will be placed in the frame.
4. Write the steps to draw a star using polygon tool?
1. Click on the Polygon tool from the toolbox. The cursor changes to a crosshair.
2. Click and drag anywhere on the screen. As you drag, a Polygon appears.
3. Release the mouse button when the Polygon is of the desired size.
4. Choose Element > Polygon Settings in the menu bar. Now Polygon Settings dialogue box
appears.
5. Type 5 in the Number of sides text box.
6. Type 50% in Star inset textbox.
7. Click OK. Now the required star appears on the screen.
3. INTRODUCTION TO DATABASE MANAGEMENT SYSTEM
PART -I
Choose the correct answer
1. Which language is used to request information from a Database?
a) Relational b) Structural c) Query d) Compiler
2. The diagram gives a logical structure of the database graphically?
a) Entity-Relationship b) Entity c) Architectural Representation d) Database
3. An entity set that does not have enough attributes to form primary key is known as
a) Strong entity set b) Weak entity set c) Identity set d) Owner set
4. Command is used to delete a database.
a) Delete database database_name b) Delete database_name
c) drop database database_name d) drop database_name
5. MySQL belongs to which category of DBMS?
a) Object Oriented b) Hierarchical c) Relational d) Network
6. MySQL is freely available and is open source.
a) True b) False
7. represents a “tuple” in a relational database?
a) Table b) Row c) Column d) Object
8. Communication is established with MySQL using
a) SOL b) Network calls c) Java d) API’s
9. Which is the MySQL instance responsible for data processing?
a) MySQL Client b) MySQL Server c) SQL djServer Daemon Program
10. The structure representing the organizational view of entire database is known as in MySQL
database.
a) Schema b) View c) Instance d) Table

11 http://www.youtube.eom/c/csknowledgeopene
PART -II

Short Answers
1. Define Data Model and list the types of data model used.
• A data model that determines the logical structure of a database and fundamentally determines in which
manner data can be stored, organized and manipulated.
Types of Data Model
• Hierarchical Database Model
• Network model
• Relational model
• Object-oriented database model
2. List few disadvantages of file processing system.
• Data Duplication - Same data is used by multiple resources for processing, thus created multiple
copies of same data wasting the spaces.
• High Maintenance Access control and verifying data consistency needs high maintenance cost.
-

• Security Less security provided to the data.


-

3. Define Single and multi-valued attributes.


• Single Valued Attributes
> A single valued attribute contains only one value for the attribute and they don’t have multiple
numbers of values.
> Example: Age
Multi Valued Attributes
> A multi valued attribute has more than one valueie for that particular attribute.
> Example: Degree
4. List any two DDL and DML commands with its Syntax.
Data Definition Language (DDL)
Commands Description Syntax

CREATE Used to create database or tables CREATE database databasename;

DROP Deletes a database or table. DROP database databasename;


Data Manipulation Language (DML)

Commands Description Syntax


Adds new rows into
INSERT INSERT INTO tablename VALUES (value1, value2);
database table.
Deletes the records from the
DELETE DELETE from tablename WHERE columnname = “value”;
table.
5. What are the ACID properties?
• ACID Properties - The acronym stands for Atomicity, Consistency, Isolation and Durability.
6. Which command is used to make permanent changes done by a transaction?
> The TCL(Transaction Control Language) command “COMMIT” helps the database to save data
permanently.

12
7. What is view in SQL?
> Views A set of stored queries.
-

> A view in SQL is a logical subset of data from one or more tables.
> View is used to restrict data access.
8. Write the difference between SQL and MySQL.
SQL MySQL
SQL - Structured Query Language is not a database. MySQL is a database management system
Used to access the database Allows managing relational databases
9. What is Relationship and List its types.
• In Entity Relationship Model, relationship exists between two entities.
• Three types of relationships are,
1. One-to-One relationship
2. One-to-Many relationship
3. Many-to-Many relationship
10. State few advantages of Relational databases.
> The features of RDBMS are
• High Availability
• High Performance
• Robust Transactions and support
• Ease of management
• Less cost
PART - III
Explain in Brief Answers
1. Explain on Evolution of DBMS.
• The concept of storing the data started before 40 years in various formats.
• Punched card technology was used to store the data.
• The file systems were known as predecessor of database system.
• Various access methods in file system were indexed, random and sequential access.
• The file system had more limitations to overcome this DBMS was introduced.
2. What is relationship in databases? List its types.
• Relationship in database is between two tables when the foreign key of one table references primary key
of other table
• Three types of relationships are,
One-to-One relationship
One-to-Many relationship
Many-to-Many relationship
3. Discuss on Cardinality in DBMS.
• Cardinality is defined as the number of different values in any given table column
• Cardinality is defined as the number of items that must be included in a relationship.
• Cardinality is a number of entities in one set mapped with the number of entities of another set via the
relationship.
• Three classifications in Cardinality are one-to-one, one-to-many and Many-to-Many.
13
Vehicle

4. List any 5 privileges available in MySQL for the User.


Select_priv User can select rows from database tables.
Insert_priv User can insert rows into database tables.
Update_priv User can update rows of database tables.
Delete_priv User can delete rows of database tables.
Createpriv User can create new tables in database.
5. Write few commands used by DBA to control the entire database.
• The Database Administrator (DBA) uses few commands are known as Administrative MySQL Commands
to control the entire database.
1. USE Database This command is used to select the database in MySQL
-

mysql > use test;


Database changed
2. SHOW Databases - Lists all the databases available in the database server.
mysql > show databases;
3. SHOW Tables Lists all the tables available in the current database we are working in.
-

mysql > show tables;


PART - IV
Explain in detail
1. Discuss on various database models available in DBMS.
• The database technology came into existence in terms of models with relational and object-relational
behavior.
Types of Data Model:
• Hierarchical Database Model
• Network model
• Relational model
• Object-oriented database model
i) Hierarchical Database Model
• Hierarchical database model was IMS, IBM’s first DBMS.
• In this model each record has information in parent/ child relationship like a tree structure.
• The collection of records was called as Record Types I Tables.
• The individual records are equal to rows.
• Advantages: Less redundant data, Efficient Search, Data Integrity and Security.
• Limitations: Complex to implement and difficulty in handling many to many relationships.

14
ii) Network model
• Network model is similar to Hierarchical model except that in this model each member can have more
than one owner.
• The many to many relationships are handled in a better way.
• This model identified the three database components such as,
• Network schema: Schema defines all about the structure of the database.
• Sub schema: Controls on views of the database for the user
• Language for data management: Basic procedural for accessing the database.

iii) Relational Model


• Oracle and DB2 are few commercial relational models in use.
• Relational model is defined with two terminologies Instance and Schema.
• Instance A table consisting of rows and columns
-

• Schema Specifies the structure including name and type of each column.
-

• A relation (table) consists of unique attributes (columns) and tuples (rows).

iv) Object-Oriented Database Model


• This model is the combination of OOP’s concepts and database technologies and also serves as the
base of Relational model.
• Object oriented model uses small, reusable software known as Objects.
• These are stored in object oriented database.
• This model efficiently manages large number of different data types.
• Complex behaviors are handled efficiently using OOP’s concepts.

2. List the basic concepts of ER Model with suitable example.


• ER model consists of a collection of entities where each of these entities will be interconnected with
each other with conditions and dependencies.

15
ER Modeling Basic Concepts
The basic concepts of ER model consists of
1. Entity or Entity type
2. Attributes
3. Relationship
Entity or Entity type
An Entity can be anything a real-world object or animation which is easily identifiable by anyone even by a
common man.
An entity is represented by a rectangular box.
Example: In a company’s database Employee, HR, Manager are considered as entities
Employee Manager

Types of Entity:
> Strong Entity:
• A Strong entity is the one which doesn’t depend on any other entity on the database with a primary key
• It is represented by one rectangle.
> Weak Entity:
• A weak entity is dependent on other entities and it doesn’t have any primary key.
• It is represented by double rectangle.

Marks

> Entity Instance:


• Instances are the values for the entity
• Entity Instance denotes the category values for the given entity.
• If we consider animals as the entity their instances will be dog, cat, cow. .. Etc
Entity Instances
Entity Instances
Human Male , Female
Animals Dog, cats, lion
Attributes Jobs Engineer, Doctor, Lawyer
• An attribute is the information about that entity and it will describe, quantify, qualify, classify, and
specify an entity.
Types of attributes:
1. Key Attribute - Unique characteristic of an entity.
2. Simple Attributes - Cannot be separated
3. Composite Attributes - Can be subdivided into simple attributes
4. Single Valued Attribute - Contains only one value
5. Multi Valued Attribute - Has more than one value
Relationship:
• In Entity Relationship Model, relationship exists between two entities.
16
• Three types of relationships are,
One-to-One relationship
One-to-Many relationship
Many-to-Many relationship
3. Discuss in detail on various types of attributes in DBMS.
Attributes
> An attribute is the information about that entity and it will describe, quantify, qualify, classify, and specify
an entity.
> An attribute will always have a single value, that value can be a number or character or string.
Types of attributes:
1. Key Attribute
2. Simple Attributes
3. Composite Attributes
4. Single Valued Attribute
5. Multi Valued Attribute
> Key Attribute
A key attribute describes a unique characteristic of an entity.
> Simple Attribute
The simple attributes cannot be separated it will be having a single value for their entity.

Example: Name is the attribute for the entity employee and here the value for that attribute is a single
value.
> Composite Attributes
The composite attributes can be subdivided into simple attributes without change in the meaning of
that attribute.
Example: In the above diagram the employee is the entity with the composite attribute Name which
are sub-divided into two simple attributes first and last name.

> Single Valued Attributes:


A single valued attribute contains only one value for the attribute and they don’t have multiple
numbers of values.
Single Valued Attributes
Attribute Values
Age 3
Roll no 85
Example: Age- It is a single value for a person as we cannot give n number of ages for a single person
> Multi Valued Attributes :
A multi valued attribute has more than one value for that particular attribute.
Example: Degree - A person can hold n number of degrees so it is a multi-valued attribute.

17
Attributes and Values
Attribute Values
Degree B.Tech, MBA
Bank Account SBI, HDFC
4. Write a note on open source software tools available in MySQL Administration.
MYSQL Administration open source software tools
• Many open source tools are available in the market to design the database in a better and efficient
manner.
• PhpMyAdmin is most popular for Web Administration.
• The popular Desktop Application tools are MySQL Workbench and HeidiSQL.
PHPMYADMIN (Web Admin)
• This administrative tool of MySQL is a web application written in PHP.
• They are used predominantly in web hosting.
• The main feature is providing web interface, importing data from CSV and exporting data to various
formats.
• It generates live charts for monitoring MySQL server activities like connections, processes and
memory usage.
• It also helps in making the complex queries easier.
MySQL Workbench (Desktop Application)
• It is a database tool used by developers and DBA’s mainly for visualization.
• This tool helps in data modeling, development of SQL, server configuration and backup for MySQL in
a better way.
• Its basic release version is 5.0 and is now in 8.0 supporting all Operating Systems.
• The SQL editor of this tool is very flexible and comfortable in dealing multiple results set.
HeidiSQL (Desktop Application)
• This tools helps in the administration of better database systems.
• It supports GUI (Graphical User Interface) features for monitoring server host, server connection,
Databases, Tables, Views, Triggers and Events.
5. Explain the DDL command of their functions in SQL.
Data Definition Language (DDL)
• The DDL commands are used to define database schema (Structure).
• To create and modify the structure of the database object in the database.
• CREATE, ALTER, DROP, RENAME and TRUNCATE commands belongs to this category.
SQL DDL COMMANDS List
Commands Description Example
CREATE Used to create database or tables CREATE database studentDB;
ALTER Modifies the existing structure of database ALTER TABLE student
or table ADD Email varchar(255);
DROP Deletes a database or table. DROP database studentDB;
RENAME used to rename an existing object in the RENAME TABLE student to stud;
database
TRUNCATE Used to delete all table records TRUNCATE TABLE student;

18
4. PHP: HYPERTEXT PREPROCESSOR
PART - 1
Choose the correct answer
1 . What does PHP stand for?
a) Personal Home Page b) Hypertext Preprocessor
c) Pretext Hypertext Processor d) Pre-processor Home Page
2. What does PHP files have a default file extension?
a) .html b) .xml c) .php d) .ph
3. A PHP script should start with
a) <?php b) <php c) <php? D) <:?
4. How many data types does PHP support?
a) 18 b) 28 c) 8 d) 38
5. Every variable name in PHP must begin with a symbol
a) # b) / c)$ d) <
6. in PHP are case sensitive.
a) variable names b) keywords c) variable name and keywords d) None of the above
7. The assignment operator is
a) = b) = = c) = = = d) ! =
8. operators perform an action to compare two values.
a) arithmetic b) comparison c) increment d) logical
9. Which operator is called “identical”?
a) == b) = = c) = = = d) < >
10. is a data type which contains decimal numbers.
a) Integer b) Float c) Boolean d) NULL
PART - II
Short Answers
1. What is PHP?
• PHP is a powerful language that is used to create dynamic and interactive web pages.
• PHP stands for Hypertext Preprocessor.
• PHP is a server -side scripting language.
2. What is a dynamic web page?
• A dynamic web page, is a page whose content can change each time it is viewed.
• It is well -suited for creating database - drive websites.
3. What are the different types of comments in PHP. Give an example.
• There are two types of comments in PHP:
• Single-line comment:
1. forward slashes (/ /) or single hash sign (#)
• Multi-line comment:
2. forward slash followed by an asterisk (/*) and end with an asterisk followed by a forward slash
(*/)
4. List out any four operators in PHP.
1. Arithmetic operators,
2. Assignment operators
3. Comparison operators
4. Logical operators

19
5. What is ‘Echo’ statement used for? Give an example.
• The echo statement is used to output a string of text or a variable.
• It is a simple and efficient way to display infonnation to the user.
Examples:
Echo ‘Hello world’;
PART - III
Explain in Brief Answers
1. What are the features of PHP?
• PHP has many features that make it a popular choice for web development.
Server-side scripting language:
• PHP is a server -side scripting language, which means that the scripts are executed on the server and
the output is sent to the client.
Open-source software:
• PHP is an open-source software, which means that the source code is available for anyone to view and
modify.
Platform independent:
• PHP can be run on many different operating systems, including windows, Linux, and macOS
Database support:
• This makes it easy to create database -driven websites.
2. Explain the types of PHP Tags.
• PHP supports three different sets of tags:
1 . PHP Default tags
2. Short open tags
3. HTML script embed tags
• PHP Default tags:
PHP code is enclosed in <?php and ?> tags
• Short open tags:
It is an alternative to the default syntax and they allow you to use <? and ?> instead of <?php and ?>
• HTML script embed tags:
You can also embed PHP code within HTML script tags <script language= “php”>//php </script>
Opening tags Closing tags
<?php ?>
<? ?>
<script language= “php”> </script>
3. Write about the rules for naming a variable in PHP?
• A variable’s name must start with a dollar sign ($)
Example, $name
• The variable’s name can contain a combination of strings, numbers, and the underscore
Example, $my_reportl
• The first character after the dollar sign must be either a letter or an underscore (it cannot be a number)
• Variable names in PHP are case-sensitiv, It means that $name and $Name are entirely different
variables.

20
4. List out the different types of data types in PHP.
• PHP supports the following eight data types.
1. Integer
2. Float
3. String
4. Boolean
5. Array
6. Object
7. Resource
8. NULL
5. Write about the syntax of PHP.
• Two basic rules of PHP
1. PHP code is enclosed in <?php and ?> tags. These tags are called opening and closing tags.
Examples:
<?php
//php code
?>
2. A PHP statement must end with a semicolon
Examples:
<?php
Echo “Hello World!”;
?>
PART - IV
Explain in detail
1. What are the datatypes in PHP? Explain.
• Value assigned to variable in PHP will be of a set data type.
• PHP data types:
1. Integer
2. Float
3. String
4. Boolean
5. Array
6. Object
7. Resource
8. NULL
1. Integer:
• Integer is a data type which contains whole numbers.
• It can be positive, negative, or zero.
Example:
Sage = 30;
2. Float:
• Float is a data type which contains decimal numbers.
Example:
Sprice = 19.99;
3. String:
• String is a data type which contains a sequence of characters enclosed in single quotes (‘’) or double
quotes (“ ”)
Example:
$name = “Barath”;

4. Boolean:
• Boolean is a data type which contains the value True or False.
Example:
Sisadmin = true;
5. Array:
• Array is a data type which has multiple values in single variable.
Example:
Sprices = array(10, 20, 30);
6. Object:
• An object is a data type that represents an instance of a class.
Example:
$user = new User();
7. Resources
• A Resource is a special type of data that represents a connection to an external resource resource, such as
a file or a database.
Example:
$fp = fopen (“file.txt”, “r”);
$conn = mysqli_connect(“localhost”, “username”, “password”, “database”);
8.NULL:
• Null is a special data type which contains “NULL value” whicn means “no value”.
• The keyword NULL is not case sensitive
Example:
$x = null;
2. Explain operators in PHP with example.
• Operator is a symbol that perform a given action on a value or group of values.
• The types of operators in PHP are:
1. Arithmetic operators,
2. Assignment operators
3. Comparison operators
4. Logical operators
5. Increment/Decrement operators,
6. String operators.
1. Arithmetic operators:
• The arithmetic operators are used to perform math operations, for example addition, subtraction,
multiplication and division.

Operator Operator Name Example Output


+ Addition 5+2 7
22
- Subtraction 5-2 3
* Multiplication 5*2 10
/ Division 5/2 2.5
% Modulus 5%2 1
2. Assignment Operators:
• Assignment operator = is used to assign a value to a variable.
• The assignment operator takes the value of its right-hand operand and assigns it to its left-hand operand
Operator Operator Name Example Output
= Assignment Operator $a=5; 5

Combined Assignment Operator:


Example
Operator Operator Name $a = 5; Equivalent to Output
$b = 2;
+= Addition Assignment $a+ = $b; $a=$a+$b; 7
-= Subtraction Assignment $a- =$b; $a=$a-$b; 3

*= Multiplication Assignment $a* =$b; $a=$a*$b; 10


/= Division Assignment $a/ =$b; $a=$a/$b; 2.5
%= Modulus Assignment $a% =$b; $a=$a%$b; 1
3. Comparison Operators:
• Comparison operators are used to compare two values and determine whether a certain condition is true or
false.

Operator Operator Name Example Output

> Greater than 5 >2 True

< Less than 5 <2 False

>= Greater than or equal to 5 > =2 True

<= Less than or equal to 5< =2 False


5= =5 True
== Equal to
5 = = 5.0 True
5= = = 5 True
=== Identical
5= = = 5.0 False
5!= 5 False
I= Not equal to
5!=6 True
5 != = 5 False
! == Not identical
5 != = 5.0 True

23
4. Logical Operators:
• Logical Operators are used to perform logical operation on variables and values
Operator Operator Name Example Output

&& Logical AND (5>3) && (55>7) False

II Logical OR (5>3) | | (55>7) True


xor XOR (5>3) xor (55>7) True
I Logical NOT ! <5>3) False
5. Increment and Decrement Operators:
• Increment operator ++ is used to increase the value of a variable by 1
• Decrement operator - - is used to decrease the value of a variable by 1
• The increment and decrement operators can be used as either prefix or postfix operators.
Operator Operator Name Example
++ $a (Pre-increment) $x= ++$a
(increment operator) $a ++ (Post-increment) $x= $a++
- -$a (Pre-decrement)
$x= - -$a
(decrement operator)
$a - - (Post -decrement) $x =$a - -
6. String Operators:
• String operators have concatenation operator (.) and concatenation assignment operator (.=)
• Concatenation means adding one or more variables to an existing variable.
Operator Operator Name Example Output
$a = ‘Hello’ ;
. (Dot) Concatenation $b = ‘World’; Hello World
$c = $a.$b;
$a = ‘Hello’ ;
. = (Dot equal
Concatenation assignment $b = ‘World’; HelloWorld
to)
$a. = $b;

5. FUNCTION AND ARRAY IN PHP


PART - 1
Choose the correct answer
1. A is a block of code that performs a specific task.
a) parameter b) function c) class d) label
2. Pre-defined function are also called
a) user-defined functions b) recursive functions
c) built-in functions d) lambda functions
3. Which one of the following is the right way of defining a functions in PHP
a) function functionnameQ { //code to be executed } b) functions (){}
c) def myFunction (): d) None of the above

24
4. A user - defined function in PHP starts with the keyword
a) function b) def c) defined d) funct

5. Which of the following is a correct way to call a function in PHP?


a) functionNameQ; b) call functionName;
c) execute functionName; d) run fiinctionName();
6. What is an array in PHP?
a) An array is a special data type b) It can hold many values under a single variable name.
c) An array element can be any type of data, d) All of the above
7. How many types of arrays are there in PHP?
a) 2 b) 3 c) 4 d) 5
8. What is the index of the first element in an indexed array in PHP?
a) 0 b) 1 c) 2 d) 3
9. What is the index of the third element in an indexed array in PHP with 5 elements?
a) 2 b) 3 c) 4 d) 5
10. How do you create an indexed array in PHP?
a) By enclosing a comma-separated list of values in square brackets
b) By using the array () function
c) By enclosing a comma-separated list of values in curly braces
d) Both A and B
11 . How do you access the elements of an indexed array in PHP?
a) By using the array index in square brackets
b) By using the array key in square brackets
c) By using the array index in curly braces
d) By using the array key in curly braces
PART - II
Short Answers
1. What is a function?
• A function is a collection of code that performs a specific task.
2. What are the different types of functions in PHP?
• Types of functions in PHP ;
1. Built-in functions
2. User-defined functions
3. Write short notes on built-in functions in PHP?
• These are functions that are pre-defined in the PHP language and can be used to perform a variety of tasks.
• Example: Calculating the length of a string or sorting an array.
4. What is an array in PHP and what are its main types?
• An array is a special data type.
• It holds many values under a single variable name.
• An array element can be any type of data.
• Types of arrays in PHP:
1. Indexed array
2. Associative array
3. Multi-dimensional array
5. How do you create an indexed array in PHP?
• We can create an indexed array in PHP,
• by enclosing a comma-separated list of values in square brackets (or)
25
• by using the array () function.
PART - III
Explain in Brief Answers
1. What are the advantages of using functions in PHP?
• Advantages of using functions in PHP:
1. Code reuse:
> Functions allow us to reuse code, which can save us time and effort when writing and maintaining our
code.
2. Testing and debugging:
> Functions allow us to test and debug our code more easily as, we can test individual functions separately
from the rest of the code.
3. Modularity:
> Functions allow us to break down our code into smaller, modular pieces, which can make it easier to
maintain and modify.
2. What is the syntax for defining a function in PHP?
• Syntax for Functions Definition:
function functionName ([parameter list])

// code to be executed
}
3. How do you call a function in PHP?
• Calling a function is another name for executing the function.
• A function is called simply by using the function name, along with an argument list, as a statement.
> Syntax:
functionName();
(or) |
functionName(argument list);
4. Write short notes on an Associative array.
• An associative array is a data structure that stores a collection of key-value pairs.
• The keys are used to identify the values, and the values can be of any data type.
• The key in an associative array are often called “labels” because they label or identify the corresponding
values.
PART - IV
Explain in detail
1. Explain detail about User define Functions with a suitable example.
User Defined Function;
• These are functions that we can create ourself to perform specific tasks in our PHP code.
• We can define a user defined function by using the ‘function’ keyword , followed by the name of the
function and a set of parentheses.
• Syntax for Functions Definition:
function functionName ([parameter list])

// code to be executed

26
}
• The ‘function’ keyword is used to define a function.
• functionName is the name of the function. It can be any valid PHP identifier, not a reserved word
• parameter list is a comma-separated list of variables. These parameters are optional.
• Inside the curly braces, we can put any code we want the function to execute.
• This can include PHP statements, loops, conditions, and so on.
• Syntax of Function Call:
function name();
• Example:
<?php
function Datainput()

echo “Student Details Inserted Successfully!”;

Datainput();
?>
2. Explain Indexed array and Associative array in PHP.
a) Indexed Arrays
• An indexed array is an array that uses a numeric index to access its elements.
• The indexed is a number that starts at 0 for the first element and increases by 1 for each subsequent
element.
• We can create an indexed array in PHP,
• by enclosing a comma-separated list of values in square brackets (or)
• by using the array () function.
SYNTAX:
SarrayVariable = [elementl, element?, element?,..elementN];
(or)
$arrayVariable = array(elementl, element?, element?,..elementN);
Accessing the elements of an indexed array:
• To access the elements of an indexed array in PHP, you can use the array index in square brackets.
• The index starts at 0 and increments by 1 for each element in the array.
Example:
$fruits = array (“apple”, “banana”, “orange”, “mango”)
echo $fruits [0]; // output will be “apple”
echo $fiuits [1]; // output will be “banana”
echo $fruits [?]; // output will be “orange”
echo $fruits [?]; // output will be “mango”
b) Associative Arrays
• An associative array is a data structure that stores a collection of key-value pairs.
• The key are used to identify the values, and the values can be of any data type.
• The key in an associative array are often called “labels” because they label or identify the corresponding
values.
• We can create an associative array in PHP,
• by enclosing a comma-separated list of key-value pairs in square brackets (or)
27
• by using the array () function.
SYNTAX:
$arrayVariable = [“keyl” => “value1”, “key2” => “value2”, ...“keyN” => ... “valueN”];
(or)
$arrayVariable = array(“keyl” => “valuel”, “key2” => “value2”, ...“keyN” => ...“valueN”];
Accessing the elements of an associative array:
• We can access the values in an associative array using the keys:
echo $arrayVariable [“keyl”]; // output will be “valuel”
echo $arrayVariable [“key2”]; II output will be “value2”
Example:
<?php
Sages = array(“Arun” => 25, “Balu” => 30, “Naveen” => 28);
echo Sages [“Arun”]; II output will be 25
echo Sages [“Balu”]; // output will be 30
echo Sages [“Naveen”]; // output will be 28
?>

6. CONDITIONAL STATEMENTS IN PHP


PART - 1
Choose the correct answer
1. Which of the following is NOT a type of conditional statement in PHP?
a) if b) if. .. else c) if. . . elseif . . . else d) while
2. What types of statements is the if. . .else statement?
a) Conditional statement b) Looping c) Input statement d) Output statement
3. What is the simplest conditional statement in PHP?
a) if-else statement b) if statement c) switch statement d) if-elseif-else statement
4. How does the if statement work in PHP?
a) A block of code is executed if a certain condition is true
b) A block of code is executed if a certain condition is false
c) A block of code is executed if multiple condition are true
d) A block of code is executed if multiple condition are false
5. What happens if the condition in an “if’ statement is false?
a) The code inside the curly braces is executed
b) The code inside the curly braces is skipped
c) The program terminates
d) None of the above
6. What is the syntax for an if-else statement in PHP?
a) if(condition) { II True-block; }
b) iff condition) { II True-block; } else { //False-block; }
c) if-else(condition) { //True-block; } else { //False-block;}
d) if-elseif(condition) { // True-block; } else { // False-block;}
7. Which of the following is used to specify multiple conditions in an if. . .elseif. . .else statement?
a) AND b) OR c) case d) elseif
8. Which of the following is used to specify multiple conditions in a switch statement?
a) AND b) OR c) case d) if
9. What happens if none of the case values match the expression in a switch statement?
a) The default case block is executed
b) The program terminates
28
c) The nearest case block is executed
d) The first case block is executed
10. Which of the following is used to terminate the switch statement?
a) return b) continue c) goto d) break

PART - II
Short Answers
1. What are the different types of conditional statements in PHP?
• There are several types of conditional statements in PHP
1. if statement
2. if. ..else statement
3. if...elseif...else statement
4. switch statement
2. Write the syntax for an if statement in PHP.
SYNTAX:
if(condition)

// code to be executed if condition is true;


}
3. What is the purpose of the if... else statement?
• The if. . .else statement is a conditional statement in PHP.
• If condition is True then the True-block is executed and if the condition is false then the false-block is
executed.
4. Write the syntax for an if...else statement in PHP.
SYNTAX:
if(condition)
{
// True-block;
}
else
{
False-block;
}
5. What is the role of the break statement in switch statement?
• The role of the break statement in a switch statement is to terminate the case and exit the switch
statement.
PART - III
Explain in Brief Answers
1. Write the syntax for an if...elseif... else statement in PHP.
SYNTAX:
if(condition 1)
{
// code to be executed if condition 1 is true;
}

29
esleif (condition 2)
{
// code to be executed if condition 1 is false and condition 2 is true;
}
elseif (condition 3)
{
// code to be executed if condition 1 and condition 2 are false and condition 3 is true;
}
else
{
// code to be executed if all condition are false;
}
2. Write the syntax for a switch statement in PHP?
SYNTAX:
switch (expression)
{
case value 1:
// code to be executed if expression = value 1;
break;
case value 2:
// code to be executed if expression = value 2;
break;
...

default:
// code to be executed if expression is not equal to any of the values;
}
3. In an if...elseif... else statement, where is the code executed if all conditions are false?
• The if. . .elseif. . .else is a conditional statement that allows you to check multiple conditions and run
different code based on which condition is true
• It begins with the keyword ‘if and followed by one or more ‘elseif’.
• Finally ends with an ‘else’ part if all conditions are false.
PART - IV
Explain in detail
1. Explain the if... elseif... else statement with suitable example.
• if... elseif... else statement in PHP:
• The if. ..elseif. .. else is a conditional statement that allows you to check multiple conditions and run
different code based on which condition is true
• It begins with the keyword ‘if’ and followed by one or more ‘elseif.
• Finally ends with an ‘else’ part if all conditions are false.
SYNTAX:
if(condition 1)
{
If code to be executed if condition 1 is true;

30
esleif (condition 2)
{
// code to be executed if condition 1 is false and condition 2 is true;
}
elseif (condition 3)
{
// code to be executed if condition 1 and condition 2 are false and condition 3 is true;
}
else
{
// code to be executed if all condition are false;
}
Example:
<?php
$x=12;
if ($x>20)

echo “x is greater than 20”;


}
elseif ($x>15)
{
echo “x is greater than 15 but not greater than 20”;

elseif ($x>10)

echo “greater than 10 but not greater than 15”;


}
else

echo “x is not greater than 10”;


}
?>
Explanation and output of the program:
The above example will output,
• x is greater than 10 but not greater than 15
• It’s important to note that only one of the blocks of code will executed, depending on which condition
is true.
• If none of the conditions are true, the code inside the ‘else block’ will be executed.
2. Discuss in detail about Switch statement with an example.
• Switch Case:
• Switch statement is used to specify multiple conditions.
• It runs a different code block for different conditions.
• This is a multiple branching statement where, based on a condition, the control is transferred to one of the
many possible points
31
SYNTAX:
switch (expression)
{
case value 1:
// code to be executed if expression = value 1;
break;
case value 2:
// code to be executed if expression = value 2;
break;

default:
// code to be executed if expression is not equal to any of the values;
}

Example:
<?php
$x = 10;
switch ($x)
{
case 5:
echo “x is equal to 5”;
break;
case 10:
echo “x is equal to 10”;
break;
case 15:
echo “x is equal to 15”;
break;
default:
echo “x is not equal to 5, 10, or 15”;
}
?>
Explanation and output of the program:
The above example will output,
• x is equal to 10
• The expression is $x, which has a value of 10.
• The switch statement checks each case to see if the value of $x is equal to the value specified in the
case.
• In the case that matches the value of $x is case 10:,
• The code inside that block will be executed, and the string “x is equal to 10” will be output.

32
7. LOOPING IN PHP
PART- 1
Choose the best answer (1 Mark)
1. Which of the following is NOT a type of loop statement in PHP?
a) for b) if...else c) while d) do...while
2. What type of loop is “for loop” in PHP?
a) Entry-Check Loop b) Exit - Check Loop
c) Counter Loop d) Iteration Loop
3. What is the syntax for for loop in PHP?
a) for(initialization; condition ; increment) {// code}
b) foreach(initialization; condition ; decrement) {// code}
c) while} condition)
d) do{.. . }while(condition)
4. What are the three parts of the for loop syntax in PHP?
a) initialization, condition, increment
b) initialization, code block, increment
c) code block, condition, increment
d) condition, initialization, code block
5. When is the ‘initialization’ part of a for loop executed?
a) Before each iteration b) After each iteration
c) Only once at the beginning of the loop d) Only once at the end of the loop
6. What is the purpose of the ‘increment’ part of a for loop?
a) To initialize variables b) To update variables
c) To check the condition d) To execute the code block
7. What type of loop is “while loop” in PHP?
a) Entry-Check Loop b) Exit - Check Loop
c) Counter Loop d) Iteration Loop
8. What type of loop is “do. . .while loop” in PHP?
a) Entry-Check Loop b) Exit - Check Loop
c) Counter Loop d) Iteration Loop
9. Which looping structure should be used to iterate over elements of an array in PHP?
a) for loop b) while loop c) do. .. while loop d) foreach loop
10. What is the output of the following code?
$array = array (1, 2, 3, 4, 5);
foreach ($array as $value)
{
echo $value;
}
a) 1 2 3 4 5 b) 5 4 3 2 1 c) 1 1 1 1 1 d) None of the above
PART - II
Answer the following questions
1. What is the purpose of a loop in PHP?
• A loop executes a set of instructions repeatedly for a certain number of times or until a certain
condition is met.
2. Write the syntax for an ‘for’ loop in PHP?
SYNTAX:
for (initialization; condition; increment / decrement)
{
// code to be executed;
33
3. Write the syntax for an ‘while’ loop in PHP?
SYNTAX:
while (condition)

// code to be executed;
}
4. How is the ‘condition’ in a while loop evaluated?
• while loop’ is called as the entry-check loop.
• So the condition is evaluated at the beginning of each iteration of the loop.
• If it is true, the code block is executed.
• If it is false, the loop is terminated.
5. What is the output of the following code snippet?
$i=l;
while ($i <=5)

echo $i. “<br>”;


$i++;
}

3
4
5
PART - HI
Answer the following questions
1. Describe the three parts of a for loop in PHP (initialization, condition and increment) and explain
their purpose.
Initialization:
• The initialization part is executed only once at the beginning of the loop.
• It is used to initialize variables.
Condition:
• The condition is evaluated before each iteration of the loop.
• If it is true, the code block is executed.
• If it is false, the loop is terminated.
Increment:
• The increment / decrement part is executed after each iteration of the loop.
• It is used update variables.
2. Write a PHP code to print 1 to 10 numbers in ascending order using for loop.
• To print the numbers from 1 to 10 in ascending order
<?php

34
for ($i = 1; $i<= 10; $i++)
{
echo $i . "<br>";
}
?>
Output:
1
2
3
4
5
6
7
8
9
10
3. Explain the difference between while loop and do...while loop in PHP.
while loop do...while loop
• Entry-Check Loop • Exit-Check Loop
• While loop is used to execute a block of • The do...while loop is similar to the while
code until a certain condition is true loop, except that the code block is always
executed at least once, even if the condition
is false.
SYNTAX: SYNTAX:
while (condition) do
{ {
// code to be executed; // code to be executed;
} } while (condition);

PART - IV
Answer the following questions:

For Loop:
• ‘for loop’ is called as the entry-check loop.
• The for loop is used to execute a block of code for a specific number of times
SYNTAX:
for (initialization; condition; increment / decrement)

H code to be executed;
}
Purpose of for loop:
Initialization:
• The initialization part is executed only once at the beginning of the loop.
35
•It is used to initialize variables.
Condition:
• The condition is evaluated before each iteration of the loop.
• If it is true, the code block is executed.
• If it is false, the loop is terminated.
Increment:
• The increment / decrement part is executed after each iteration of the loop.
• It is used update variables.
Example:
• To print the numbers from 1 to 5 in ascending order
<?php
for ($i = 1; $i<= 5; $i++)
{
echo $i . "<br>";
}
?>
Output:
1

2. Write a PHP code to print 10 to 20 numbers in ascending order using while loop and do... while loop.
• PHP Code using while loop
<?php
$i=10;
while ($i<=20)
{
echo $i. “<br>”;
$i++;
}
?>
Output:
10
11
12
13
14
15
16
17
18
19
20

36
• PHP Code using do... while loop
<?php
$i=10;
do
{
echo $i. “<br>” ;
$i++;
}
while ($i<=20);
?>
Output:
10
11
12
13
14
15
16
17
18
19
20
3. Explain ‘foreach’ loop with examples.
Foreach Loop:

SYNTAX:
foreach ($array as $value)
{
// code to be executed;
}
Example:
• To print the elements of an array
Sarray = array (1, 2, 3, 4, 5)
foreach ($array as $value)
{
echo $value. “<br>”;
}
Output:
1
2
3
4
5

37
for each loop to iterate over the keys and values of an associative array:
SYNTAX:
foreach (Sarray as $key => Svalue)

// code to be executed;
}
• The foreach loop will iterate over each element of the array and assign the key of the element to the
$key variable and the value of the element to the Svalue variable.
Example:

Sarray = array (“a” => 1, “b” => 2, “c” => 3);


foreach (Sarray as key => Svalue)
{
echo Skey. “=> “.Svalue. “<br>”;

Output:
a => 1
b=>2
c => 3
Explanation:
• It is used to perform a set of actions on each element of an array, such as printing the elements,
summing them up, or modifying them in some way.
• It is a simple and efficient way to iterate over arrays in PHP.
8. FORMS AND FILES
PART - 1
Choose the best answer
1. What are HTML forms used for?
a) To collect input from users b) To create server- programming language
c) To create a database d) To send emails
2. Which of the following is NOT a form control available in HTML forms?
a) Text inputs b) Buttons c) Checkboxes d) Cropping Tool
3. Which tag is used to create an HTML form?
a) form b) input c) textarea d) select
4. What form control allows the user to select multiple values?
a) text inputs b) buttons c) checkboxes d) radio buttons
5. What form control allows the user to select only one value at a time?
a) text inputs b) buttons c) checkboxes d) radio buttons
6. What is the purpose of validation in PHP?
a) To check the input data submitted by the user from the client machine
b) To display data to users
c) To store data on the server
d) To send data to the client
7. How many types of validation are available in PHP?
a) One b) Two c) Three d) Four

38
8. Which PHP function can be used to open a file?
a) fopenQ b) fread() c) fcloseQ d) fwriteQ
9. What PHP function can be used to read a file?
a) fopen() b) freadQ c) fcloseQ d) fwriteQ
10. What PHP function can be used to close a file?
a) fopenQ b) freadQ c) fcloseQ d) fwriteQ
PART - II
Answer the following questions
1. What is the main objective of PHP and HTML form controls?
• Main objective of PHP and HTML form controls are to collect data from users using textbox,
dropdown box and radio button etc., and sent to server using PHP.
2. What are the basic HTML form controls available?
• Text inputs
• Buttons
• Checkbox
• Radio box
• File Select
• Form Tag
3. How are data collected via HTML form controls sent to the server?
• The data are collected from users via HTML form controls like textbox, dropdown box and radio
button etc., and sent to server using server side programming like PHP.
4. What is Validation in PHP?
• Validation is a process of checking the input data submitted by the user from client machine.
5. What are the two types of validation available in PHP?
• Client-Side Validation
• Server Side Validation
PART - HI
Answer the following questions
1. Explain the difference between check box and radio button in HTML forms.
Check box Radio button
• Checkbox is a important feature which • Radio box is similar to checkbox but one
selects more than one value from the value can be chosen at a time.
HTML form.
• Must be checkable minimum one value • Must be selectable minimum one value
2. Explain the difference between the POST method and GET method of sending data to the server in
PHP.
POST GET
• The input data sent to the server with POST • The input data sent to the server with POST
method is stored in the request body of the method via URL address is known as query
client’s HTTP request. string.
• All input data are visible by user after they
click the submit button.

39
3. What are the different file handling tasks that can be performed using PHP?
• Files are processed for different tasks using the following events
• PHP Open a File
• PHP Read a File
• PHP Close a File
• PHP Write a File
• PHP Appending a File
• PHP uploading a File.
PART - IV
Answer the following questions:
1. Discuss in detail about HTML form controls.
Main objective of PHP and HTML form controls are to collect data from users.
Html Form Controls:
Text inputs contain textbox and text area controls.
Buttons may contain Submit button, Reset button and Cancel Button.
Checkbox is the important feature which selects more than one value from the HTML form.
Radio box is similar to checkbox but one value can be chosen at a time.
File select is the best feature to select one file from the local machine to server machine at a time.
Form tag is used to mention a method (POST or GET) and control the entire form controls in the HTML
document.
2. Explain in detail of File handling functions.
File handling is an important activity of all web application development process.
Files are processed for different tasks using the following events:
PHP Open a File,
PHP Read a File,
PHP Write a File,
PHP Close a File,
1) PHP Open a File
fopen() is a system function helps to open a file in the server.
It contains two parameters one for the file and the other one specifies in which mode the file should
be opened (Read/Write).
Syntax:
$file_Object= fopen(“FileName”, “Read/WriteMode”) or die(“Error Message!”);
2) PHP Read a File:
The fread() function reads from an open file.
The file object comes from fopen function.
Syntax:
fread($file_Object,filesize(“FileName”));
3) PHP write a File:
The fwrite() function is used to write to a file.
Syntax:
fwrite($myfile, $txt);
4) PHP Close a File:
The fcloseQ function is used to close an opened file.
40
The file object comes from fopen function.
Syntax:
fclose($file_Object) ;
9. CONNECTING PHP AND MYSQL
PART - 1
Choose the best answer
1. Which is the correct function to execute the SQL queries in PHP?
a) mysqli_query(“Connection Object”,’’SQL Query”)
b) query(“Connection Object”,’’SQL Query”)
c) mysql_query(“Connection Object”,’’SQL Query”)
d) mysql_query(“SQL Query”)
2. Which is the correct function Closing Connection in PHP ?
a) mysqli_close(“Connection Object”);
b) close(“Connection Object”);
c) mysql_close(“Connection Object”);
d) mysqli_close(“Database Object”);
3. Which is the correct function to establish Connection in PHP ?
a) mysqli_connect(“Server Name “,”User Name”,’’Password”,”DB Name”);
b) connect(“ServerName “,’’User Name”,’’Password”,”DB Name”);
c) mysql_connect(“Server Name “,’’User Name”,’’Password”,”DB Name”);
d) mysqli connect (“Database Object”);
4. Which is the not a correct MySQL Function in PHP 2.
a) Mysqli_connect() Function b) Mysqli closeQ Function
c) mysqli select data() Function d) mysqli_affected_rows() Function
5. How many parameter are required for MYSQLi connect function in PHP ?
a) 2 b) 3 CS Knowledge c) 4 d) 5
6. How many parameter are required for MYSQLi query function in PHP ?
a) 2 b) 3 c) 4 d) 5
7. How many parameter are required for MYSQLi Close function in PHP ?
a) 1 b) 2 c) 3 d) 5
8. Which version of PHP supports MySQLi fuctions ?
a) Version 2.0 b) Version 3.0 c) Version 4.0 d) Version 5.0
PART - II
Answer the following questions
1. What are the MySQLi function available PHP?
• Mysqli_connect() Function
• Mysqli_close() Function
• Mysqli_query()Function
2. What is MySQLi function?
• MySQLi is extension in PHP scripting language which gives access to the MYSQL database.
• Functions used for MySQL Database connectivity and executing SQL queries.
3. What are the types MySQLi function available PHP?
• Database Connections
• Managing Database Connections
• Performing Queries
• Closing Connection

41
4. Difference between Connection and Close function?
Connection Close function
• Before accessing MySQL Database, connect to • Mysqli_close() Function is used to close an
Database Server machine via PHP scripting existing opened database connection between
language using Mysqli_connect() Function. PHP scripting and MySQL Database Server.
Syntax: Syntax:
mysqliconnect mysqli_close(“Connection Object”);
(“Server_Name “,”User_Name”,’’Password”,”DB
.Name”);
5. Give few examples of MySQLi Queries.
EXAMPLES:
$con=mysqli=connect(“localhost”,”my=user”,”my_password”,”Student_DB “);
$sql=”SELECT name,age FROM student”;
mysqli_query($con,$sql) ;
6. What is Connection string?
• Before accessing MySQL Database, The mysqli_connect() function uses the variables connect to
Database Server machine via PHP scripting language.
• If connection gets fail, output will be printed with MySQL error code.
• Otherwise connection is success.
• The variables used to connect to the Database server are
• Sservemame -> Database Server Server IP address
• Susemame -> Database Server User Name
• Spassword -> Database Server Password
• $DB_Name -> Database Name
PART - III
Answer the following questions
1. Write the Syntax for MySQLi Queries.
• “mysqli_query” is a function, helps to execute the SQL query statements in PHP scripting language.
Syntax:
mysqli_query(“Connection Object”,’’SQL Query”)
2. Write is the purpose of MySQLi function available.
• In PHP Scripting language many functions are available for MySQL Database connectivity, executing
SQL queries, and management.
->
• Mysqli_connect() Function connect to Database Server
• Mysqli_close() Function -> close an existing opened database connection
• Mysqli queryQFunction -> execute the SQL query
3. Write MySQLi Connection Syntax with example.
• Before accessing MySQL Database, connect to Database Server machine via PHP scripting language
using Mysqli_connect() Function.
Syntax:
mysqli_connect(“Server_Name “,”User_Name”,’’Password”,”DB_Name”);
Example:
$conn = mysqli_connect($servemame, Susemame, $password,$DB_name);

42
PART - IV
Answer the following questions:
1. Discuss in detail about MySQLi functions with example .
• In PHP Scripting language many functions are available for MySQL Database connectivity and executing
SQL queries.
• Mysqli_connect() Function
• Mysqli_close() Function
• MysqliqueryQFunction
i) Mysqli connect!) Function:
• Before accessing MySQL Database, connect to Database Server machine via PHP scripting language using
Mysqli_connect() Function.
Syntax:
mysqli_connect(“Server Name “,”User Name”,’’Password”,”DB Name”);
• This function requires four parameters to connect to database server.
• Database Server name, Database username, password and Database Name.
ii) Mysqli closeQ Function:
• mysqli_close() Function is used to close an existing opened database connection between PHP scripting
and MySQL Database Server.
• Example:
<?php
$con=mysqli connect(“localhost”,”$user”,”$password”,”SCHOOL_DB”);
mysqli_close($con);
?>
Syntax:
mysqli_close(“Connection Object”);
iii) Mysqli quervQFunction:
• Before accessing MySQL Database, connect to Database Server machine via PHP scripting language using
Mysqli_connect() Function.
Syntax:
mysqli_connect(“Server Name “/’User Name”,’’Password”,”DB Name”);
Example:
Sconn = mysqli_connect($servemame, Susername, $password,$DB_name);
2. Explain in details types of MySQLi connection method in PHP.
Database Connections:
• Before accessing MySQL Database, connect to Database Server machine via PHP scripting language using
Mysqli_connect() Function.
Syntax:
mysqli_connect(“Server Name “,”User Name”,’’Password”,”DB Name”);
• This function requires four parameters to connect to database server.
• Database Server name, Database username, password and Database Name.
Managing Database Connections
The below code snippet describes managing database connection methods and features.

43
<?php
Sservemame = “localhost”;
Susemame = “username”;
Spassword = “password”;
SDBname = “SchoolDB”;
$conn = mysqli_connect($servemame, Susemame, $password,$DB_name);
if (!$conn) {
die(“Connection failed: “ . mysqli_connect_error());

echo “Connected successfully”;


?>
• In the above code snippet, three variables are used to connect to the Database server. They are,
•Sservemame -> Database Server Server IP address
•$usemame -> Database Server User Name
•Spassword -> Database Server Password
•$DB_Name -> Database Name
• The mysqli connect function uses these variables and connect Database server from PHP scripting.
• If connection gets fail, output will be printed with MySQL error code.
• Otherwise connection is success.
3. Explain MySQLi Queries with examples.
• The main goal of MySQL and PHP connectivity is to retrieve and manipulate the data from MySQL
database server.
• The SQL query statements are helping with PHP MySQL extension to achieve the objective of MySQL and
PHP connection.
• “mysqli query” is a function, helps to execute the SQL query statements in PHP scripting language.
Syntax;
mysqli_query(“Connection Object’’,”SQL Query”)
Example:
$con=mysqli_connect(“localhost”,”my_user”,”my_password”,”Student_DB “);
$sql=”SELECT name,age FROM student”;
mysqli_query($con,$sql);
10. INTRODUCTION TO COMPUTER NETWORKS
PART -I
Choose the best answer
1. A set of computers connecting together is called as
a) Network b) Server c) Hub d) Node
2. Many discussions in an online forum leads to personal attacks and is called
a) Hackers b) Virus c) Online war d) Flame war
3. Wi-Fi is short name for
a) Wireless Fidelity b) Wired fidelity c) Wired fiber optic d) Wireless fiber optic
4. Which among them was challenging to the business people on computer networking?
a) Hacking b) Viruses c) Both a & b d) none of this above
5. Which one of the following is not the social media
a) Gmail b) Facebook c) twitter d) Linkedin

44
6. In mobile network, land areas for network coverage was distributed as
a) Firmware b) cells c) Range d) Service
7. Which one of the following are harmful to computer?
a) Bloggers b) Browser c) Hackers d) twitter
PART - II
Answer the following questions
1. Define Computer Network.
• A set of computers connected together for the purpose of sharing resources is called as computer network.
2. Write short note on Internet.
• Internet stands for INTERnational NETwork .
• Internet is simply defined as the connection of individual networks operated by academic persons, industry
people, government, and private parties.
3. What are the common uses of computer network?
The common uses of computer network are
> Communication
> Resource sharing
> Information sharing
4. What is node in computer network?
• A Computer which is connected to a network is called as node.
PART -III
Answer the following questions
1. Write a note on resources sharing?
• Resources Sharing allows all kind of programs, equipment and data to be accessed by anyone via network
irrespective of the physical location of the resource.
• Simply, It is a sharing of devices like printers, scanner, PDA, fax machine, and modems.
2. List out some benefits of social networks.
i. Group information sharing over long distances.
Group discussions and Group chats go on in various groups through which people are kept in touch with
each other.
ii. Broadcast announcements.
Quick, easy way to spread information of emergencies and natural calamities.
iii. Fostering diversity of thought.
Some critics of social networks say that online communities attract people by similar interests and
backgrounds
3. Write a note on Mobile Networks?
• Mobile network is the network connecting devices without cable (wireless).
• Mobile computers, such as laptop, tablet, and hand held computers, were fastest growing segments.
• At land areas network was distributed as cells, by single - location transceiver, but generally three cell
sites or a base transceiver station.
• This portable transceivers used to communicate with one another with fixed transceivers and moving
via more than one cell during transmission.

45
PART - IV
Answer the following questions:
1.Explain uses of computer network?
• The common uses of computer network are
• Communication
• Resource sharing
• Information sharing
Communication:
• Using computer networks, we can interact with the different people with each other all over the world.
• People can easily communicate at very low cost via mobile, social media, telephone, e-mail, chatting,
video conferencing, SMS, MMS, groupware etc...
Resource sharing:
• It allows all kind of programs, equipment and data to be accessed by anyone via network irrespective
of the physical location of the resource.
• Simply resource sharing is a sharing of devices like printers, scanner, PDA, fax machine, and modems.
Information sharing:
• Using computer network, any application or other software can be stored at a central computer or
server.
• The software can be shared among other computers of the network.
2.Explain about social applications in computer network?
Social Application
• To get connected with people around the world through social network media, applications like
Whatsapp, Facebook, Twitter, Blogs, Pinterest, Classmate and so on are in full fledge use.
Membership:
• Social nets generally requires user to register names and accounts to avoid duplicate and maintain
secrecy.
• So many public networks offer free registration and some meagre charges for their services.
• Private networks (such as BANK ACCOUNT HOLDERS groups) restrict registration to people who
meet certain eligibility criteria.
Content contribution:
• These networks allow members to easily share comments, audio, video, text, animation files etc with
others.
Frequent visits:
• Healthy social net have a group of members who check in regularly to contribute their share and also
for new updates
Relationship building:
• The common goal of most social networks is to allow interaction among people, which create stronger
connection with people of different communities.

46
11. NETWORK EXAMPLES AND PROTOCOLS
PART - 1
Choose the best answer
1. Which of the following system securely share business’s information with suppliers, vendors, partners and
customer.
a) Extranet b) Intranet c) arpanet d) arenet
2. Match the following and choose the correct answer
i. HTTP -The core protocol of the World Wide Web.
ii. FTP - enables a client to send and receive complete files from a server.
iii. SMTP - Provide e-mail services.
iv. DNS - Refer to other host computers by using names rather than numbers.
a) i, ii, iii, iv b) ii, iii, iv, i c) iii, iv, i, ii d) iv, iii, ii, i
3. Communication over is be made up of voice, data, images and text messages.
a) Social media b) mobile network c) whatsapp d) software

a) Wireless Fidelity b) wired fidelity c) wired optic fibre d) wireless optic fibre
5. A TCP/IP network with access restricted to members of an organization
a) LAN b) MAN c) WAN d) Intranet
6. RFID stands for
a) Radio Free identification b) real Frequency identity
c) Radio Frequency indicators d) Radio Frequency Identification.
7. It guarantees the sending of data is successful and which checks error on operation at OSI layer is
a) Application layer b) Network layprt c) Transport Layer d) Physical layer
8. Which one of the following will secure data on transmissions?

9
a) HTTPS
provides e-mail service
b)HTTP ^FTP d) SMTP

a) DNS b) TCP Open®^FTP d) SMTP


10. refer to other host computers by using names rather than numbers.
a) DNS b) TCP c) FTP d) SMTP
PART - 11
Answer the following questions
1. Define Intranet.
• It is a private network using Internet technology to share part of business information with supplier’s
partners and customers.
• It may consist of many interlinked local area networks.
2. What is the uses of mobile networks?
• Mobile networking assign to the technology that can support data / voice, network connectivity using via
radio transmission solution, wireless.
• Wireless communications use both data and voices are being transmitted over both circuit via switched
networks and packet-switched networks.
• The common application of mobile networks is mobile phones, tablets, etc..
3. List out the benefits of WiFi.
• Mobility.
• Connection to Internet.
• Flexibility of LAN.
• Ensures connectivity.
• It allows places that are remote to benefit from connectivity.
47 http://www.youtube.eom/c/csknowledgeopene
• Low cost, high benefits.
5. Expand HTTP, HTTPS, FTP.
HTTP : Hypertext Transfer Protocol
HTTPS : Hypertext Transfer Protocol Secure
FTP : File Transfer Protocol
PART -HI
Answer the following questions
1. Compare Internet, Intranet and Extranet.
Type Definition
Internet The Internet is a network of global connections - comprising private, public,
business, academic and government networks.
Intranet The Intranet is a private network within an enterprise to share company data and
computing resources between the employees.
Extranet The Extranet is a private network that uses Internet technology and the public
telecommunication system to securely share business’s information with suppliers,
vendors, partners.
2. Write short notes on HTTP, HTTPS, FTP.
HTTP :
> A protocol used between a web client and a web server protects non secure data transmissions.
HTTPS:
> A protocol used between a web client and a web server permits secure data transmissions.
FTP :
OS KllOVUlSCf Cf
> Used between computers for sending and receiving file.
3. What are the layers available in TCP/IP Reference Model?
> Network Access Layer - Concerned with building packets.
> Internet Layer - Describes how packets are to De delivered.
> Transport Layer - Ensure the proper transmission of data.
> Application Layer - Application network processes.
PART IV
Answer the following questions:
1. Explain about Internet, Intranet and Extranet.
INTERNET:
• The Internet is a worldwide system of computer networks.
• A network of networks where the users at any one computer can, get information from any other computer.
• The Internet is a network of global connections - comprising private, public, business, academic and
government networks - connected wired by guided, wireless and fiber- optic technologies.
• Example: Sending email to a friend
INTRANET:
• It is a private network within an enterprise to share company data and computing resources between the
employees.
• It may consist of many interlinked local area networks.
• It includes connections through one or more gateway computers to outside Internet.
• Example: Sharing of company rules and regulations
48
EXTRANET:
• It is a private network that uses Internet technology and the public telecommunication system to securely
share business’s information with suppliers, vendors, partners, customers, or other businesses.
• Example: Customer communications
2. Discuss about OSI model with its layers.
• Open System Interconnection (OSI) model describes the standards for the inter-computer communication.
• OSI model enables network protocols along with software and systems to be developed based on general
set of guidelines.
OSI Lavers:
1. Physical Layer:
• This is the 1st layer, it defines the electrical and physical specifications for devices.
2. Data Link Layer:
• It is the 2nd layer and it guarantees that the data transmitted are free of errors.
• This layer has simple protocols like “802.3 for Ethernet” and “802.11 for Wi-Fi”.
3. Network Layer:
• It is the 3rd layer determining the path of the data packets.
• At this layer, routing of data packets is found using IP Addressing.
4. Transport Layer:
• It is the 4th layer that guarantees the transportation/sending of data is successful.
• It includes the error checking operation.
5. Session Layer:
• It is the 5th layer, identifies the established system session between different network entities.
CS Knowledge
• It controls dialogues between computers .
• While accessing a system remotely, session is created between your computer and the remote system.
6. Presentation Layer:
• It is the 6th layer that does the translation of data to the next layer (Prepare the data to the Application
Layer).
• Encryption and decryption protocols occur in this layer such as, Secure Socket Layer (SSL).
7. Application Layer:
• It is the 7th layer, which acts as the user interface platform comprising of software within the system.
3. Difference between TCP/IP and OSI Reference Model.
Sl.No OSI Reference Model TCP/IP Model
1. Open System Interconnection (OSI) Transmission Control Protocol (TCP/IP)
2. OSI describes the standards for the inter¬ TCP/IP is a set of protocols which governs
computer communication. communications among all computers on the
Internet.
3. OSI has Seven layers TCP/IP has Four layers
(Physical, Data Link, Network, Transport, (Network Access Layer, Internet, Transport,
Session, Presentation, Application) Application)
4. It is a theoretical model which is used for It is a client server model used for transmission of
computing system. data over the internet.

49
5. Developed by ISO(International Standard Developed by (Department of Defense)
Organization)

6. OSI follows a vertical approach. TCP/IP follow a horizontal approach.


7. OSI is protocol independent. TCP/IP is protocol dependent.
12. DOMAIN NAME SYSTEM (DNS)
PART -I
Choose the best answer
1 . Which of the following is used to maintain all the directory of domain names?
a) Domain Name System b) Domain name space
c) Name space d) IP address
2. Which of the following notation is used to denote IPv4 addresses?
a) Binary b) Dotted-decimal c) Hexadecimal d) a and b
3. How many bits are used in the IPv6 addresses?
a) 32 b) 64 c) 128 d) 16
4. Expansion of URL is
a) Uniform Resource Location b) Universal Resource Location
c) Uniform Resource Locator d) Universal Resource Locator
5. How many types are available in Relative URL?
a) 2 b) 3 c) 4 d) 5
6. Maximum characters used in the label of a node?
a) 255 b) 128 c) 63 d) 32
7. In domain name, sequence of labels are separated by
a); b) .(dot) JpR c) : d)NULL
8. Which of the following initiates the mapping of domain name to IP address?
a) Zone b) Domain c) Resolver d)Name servers
9. Which is the contiguous area up to which the server has access?
a) Zone b) Domain c) Resolver d) Name servers
10. Root name servers are maintained by
a) IANA b) ICANN c) WHOIS d) DNS
PART - II
Answer the following questions
1. List any four domain names.
Domain Name Meaning
com Commercial Organisation
edu Educational Institutions
gov Government (US)
mil Military groups
2. What is an IP address?
• Internet Protocol (IP) address is simply the logical address in the network layer.
• IP address is also used to uniquely identify a computer over the network.
• No two systems can have same IP address.
3. What is an URL?
• URL (Uniform Resource Locator) is the address of a document on the Internet.
• URL is made up of four parts- protocols, hostname, folder name and file name.
• Each part has its own specific functions.
50
4. List out four URLs you know.
• https://www.google.com/
• https://www.yahoo.com/
• https://www.rediff.com/
• https://www.facebook.com/
5. What is a zone?
• Zone is the contiguous part up to which the server has access.
• The domain assigned for the server does not divide into further sub domains then zone is same as domain.
6. What is a resolver?
• The resolver is a program which is responsible for initiating the translation of a domain name into an IP
address.
• A resolver is stored in the host.
• No protocol need to form a connection between the resolver and the user program.
7. Write any four generic Top Level Domain.
Domain Name Purpose
com Commercial Organisation
edu Educational Institutions
gov Government (US)
mil Military groups
8. Mention the components of DNS.
• Some important components in the Domain Name System.
• Namespace
• Name server
• Zone
• Resolver
PART - III
Answer the following questions
1.Write a note on URL and its types
• URL (Uniform Resource Locator) is the address of a document on the Internet.
• URL is made up of four parts- protocols, hostname, folder name and fde name.
• URL is classified into two types:
(i) Absolute URL: The absolute URL is the complete address of a document on the Internet.
(ii) Relative URL: The relative URL is the partial address of a document on the Internet.
2. Differentiate IPv4 and IPv6.
IPv4 IPv6
> IPv4 address is a 32-bit unique address given > IPv6 address is a 128-bit unique address given
to a computer system. to a computer system.
> The number of addresses that can be formed in r
The number of addresses that can be formed in
IPv4 is 232. IPv6 is 2128.
> IP address represented by, > IP address represented by, 4-digit
• Binary notation Hexadecimal numbers separated by colon
• Dotted-decimal notation symbols.

51
3. What are the differences between Absolute URL and Relative URL?
Absolute URL Relative URL

> Absolute URL is the complete address of a > Relative URL is the partial address of a
document on the Internet. > document on the Internet.
> Absolute URL contains all the information that > Relative URL contains only file name or file
are required to find the files on the Internet. name with folder name.
> All the four parts is very important in absolute > Relative URL is used when the file is on the
URL. same server related to original document.
4. Write a note on domain name.
• Domain name is the sequence of labels, which are separated by dot (.).
• The domain name is always read from the lower level to higher level i.e., from the leaf node to root node.
• Since the root node always represent NULL string, all the domain name ending with dot.
• Example: .com, .edu
PART - IV
Answer the following questions:
1. Classify and Explain the IP address and its classification.
• Internet Protocol (IP) address is simply the logical address in the network layer.
• IP address is also used to uniquely identify a computer over the network.
• Due to increase in the number of system in a network there is a need of more addresses which lead to two
addressing methods i.e., IPv4 and IPv6.
IPv4 Address:
• IPv4 address is a 32-bit unique address given to a computer system.
• No two systems can have same IP address.
• If the network has p connections then ‘ p’ addresses should be there.
• An address space is the total number of addresses that can be made by that protocol.
• It is determined by the number of bits that the protocol use.
• If the protocol uses ‘n’ bits then the address space of that protocol would be ‘2n ,addresses can be
• formed.
• So, the number of addresses that can be formed in IPv4 is 232.
• There are two ways to represent the IP address,
• Binary notation: In binary notation the address is expressed as 32-bit binary values.
• Dotted-decimal notation: In dotted-decimal notation the address is written in decimal format separated by
dots(.).

I 10000000 |I 10001111 10001001 | 10010000 |


1» Byte 2nd Byte 3rd Byte 4th Byte

= 128 = 143 = 137 = 144

128.143.137.144

IPv6 Address;
• IPv6 address is a 128-bit unique address given to a computer system.
• The number of addresses that can be formed in IPv6 is 2128.
• In IPv6 address, the 128 bits are divided into eight 16-bits blocks.
52
• Each block is then changed into 4-digit Hexadecimal numbers separated by colon symbols.
• E.g. 2001:0000:32313:DFEl:0063:0000:0000: FEFB.
128 Bits

Network prefix (64 bits) Host number (64 bits)

| XXXX ; XXXX ; XXXX XXXX | | XXXX ; XXXX ; XXXX ; XXXX |

X - Hexadecimal number (0,1,2,3,4,5,6, 7,8,9,A,B,CZD,E,F


XXXX - 0000 to FFFF

2. Explain the name server and its types?


NAME SERVERS:
• The information which needs to be stored in Domain name space is quite large.
• Single system would be unreliable and inaccessible of any failure, inefficient and insufficient to store such
a huge amount of requests from all over the world.
• The best way to do that is to divide the entire space into many domains and sub domains among many
computers.
• DNS also allows domains to be further divided into sub domains and hierarchy of servers is also
maintained.
• Name servers store the data and provide it to clients when queried by them.
• Name Servers are programs that run on a physical system and store all the zone data.
• Inverse Name Server in the Domain Name System (DNS) translates the domain names to IP addresses.
• Name server contains the DNS database which consists of domain names and their corresponding IP
addresses.
• There is a need to store large number of domain names, so plenty of servers are used in the hierarchical
manner.
• Name servers do the important task of searching the domain names.
• While searching, Local Name server (provided by ISP) ask the different name servers until one of them
find out your answer.
• At last it returns IP address for that domain name.
• Your computer can now connect to the requested webpage stored on the web server.
TYPES OF NAME SERVERS:
There are three types of Name Servers which control the entire Domain Name System:
1. Root Name Server:
• Top level server which contains entire DNS tree, maintained by ICANN. There are 13 servers.
2. Primary/Master Name Server:
• Contains a zone resource records.
• These records are updatable by domain name holders such as organizations.
3, Secondarv/Slave Name Server:
• Contains a copy of primary server files.
• This server has no authority to update, but reduce the workload of master server by sharing the queries.
5. Explain how the DNS is working.
• When the user enters the URL in the browser, the system first checks its DNS cache for the corresponding
IP address.
• If the IP address is found in the cache then the information is retrieved from cache.
53
• If not, then the system needs to perform DNS query i.e., the system needs to query the resolver about the IP
address from Internet Service Provider (ISP).
• Each resolver has its own cache and if it is found in that then that information is retrieved.
• If not, then the query is passed to next domain server i.e., TLD (Top Level Domain) which reviews the
request and direct the query to name servers associated with that specific domain.
• Until the query is solved it is passed to next level domains.
• At last the mapping and the record are returned to the resolver who checks whether the returned value is a
record or an error.
• Then the resolver returns the record back to the computer browser which is then viewed by the user.

13. NETWORK CABLING


PART - 1
Choose the best answer
1. ARPANET stands for
a) American Research Project Agency Network
b) Advanced Research Project AreaNetwork
c) Advanced Research ProjectAgency Network
d) American Research Programs And Network
2. WWW was invented by
a) Tim Berners Lee b) Charles Babbage c) Blaise Pascal d) John Napier
3. Which cable is used in cable TV?
a) UTP cable b) Fibre optics c) Coaxial cable d) USB cable
4. Expansion of UTP is
a) Uninterrupted Twisted Pair b) Uninterrupted Twisted Protocol
c) Unshielded Twisted Pair d) Universal Twisted Protocol
5. Which medium is used in the optical fibre cables to transmit data?
a) Microwave b) infrared c) light d) sound
6. Which of the following is a small peripheral device with a sim slot to connect the computers to Internet?
a) USB b) Dongles c) Memory card d) Mobiles
7. Which connector is used in the Ethernet cables?
a)RJll b) RJ21 c) RJ61 d) RJ45
8. Which of the following connector is called as champ connector?
a)RJll b) RJ21 c)RJ61 d) RJ45
9. How many pins are used in RJ45 cables?
a) 8 b) 6 c) 50 d) 25
10. Which wiring standard is used for connecting two computers directly?
a) straight Through wiring b) Cross Over wiring
c) Rollover wiring d) None

54
PART - II
Answer the following questions
1. Write a note on Co - axial cable.
• This cable is used to connect the television sets to home antennas.
• It has a copper wire inside and insulation is covered on the top of the copper wire to provide protection to
the cable.
2. What are the uses of USB cables?
• The Universal Serial Bus are used to connect keyboard, mouse and other peripheral devices.
• Micro USB is a miniaturized version of the USB used for connecting mobile devices.
3. What is an Ethernet port?
• The Ethernet port is the jack where the Ethernet cable is to be connected.
• This port will be there in both the computers and the LAN port.
4. What is the use of Crimping tool?
• The crimping tool is a physical tool which is used to connect the patch wire and the Ethernet connector
(RJ45).
• The crimping tool looks like a small cutting handle with two mold of Ethernet port.
5. What are the types of twisted pair cables?
• There are two types of twisted pair cables,
o Unshielded Twisted Pair (UTP)
o Shielded Twisted pair (STP).
6. What is meant by champ connector?
• The RJ-21 connector has 50 pins with 25 pins at one end and 25 pins at the other end.
• RJ-21connector is also called as champ connector or Amphenol connector.
• The RJ-21 interface is typically used for data communication trucking applications.
PART - III
Answer the following questions
1. Write a note on crossover cables.
• Cross over cable is used to join two network devices of the same type like example two PCs or two
network devices.
• The Null modem Cables are the example of the crossover cables.
• The pairs(Tx and Rx lines) will be crossed.
2. Write a short note on RJ45 connector.
• The “RJ” stands for the Registered Jack and the “45” simply refers to the interface standard.
• The RJ45 connector is a small plastic cube.
• It has eight pins.
• It is connected to each end of the Ethernet cable.
• It is also known as 8P8C connector.
• These plugs (connector) are inserted into Ethernet port of the network card.
3. What is meant by null modem cable? Give the examples
• A cable interconnecting two devices directly is known as a null modem cable.
• RS-232 cable is also used for interconnecting two computers without modem.
• So it is also a null modem cable.
55
4. What are the components involved in Ethernet cabling?
The main components are used in the Ethernet cabling are,
1. Patch Cable (Twisted pair)
2. RJ45 Connector
3. Ethernet Ports
4. Crimping Tool
5. What are the types of Fibre optic cables?
• There are two types of fibre optic cables are available are,
1. Single-mode (lOOBaseBx)
2. Multimode (lOOBaseSX).
• Single-mode cables are used for long distance transmission and at a high cost.
• Multimode cables are used for short distance transmission at a very low cost.
PART - IV
Answer the following questions:
1. What is meant by Registered Jack? Explain briefly the types of Jacks.
Registered Jacks:
• A Registered Jack commonly known as RJ is a network interface used for network cabling, wiring
and jack construction.
• The primary function of the registered jack is to connect different data equipment and telecommunication
devices.
• The registered jack refers to the male physical connector (Plug), a female physical connector (Jack) and
it’s wiring.
Types of Registered Jacks:
1. RJ-11:
• It is the most popular modem form of registered jack.
• It is found in home and office used for landline phones.
• There are 6 pins where the two pins give the transmission configuration, the two pins give the receiver
configuration and the other two pins will be kept for reserved.
2.RJ-14 andRJ-61:
• The RJ-14 is the same as RJ-11 which will be used for telephone lines where same it as 6 pins.
• The RJ-61 will have 8 pins and use the twisted pair cable with a modular 8 connection.
3.RJ-21:
• The RJ-21 connector has 50 pins with 25 pins at one end and 25 pins at the other end.
• It is also called as champ connector or Amphenol connector.
• The Amphenol is a connector manufacturer.
• The RJ-21 interface is typically used for data communication trucking applications.
2. Explain the components used in Ethernet cabling.
• Ethernet cabling is the process of connecting the computers with other devices using Ethernet cables.
• The four main components are used in the Ethernet cabling components are
o Patch Cable (Twisted pair)
o RJ45 Connector
o Ethernet Ports
o Crimping Tool

56
1) PATCH CABLE (TWISTED PAIR):
• These Cables are generally made up of 8 wires in different colors.
• Four of them are solid colours, and the others are striped.
• The eight colors are white green, green, white orange, blue, white blue, orange, white brown and brown.
2) RJ45 CONNECTOR:
• The “RJ” stands for the Registered Jack and the “45” simply refers to the interface standard.
• The RJ45 connector is a small plastic cube.
• It has eight pins.
• It is connected to each end of the Ethernet cable.
• It is also known as 8P8C connector.
• These plugs (connector) are inserted into Ethernet port of the network card.
3) ETHERNET CARD AND PORT:
• Ethernet port is an opening which is a part of an Ethernet card.
• It accepts RJ45 connector with Ethernet cable.
• It is found on personal computers, laptops, routers, switches, hubs and modems.
• Once you inject the plug into the port the two led lights will glow in the computer, one is green and another
one is orange.
• The orange light will start blinking which indicates that the Internet is connected.
4) CRIMPING TOOL:
• The crimping tool is a physical tool which is used to connect the patch wire and the Ethernet connector
(RJ45).
• The crimping tool looks like a small cutting handle with two mold of Ethernet port.
3. Explain the types of network cables
L Coaxial Cables:
• Coaxial Cables is used to connect the television sets to home antennas.
• This cable is used to transfer the information in 10 mbps.
• The cable is divided into thinnet and thicknet cables.
• These cables have a copper wire inside and insulation is covered on the top of the copper wire to provide
protection to the cable.
• These cables are very difficult to install and maintain, because they are too big to carry and replace.
2. Twisted Pair Cables:
• Twisted Pair Cable is type of cable with two or more insulated wires twisted together.
• It has 8 wires which are twisted to ignore electromagnetic interference.
• It started with the speed of 10 mbps.
• There are two types of twisted pair cables,
o Unshielded Twisted Pair (UTP)
o Shielded Twisted pair (STP).
• The UTP is used as modem cables for Internet and they are lower in cost and installation and maintenance
is easy compared to the coaxial cables.
• STP is similar to UTP, but it is covered by an additional jackets to protect the wires from External
interference.

57
3. Fiber Optics:
• Fibre Optic Cable is strands of glass and pulse of light is used to send the information.
• The optic cable uses light to transmit the information from one place to another.
• These cables are placed in deep underground to avoid any damage to the cables.
• They are mainly used in Wide Area Network (WAN).
• There are two types of fibre optic cables are available are
> Single-mode (lOOBaseBx)
> Multimode (lOOBaseSX)
• Single-mode cables are used for long distance transmission and at a high cost.
• Multimode cables are used for short distance transmission at a very low cost.
• The optic cables are easy to maintain and install.
4. USB Cables:
• The Universal Serial Bus are used to connect keyboard, mouse and other peripheral devices.
• Micro USB is a miniaturized version of the USB used for connecting mobile devices.
5. Serial and Parallel cables:
• The Serial and Parallel interface cables are used to connect the Internet to the system.
• The system will have both serial port and parallel port.
• The serial port will send 1 bit at one time whereas the parallel port will send 8 bit at one time.
6. Ethernet Cables:
• Ethernet cable is the most common type of network cable mainly used for connecting the computers or
devices at home or office.
• This cable connects wired devices within the local area network (LAN) for sharing the resources and
• accessing Internet.
• The Crossover Ethernet cable is an example of the Null modem Cables.
14. OPEN SOURCE CONCEPTS
PART -I
Choose the best answer
1. If the source code of a software is freely accessible by the public, then it is known as
a) Freeware b) Firmware c) Open source d) Public source
2. Which of the following is a software program that replicates the functioning of a computer network?
a) Network software b) Network simulation c) Network testing d) Network calculator
3. Which of the following can document every incident that happened in the simulation and are used fo
examination?
a) Net Exam b) Network hardware c) Trace file d) Net document
4. Which is an example of network simulator?
a) simulator b) TCL c) Ns2 d) C++
5. Choose the Correct Pair from the following to build NS2
a) UNIX & TCL b) UNIX & a. C++ c) C++ & OTcl d) C++ & NS2
6. Which of the following is not a network simulation software?
a) Ns2 b) OPNET c) SSFNet d) C++
7. Which of the following is a open source network monitoring software?
a) C++ b) OPNET c) Open NMS d) OMNet++
8. Open NMS was released in
a) 1999 b) 2000 c) 2003 d) 2004

58
PART - II
Answer the following questions
l.What is open source software?
• Open Source simply refers to making the source code of the software freely available for users or other
developers to use and make changes into the original repository or fork the project into and build a new
one.
2. What is meant by network simulator?
• A network simulator is a software program that replicates the functioning of a computer network.
• In simulators, the computer network is typically demonstrated with devices, traffic etc. and the
performance are evaluated.
3. What is trace file?
• A significant output of simulation is the trace files.
• Trace files can document every incident that happened in the simulation and are used for examination.
4. Write short notes on NS2.
• NS2 is the abbreviation of NETWORK SIMULATOR version 2.
• It was considered explicitly for exploration in network communication and event driven open-source
simulator in computer.
• OTCL and c++ used to create and run NS2
5. Write short note on Open NMS?
• Open NMS (Network Management System) is a free and open-source initiative grade network monitoring
and network management platform.
• It is established and maintained by a community of users ,developers and by the Open NMS Group, it
offering services, training and support.
PART - III
Answer the following questions
1. What are the uses of Open source Network Software?
• We can select and use any Open Source Software that suits our needs.
• The complete options of the software can be used without any cost and restrictions.
• We can share our ideas with the team, write the required code and share it with many.
• We can learn many ideas and make our program writing skills more efficient.
• We can add the most required features in the software by making changes
• Many open source software are very user friendly.
2. Explain Free software.
• Free software is a concept developed in the 1980s by an MIT computer science researcher, Richard
Stallman who defined four conditions - as outlined by the nonprofit Free Software Foundation.
• Freeware usually refers to proprietary software that users can download at no cost, but whose source code
cannot be changed.
• It enhances the ability of users to use and enjoy software as they see fit.
3. List out the Popular open source software.
• NS2
• OPEN NMS
» MySQL
59
• PDF Creator
• Open Office
• 7zip GNUCASH
• GIMP
• BLENDER
• AUDACITY
• VLC
• MOZILA FIREFOX
• MAGENTO
• ANDROID
• PHP.
4. Write note on open source hardware.
• The computers used by individuals or business organisations may have spy hardwares of rivals.
• Open source hardware technology helps in such threats.
• In this technique we get the components of the hardware and its circuit diagram, so that we can remove
suspicious spyware if found.
Open source hardware:
• Remix
• Remake
• Remanufacture
• Redistribute
• Resell
• Study and Learn
5. Explain Types of Organisations related to Open Source.
• Apache Software Foundation
• The Document Foundation
• The Eclipse Foundation
• Free Software Foundation
• Linux Foundation
• Open Course Ware Consortium
• Open Source Initiative
PART - IV
Answer the following questions:
1. Differentiate Proprietary and open source software.
Open Source Software Proprietary software

• It refers to the software that is developed and • It refers to the software that is solely owned by the
tested through open collaboration. individual or the organization that developed it.
• Anyone with the academic knowledge can • Only the owner or publisher who holds the legal
access, inspect, modify and redistribute the property rights of the source code can access it.
source code.
• The project is managed by an open source • The project is managed by a closed group of
community of developers and programmers. individuals or team that developed it.

60
• They are not aimed at unskilled users outside • They are focused on a limited market of both skilled
of the programming community. and unskilled end users.
• It provides better flexibility which means • There is a very limited scope of innovation with the
more freedom which encourages innovation. restrictions and all.
• Examples: Android, Firefox, LibreOffice, • Examples: Windows, macOS, iTunes, Google
Ubuntu, Free BSD, Drupal, GNOME, etc. earth, adobe Flash Player, etc.
2. List out the Benefits of Open Source Software
• We can select and use any software that suits our needs.
• The softwares can be used without any cost and restrictions.
• We can share our ideas with the team, write the required code and share it with many.
• We can learn many ideas and make our program writing skills more efficient.
• The coding in open source softwares are being groomed by many enthusiastical members of the group.
• Problems in the programs are quickly mended by the group’s effort.
• We can add the most required features in the software by making changes to the open source softwares.
• Many open source software are very user friendly.
15. E-COMMERCE
PART - 1
Choose the best answer
1. A company can be called E-Business if
a) it has many branches across the world.
b) it conduct business electronically over the Internet.
c) it sells commodities to a foreign country.
d) it has many employees.
2. Which of the following is not a tangible goods?
a) Mobile b) Mobile Apps c) Medicine d) Flower bouquet
3. SME stands for
a) Small and medium sized enterprises b) Simple and medium enterprises
c) Sound messaging enterprises d) Short messaging enterprises
4. The dotcom phenomenon deals with
a) Textile industries b) Mobile phone companies
c) Internet based companies d) All the above
5. Which of the following is not correctly matched
a) The First Wave of Electronic Commerce: 1985 -1990
b) The Second Wave of Electronic Commerce: 2004 - 2009
c) The Third Wave of Electronic Commerce: 2010 - Present
d) Dotcom burst: 2000 — 2002
6. Assertion (A): The websites of first wave dotcom companies were only in English
Reason (R): The dotcom companies of first wave are mostly American companies.
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)
c) (A) is true and (R) is false d) (A) is false and (R) is true
7. Off-shoring means
a) Work outsourced to a branch of its own company
b) Work outsourced to new employees
c) Work outsourced to a third party locally
d) Work outsourced to a third party outside its own country

61
8. G2G systems are classified into
a) Internal facing and external facing b) Internet facing and Extranet facing
c) Internal flag and external flag d) Internet flag and Extranet flag
9. host the e-books on their websites.
a) Bulk-buying sites b) Community sites c) Digital publishing sites d) Licensing sites
10. Which of the following is not a characteristics of E-Commerce
a) Products cannot be inspected physically before purchase.
b) Goods are delivered instantly.
c) Resource focus supply side
d) Scope of business is global.
PART - II
Answer the following questions
1. Define E-Commerce.
• E-Commerce can be described as the process of buying or selling products, services or information via
Internet.
• E-Commerce is currently one of the most important aspects of Internet era.
• E-stands for electronic.
2. Distinguish between E-Business and E-Commerce.
E-Business E-Commerce

• E-Business entirely depends on the Internet for its • E-Commerce is commercial transaction through
every intra-company and inter-company activities. Internet.
• E-Business is grounded on technologies such as • E-Commerce is limited with monetary
Network Infrastructures, Messaging & transactions using Internet.
information distribution infrastructures and other wledge
Common business service infrastructures.
• E-Business is a superset of E-Commerce. • E-Commerce is a subset of E-Business.
3. Differentiate tangible goods and electronic goods with example of your own.
Tangible form Electronic form
• Tangible form - e.g. a digital camera purchased • Electronic form - e.g. a music album or software
by a consumer from an online shopping website downloaded from a site which might be delivered
which might be delivered at the requested in electronic form.
address.
4. What is dotcom bubble and dotcom burst?
Dotcom Bubble:
• The Dotcom Bubble was a historic excessive growth (excessive assumption) of economy that occurred
roughly between 1995 and 2000.
• It was also a period of extreme growth in the usage and adaptation of the Internet as well.
Dotcom Burst:
• The Nasdaq-Composite stock market index, fell from 5046.86 to 1114.11.
• This is infamously, known as the Dotcom Crash or Dotcom Burst.
• This began on March 11, 2000 and lasted until October 9, 2002.
5. Write a short note on out-sourcing.
• Out-Sourcing is hiring third party service providers to handle business on behalf.
• If a company’s work is hired to another company, it would be termed as out-sourcing.
62
PART - III
Answer the following questions
1. Describe how E-Commerce is related to socio-technological changes.
• Growth of E-Commerce is also related to the socio-technological changes.
• The more, the medium becomes deep rooted, the more, are the users drawn towards it.
• Increase of users, increases the markets.
• As the markets expand, more business organizations are attracted.
• The more businesses accumulate it create competition.
• The competition leads to innovation; innovation in turn drives the development of technology; technology
facilitates E-Commerce’s growth.
2. Write a short note on the third wave of E-Commerce.
• The third wave is brought on by the mobile technologies.
• It connects users via mobile devices for real-time and on-demand transactions.
• Not only the information is filtered by time, but also the geographic coordinates are used to screen the
specific location-tailored information properly.
• The term Web 3.0, summarize the various characteristics of the future Internet which include Artificial
Intelligence, Semantic Web, Generic Database etc.
3. Explain B2B module in E-Commerce.
• In B2B E-Commerce, commercial transactions take place between different business organizations,
through the Internet.
• Example:
• A cycle company may buy tyres from another company for their cycles.
• When compared to other models, the value per transaction in B2B transaction is high, because of bulk
purchases.
• The company also might get the advantage of discounts on bulk purchases.
4. Write a note on name-your-price websites.
• Name-your-price sites are just like normal retail sites.
• In contrast, the buyer negotiates with the retailer for a particular product or service.
• Example: https://in.hotels.com/ .
5. Write a note on physical product dispute of E-Commerce.
• Physical product disputes are a major disadvantage in E-Commerce.
• E-Commerce purchases are often made on trust because, we do not have physical access to the product.
• Though Internet is an effective channel for visual and auditory information but not senses.
• We can see pictures of the perfumes, but could not smell their fragrance.
• If we want to inspect something, we choose what we look at and how we look at it.
• But in online shopping, we would see only the pictures the seller had chosen for us.
• People are often much more comfortable in buying the generic goods rather than unique or complex things
via the Internet.
PART - IV
Answer the following questions:
1. List all the E-Commerce business models and explain any four briefly.
1. Business to Business (B2B)
2, Business to Consumer (B2C)

63
3. Business to Government (B2G)
4. Consumer to Business (C2B)
5. Consumer to Consumer (C2C)
6. Consumer to Government (C2G)
7. Government to Business (G2B)
8. Government to Consumer (G2C)
9. Government to Government (G2G)
Business to Business (B2B)
• In B2B E-Commerce, commercial transactions take place between different business organizations, through
the Internet.
• For example, a cycle company may buy tyres from another company for their cycles.
• When compared to other models, the value per transaction in B2B transaction is high, because of bulk
purchases.
Business to Consumer (B2C)
• In B2C E-Commerce, commercial transactions take place between business firms and their consumers.
• It is the direct trade between companies and end-consumers via the Internet.
• An example of B2C transaction is a book company selling books to customers.
• This mode is intended to benefit the consumer and can say B2C .
• E-Commerce works as ’retail store’ over Internet.
Consumer to Government (C2G)
• Citizens as Consumers and Government engage in C2G E-Commerce.
• Here an individual consumer interacts with the Government.
• C2G models usually include income tax or house tax payments, fees for issuance of certificates or other
documents.
• People paying for renewal of license online may also fall under this category.
Government to Business (G2B)
• G2B is closely related to B2G.
• G2B in E-Commerce refers to a business model where Government providing services or information to
business organization.
• It may be a formal offer such as a takeover bid for a road project.
2. Explain any five E-Commerce revenue models.
1. AUCTION SITE
• It is a kind of website, that auctions items on the Internet and levies some commission from the sales.
• Example: https://www.ebay.com/
2. BANNER ADVERTISEMENT SITE
• It displays advertisements of other companies in its websites and thereby earns revenue.
3. BULK-BUYING SITES
• It collects a number of users together all of who want to buy similar items; the site negotiates a discount
with the supplier and takes a commission.
• Example: https://www.alibaba.com/
4. DIGITAL PUBLISHING SITES
• It effectively host the e-books or magazines on the web.
• They make profits in a number of ways such as advertising, selling etc., https://wordpress.org/
64
5. LICENSING SITES
• It allows other websites to make use of their software.
6. NAME-YOUR-PRICE SITES
• They are just like normal retail sites.
• In contrast, the buyer negotiates with the retailer for a particular product or service.
• Example: https://in.hotels.com/
4. How would you differentiate a traditional commerce and E-Commerce? (any 7)
Traditional Commerce E-Commerce
• Traditional commerce is buying or selling of • E-Commerce carries out commercial
products and services physically. transactions electronically on the Internet.
• Customer can easily identify, authenticate and • Neither customer nor merchant see the other.
talk to the merchant.
• Physical stores are not feasible to be open all • It is always available on all time and all days
the time. of the year.
• Products can be inspected physically before • Products can’t be inspected physically before
purchase. purchase.
• Scope of business is limited to particular area. • Scope of business is global. Vendors can
expand their business Worldwide.
• Resource focus Supply side. • Resource focus Demand side.

• Business Relationship is Linear. • Business Relationship is End-to-end.

• Marketing is one way marketing. • One-to-one marketing.


• Payment is made by cash, cheque, cards etc. rje Payment system is mostly credit card and
through fund transfer.
• Most goods are delivered instantly. • It takes time to transport goods.

16. ELECTRONIC PAYMENT SYSTEMS


PART - 1
Choose the best answer
1. Based on the monetary value e payment system can be classified into
a) Mirco and Macro b) Micro and Nano
c) Maximum and Minimum d) Maximum and Macro
2. refers to a payment made from one bank account to another bank account using electronic methods.
a) Electronic payment b) Direct payment
c) Indirect payment d) None of the above
3. Assertion (A): Micro electronic payment systems support higher value payments.
Reason (R): Expensive cryptographic operations are included in macro payments
a) Both (A) and (R) are correct and (R) is the correct explanation of (A)
b) Both (A) and (R) are correct, but (R) is not the correct explanation of (A)
c) (A) is true and (R) is false
d) (A) is false and (R) is true
4. Which of the following is correctly matched
a) Credit Cards - pay before b) Debit Cards - pay now
c) Stored Value Card - pay later d) Smart card - pay anytime
65
5. ECS stands for
a) Electronic Clearing Services b) Electronic Cloning Services
c) Electronic Clearing Station d) Electronic Cloning Station
6. Which of the following is a online payment system for small payments?
a) Card based payment b) Micro electronic payment
c) Macro electronic payment d) Credit card payment
7. Which of the following is true about Virtual payment address (VPA)
a) Customers can use their e-mail id as VPA b) VPA does not includes numbers
c) VPA is a unique ID d) Multiple bank accounts cannot have single VPA
8. Pick the odd one in the credit card transaction
a) card holder b) merchant c) marketing manager d) acquirer
9. Which of the following is true about debit card
i. debit cards cannot be used in ATMs
ii. debit cards cannot be used in online transactions
iii. debit cards do not need bank accounts
iv. debit cards and credit cards are identical in physical properties
a) i, ii, iii b) ii, iii, iv c) iii alone d) iv alone
10. Match the following
List A List B
Al) First Digit Bl) Account number
A2) 9th to 15th Digit B2) Mil Code
A3) First 6 Digits B3) BIN Code
A4) Last Digit B4) Check digit

Al A2 A3 A4
a) B4 B3 B2 B1 b) B2 Bl B3 B4 c)B2B3B4Bl d)B2B4B3Bl

PART - II
Answer the following questions
1. Define electronic payment system
• An Electronic payment system is a financial arrangement that consists an intermediator to facilitate
transfer of money-substitute between a payer and a receiver.
2. Distinguish micro electronic payment and macro electronic payment
MICRO ELECTRONIC PAYMENT MACRO ELECTRONIC PAYMENT
• Online payment system designed to allow • Macro electronic payment systems support
efficient and frequent payments of small payments of higher value.
amounts.
• The communication and computational costs are • The security requirements are more rigorous
minimized here to keep transaction costs very because of huge money transactions.
low.
3. Explain the concept of e-wallet
• Electronic wallets (e-wallets) or electronic purses allow users to make electronic transactions quickly and
securely over the Internet through smartphones or computers.
4. Write a short note on credit card?
• Credit card is an electronic payment system normally used for retail transactions.
• A Credit card plays a major role in electronic payment system worldwide.
• Every credit card account has a purchase limit set by the issuing bank or the firm.
5. What is smart card?
• The modem version of card based payment is smart cards.
• Smart cards along with the regular features of any card based payment system holds a EMV chip.
• This chip is similar to well-known sim card in appearance but differ in its functionalities.
PART -III
Answer the following questions
1. Define micro electronic payment and its role in E-Commerce.
• Micro Electronic Payment is an on-line payment system designed to allow efficient and frequent payments
of small amounts.
Role in E-Commerce:
• An e-commerce payment system facilitates the acceptance of electronic payment for online transaction.
• E-commerce payment systems have become increasingly popular due to the widespread use of internet¬
based shopping and banking.
2. Compare and contrast the credit card and debit card.
CREDIT CARD DEBIT CARD
• Pay Later System • Pay Now System
• The credit card issuer lends money to customer • The debit card deducts the amount directly from
with an agreed interest. customer’s bank account.
• The bank account is not prerequisite for issuing a • The bank account is must for issuing a debit card.
credit card.
3. Explain briefly Anatomy of a credit card.
• All Payment cards are usually plastic cards of size 85.60 mm width x 53.98 mm height, rounded comers
with a radius of 2.88 mm to 3.48 mm and thickness of 0.76 mm.
• These standards dimensions are maintained universally in accordance with ISO/IEC 7810#ID-l.
4. Briefly explain the stored value card and its types.
• Stored value card is a type of debit card that is pre-loaded with certain amount(value), with which a
payment is made.
TYPES OF STORED VALUE CARD:
i) Closed loop (single purpose)
• Money is metaphorically stored on the card in the form of binary-coded data.
ii) Open loop (multipurpose)
• Open loop cards can be used to make debit transaction at variety of retailers.
5. What is electronic fund transfer?
• Electronic Funds Transfer (EFT) is the “electronic transfer” of money over an online network.
• The amount sent from the sender’s bank branch is credited to the receiver’s bank branch on the same day
in batches.
• EFT saves the effort of sending a demand draft through post and the inherent delay in reaching the money
to the receiver.
PART -IV
Answer the following questions:
1. Explain the key players of a credit card payment system.

67
1. Bearer:
• The holder of the credit card account who is responsible for payment of invoices in full (transactor) or a
portion of the balance (revolver) the rest accrues interest and carried forward.
2. Merchant:
• Storekeeper or vendor who sell or providing service, receiving payment made by its customers through the
credit card.
3. Acquirer:

requests to the issuing bank through the appropriate channels.


4. Credit Card Network:
• It acts as the intermediate between the banks.
• The Company responsible for communicating the transaction between the acquirer and the credit card
issuer.
• These entities operate the networks that process credit card payments worldwide and levy interchange
fees.
• E.g. Visa, MasterCard, Rupay
5. Issuer:
• Bearer’s bank, that issue the credit card, set limit of purchases, decides the approval of transactions,
issue invoices for payment, charges the holders in case of default and offer card-linked products such as
insurance, additional cards and rewards plan.
2. Write a note on a. Internet banking b. Mobile banking
a) Internet banking
• Internet banking is a collective term for E-banking, online banking, virtual banking, direct banks,web
banking and remote banking.
• Internet banking allows customers of a financial institution to conduct various financial transactions on a
secure website operated by the banking institutions.
• This is a very fast and convenient way of performing any banking transactions.
• It enables customers of a bank to conduct a wide range of financial transactions through its website.
• In fact, it is like a branch exclusively operating of an individual customer.
• The online banking system will typically connect to the core banking system operated by customers
themselves (Self-service banking).
b) Mobile banking
• Mobile banking is another form of net banking.
• The term mobile banking (also called m-banking) refers to the services provided by the bank to the
customer to conduct banking transactions with the aid of mobile phones.
• These transactions include balance checking, account transfers, payments, purchases, etc.
• Transactions can be done at anytime and anywhere.
• The WAP protocol installed on a mobile phone helps the user have a permanent control over the account
and remote management of his own finances.
3. Explain in detail : Unified payments interface
• Unified Payments Interface (UPI) is a real-time payment system developed by National Payments
Corporation of India (NCPI) to facilitate inter-bank transactions.
• It is simple, secure and instant payment facility.
68
• This interface is regulated by the Reserve Bank of India and used for transferring funds instantly between
two bank accounts through mobile (platform) devices, http://www.npci.org.in/
• UPI withdraws and deposits funds directly from the bank account whenever a transaction is requested.
• It also provides the “peer to peer” collect request which can be scheduled and paid as per requirement and
convenience.
• UPI is developed on the basis of Immediate Payment Service (IMPS).
• To initiate a transaction, UPI applications use two types of address - global and local.
• Global address includes bank account numbers and IFSC.
• Local address is a virtual payment address.
• Virtual payment address (VPA) also called as UPI-ID, is a unique ID enable us to send and receive money
from multiple banks and prepaid payment issuers.
• Bank or the financial institution allows the customer to generate VPA using phone number associated with
Aadhaar number and bank account number.
• VPA replaces bank account details thereby completely hides critical information.
• The MPIN (Mobile banking Personal Identification number) is required to confirm each payment.
• UPI allows operating multiple bank accounts in a single mobile application.

17. E-COMMERCE SECURITY SYSTEMS


PART -I
Choose the best answer
1. In E-Commerce, when a stolen credit card is used to make a purchase it is termed as
a) Friendly fraud b) Clean fraud Q Triangulation fraud d) Cyber squatting
2. Which of the following is not a security element involved in E-Commerce?
a) Authenticity b) Confidentiality c) Fishing d) Privacy
3. Asymmetric encryption use keys for encryption and decryption
a) Same b) Different c) Positive d) Negative
4. The security authentication technology does not includes
i) Digital Signatures ii) Digital Currency
iii) Digital Image iv) Digital Certificates
a) i & iv b) ii & iii c) i, ii & iii d) all the above
5. PGP stands for
a) Pretty Good Privacy b) Pretty Good Person
c) Private Good Privacy d) Private Good Person
6. protocol is used for securing credit cards transactions via the Internet
a) Secure Electronic Transaction (SET) b) Credit Card Verification
c) Symmetric Key Encryption d) Public Key Encryption
7. Secure Electronic Transaction (SET) was developed in
a) 1999 b) 1996 c) 1969 d) 1997
8. The websites secured by Secure Socket Layer protocols can be identified using
a) html:// b) http:// c) htmls:// d) https://
9. is the process of converting plain text into meaningless cipher text
a) Encryption b) Decryption c) Digital certificate d) Digital signature
10.Which of the following is true about Ransomware
a) Ransomware is not a subset of malware b) Ransomware deletes the file instantly
c) Typopiracy is a form of ransomware d) Hackers demand ransom from the victim
PART - II
Answer the following questions
1. Write about information leakage in E-Commerce.
• The leakage of trade secrets in E-Commerce mainly includes two aspects:
(a) The content of the transaction between the vendor and customer is stolen by the third party;
(b) The documents provided by the merchant to the customer or vice versa are illegally used by others.
• This intercepting and stealing of online documents is called information leakage.
2. Write a short note on Typopiracy.
• Typopiracy is a variant of Cyber Squatting.
• Some fake websites try to take advantage of users’ common typographical errors in typing a website
address and direct users to a different website.
• Such people try to take advantage of some popular websites to generate accidental traffic for their
websites.
• Example: www.goggle.com, www.faceblook.com
3. Write about phishing?
• Phishing is acquiring critical data like login credentials through telephone, sms, e-mail or any social
media by the crackers disguising as authentic.
4. List the different types of security technologies in E-Commerce
The security technologies in E-Commerce transactions are classified into
• Encryption technology
• Authentication technology
• Authentication protocols
5. Write about digital signature.
• A digital signature is a mechanism that is used to verify that a particular digital document, message or
transaction is authentic.
PART - III
Answer the following questions
1. What is E-Commerce Security system?
• E-Commerce security is a set of protocols that safely guide E-Commerce transactions through the Internet.
• Security has become a critical factor and core issue in the emerging E-business.
• Solving the security problems in transactions is the basis for ensuring the smooth development of E-
business.
2. List some E-Commerce Security Threats?
• Information leakage
• Tampering
• Payment frauds
• Malicious code threats
• Distributed Denial of Service (DDoS) Attacks
• Cyber Squatting
• Typopiracy
3. Write a note on asymmetric key encryption?
• Different keys are used for encryption and decryption
• Speed of encryption or decryption is comparatively slow
70
• The size of cipher text is always greater than plain text.
• Algorithms like RSA, ECC, DSA use asymmetric key encryption
• Provides confidentiality, authenticity and non-repudiation
4. Write a note on digital certificate?
• A digital certificate is an electronic document used to prove the ownership of a public key.
• This certificate includes the information about the sender’s identity, digital signature and a public key.
• A digital certificate function is similar to the function of identification cards such as passports and driving
licenses.
5. Write about plain text and cipher text?
plain text
• It is the unencrypted information also called as input chip
cipher text
• It is the encrypted data usually the output of an encryption algorithm
PART - IV
Answer the following questions:
1. Write about dimensions of E-Commerce Security.
•Authenticity: Conforming genuineness of data shared.
•Availability: Prevention against data delay or removal.
•Completeness: Unification of all business information.
•Confidentiality: Protecting data against unauthorized disclosure.
• Effectiveness: Effective handling of hardware, software and data.
•Integrity: Prevention of the data being unaltered or modified.
•Non-repudiation: Prevention against violation agreement after the deal.
•Privacy: Prevention of customers’ personal data being used by others.
•Reliability: Providing a reliable identification of the individuals or businesses.
•Review Ability: Capability of monitoring activities to audit and track the operations.
2. Differentiate symmetric key and asymmetric key encryption.?
Symmetric Key Encryption Asymmetric Key Encryption
• Same key is used for both encryption and • Different keys are used for encryption and
decryption decryption
• Speed of encryption or decryption is very fast • Speed of encryption or decryption is
comparatively slow
• Plain text and cipher text are of same size • The size of cipher text is always greater than
plain text.
• Algorithms like DES, AES, RC4 uses symmetric • Algorithms like RSA, ECC, DSA use
key encryption asymmetric key encryption
• Provides confidentiality • Provides confidentiality, authenticity and non¬
repudiation
• The number of key used grows exponentially • The number of key used grows linearly with the
with the number of users number of users

71
Secure Electronic Transaction
• Secure Electronic Transaction (SET) is a security protocol for electronic payments with credit cards, in
particular via the Internet.
• SET was developed in 1996 by VISA and MasterCard, with the participation of GTE, IBM, Microsoft
and Netscape.
• The implementation of SET is based on the use of digital signatures and the encryption of transmitted
data with asymmetric and symmetric encryption algorithms.
• SET also use dual signatures to ensure the privacy.
Secure Sockets Layers
• The most common Cryptographic protocol is Secure Sockets Layers (SSL). SSL is a hybrid encryption
protocol for securing transactions over the Internet.
• The SSL standard was developed by Netscape in collaboration with MasterCard, Bank of America,
MCI and Silicon Graphics.
• It is based on a public key cryptography process to ensure the security of data transmission over the
internet.
• Its principle is to establish a secure communication channel (encrypted) between a client and a server
after an authentication step.
18. ELECTRONIC DATA INTERCHANGE- EDI
PART - 1
Choose the best answer
1. EDI stands for
a) Electronic Details Information b) Electronic Data Information
c) Electronic Data Interchange d) Electronic Details Interchange
2. Which of the following is an internationally recognized standard format for EDI?
a) TSLFACT b) SETFACT c) FTPFACT d) EDIFACT
3. Which is the first industry-specific EDI standard?
a) TDCC b) VISA c) Master d) ANSI
4. Which of the following is a type of EDI?
a) Direct EDI b) Indirect EDI c) Collective EDI d) Unique EDI
5. Who is called as the father of EDI?
a) Charles Babbage b) Ed Guilbert c) Pascal d) None of the above
PART -II
Answer the following questions
1. Define EDI.
• The Electronic Data Interchange (EDI) is the exchange of business documents between one trade partner
and another electronically.
• It is transferred through a dedicated channel or through the Internet in a predefined format without much
human intervention.
2. List few types of business documents that are transmitted through EDI.
• Delivery Notes
• Invoices
• Purchase
• Orders
• Advance Ship Notice
72
• Functional Acknowledgements
3. Write any two EDI standard?
• The most widely used EDI message standards are the United Nations
• EDIFACT
• ANSI X12.
PART - III
Answer the following questions
1. Write a short note on EDI via VAN
• The Electronic Data Interchange (EDI) is the exchange of business documents such as delivery notes,
invoices etc., between one trade partner and another electronically.
• It is transferred through a dedicated channel or through the Internet in a predefined format without much
human intervention.
2. List the various layers of EDI.
• Electronic data interchange architecture specifies four different layers namely,
> Semantic layer
> Standards translation layer
> Transport layer
> Physical layer
3. Write a note on UN/EDIFACT.
• United Nations / Electronic Data Interchange for Administration, Commerce and Transport (UN /
EDIFACT) is an international EDI - standard developed under the supervision of the United Nations.
• In 1987, the UN / EDIFACT syntax rules were approved as ISO: ISO9735 standard by the International
Organization for Standardization.
• EDIFACT includes a set of internationally agreed standards, catalogs and guidelines for electronic
exchange of structured data between independent computer systems.
PART - IV
Answer the following questions:
1. Briefly explain types of EDI.
The types of EDI were constructed based on how EDI communication connections and the conversion were
organized.
EDI Types:
• Direct EDI
• EDI via VAN
• EDI via FTP/VPN, SFTP, FTPS
• Web EDI
•Mobile EDI
Direct EDI/Point-to-Point:
• It is also called as Point-to-Point EDI.
• It establishes a direct connection between various business stakeholders and partners individually.
• This type of EDI suits to larger businesses with a lot of day to day business transactions.
EDI via VAN:
• EDI via VAN (Value Added Network) is where EDI documents are transferred with the support of third
party network service providers.

73
• Many businesses prefer this network model to protect them from the updating ongoing complexities of
• network technologies.
EDI via FTP/VPN, SFTP, FTPS:
• When protocols like FTP/VPN, SFTP and FTPS are used for exchange of EDI based documents through
the Internet or Intranet it is called as EDI via FTP/VPN, SFTP, FTPS.
• Web EDI Web based EDI conducts EDI using an web browser via the Internet.
• Here the businesses are allowed to use any browser to transfer data to their business partners.
• Web based EDI is easy and convenient for small and medium organizations.
Web EDI
• Web based EDI conducts EDI using an web browser via the Internet.
• The businesses are allowed to use any browser to transfer data to their business partners.
• Web based EDI is easy and convenient for small and medium organizations.
Mobile EDI
• When smartphones or other such handheld devices are used to transfer EDI documents it is called as
mobile EDI.
• Mobile EDI applications considerably increase the speed of EDI transactions.
2. What are the advantages of EDI?
• EDI was developed to solve the problems inherent in paper-based transaction processing and in other
forms of electronic communication.
• Implementing EDI system offers a company greater control over its supply chain and allow it to trade
more effectively.
• It also increases productivity and promotes operational efficiency.
• The following are the other advantages of EDI.
> Improving service to end users
> Increasing productivity
> Minimizing errors
> Slashing response times
> Automation of operations
> Cutting costs
> Integrating all business and trading partners
> Providing information on process status
> Optimizing financial ratios

74

You might also like