Plus Two Business Studies Notes Chapter 1 Nature and Significance of Management

Kerala State Board New Syllabus Plus Two Business Studies Notes Chapter 1 Nature and Significance of Management.

Kerala Plus Two Business Studies Notes Chapter 1 Nature and Significance of Management

Management – Meaning & Definition

Management is a group activity which co-ordinates human resources and non – human resources in order to attain the objectives of an organization. It includes ‘ planning, organizing, staffing, directing, coordinating and controlling.

Definitions:
“Management is the art of getting things done through other people.” – Mary Parker Follet
“Management is what a manager does.” – Peter F. Drucker
Management is Essential for the success of an organization. It ensures proper use of factors of production like men, material, machinery, methods and money.

Efficiency and Effectiveness of Management

Efficiency and effectiveness are both commonly used management terms. Efficiency means whatever we produce or perform; it should be done in a perfect way. Efficiency refers to doing things in a right manner. It is defined as the output to input ratio and focuses on getting the maximum output with minimum resources. Effectiveness has a broader approach, which means the extent to which the actual results have been achieved to fulfill the desired outcome, ie, doing accurate things. Being Effective is about doing the right things, while being efficient is about doing things right.

Difference between Efficiency and Effectiveness:

Efficiency Effectiveness
1) Work is to be done in a correct manner 1) Doing accurate work only
2) Emphasis is on inputs and outputs 2) Emphasis on means and ends
3) Short run objective 3) Long run objective
4) Narrow concept (Introverted) 4) Wide concept (Extroverted)
5) Aims at strategy implementation 5) Aims at strategy formulation

Characteristics/Nature of Management

1. Management is goal oriented.
2. Management is universal in character.
3. Management is multidimensional, which include

  • Management of works
  • Management of people
  • Management of operations

4. It is a continuous process.
5. It is a group activity.
6. It is a dynamic function
7. It is an intangible force.

Objectives of Management

Management fulfills three basic objectives like organisational, social and personal.
1. Organisational Objectives: Management is responsible for setting and achieving objectives forthe organisation. It includes:

  • Survival: Management must strive to ensure the survival of the organization.
  • Profit: Management has to ensure that the organization makes reasonable profit.
  • Growth: management must exploit fully the growth potential of the organization.

2. Social objectives: Social objectives are defined as the fulfillment of responsibility of an organisation towards society. They are:

  • Providing quality goods to consumers at reasonable price.
  • Using environmental friendly methods of production.
  • Giving employment opportunities to the society.
  • Providing basic amenities like hospitals, schools, etc., to the employees and general public.
  • Payment of taxes to the government.

3. Personal objectives: It refers to the objectives to be determined with respect to employees of the organisation. They are:

  • Giving adequate remuneration.
  • Providing good working environment.
  • Participation in management and providing a share in the profit.
  • Opportunities for training and development.

Management has to reconcile personal objectives with organisational objectives for harmony in the organisation.

Need and Importance of Management

1. Achieving Group Goals: Efficient management co-ordinates all the activities for the achievement of organisational goals.
2. Increases Efficiency: Management helps to reduce costs and increase productivity through better planning, organising, directing, staffing and controlling the activities of the organisation.
3. Creates Dynamic Organisation: A good management enables the business to adapt and adjust according to the changes in the business environment.
4. Achieving Personal Objectives: Through motivation and leadership, the management helps individuals to develop team spirit, co-operation and commitment to group success.
5. Development of Society: Management helps to provide good quality products and services, creates employment opportunities, adopts new technology, etc., for the good of the people and the society.

Management as an Art

Management is an art. Art is the skilful and personal application of existing knowledge to achieve desired results.
The basic features of an art are as follows:

  1. Existence of theoretical knowledge
  2. Personal skill
  3. Based on practice and creativity

Management can be said to be an art since it satisfies the following criteria.

  • There is a lot of literature available in various areas of Management like marketing, finance etc. which gives the critical knowledge.
  • A manager uses his personal skill and knowledge in the area of management.
  • Management is one of the most creative arts as it is concerned with getting work done through others by motivating them.
  • Like other arts, managerial efficiency is developed through practice.

That is why management can be said as an art.

Management as a Science

Science is a systematised body of knowledge that is based on general truths. The features of science are as follows.

  1. Science is a systematic body of knowledge.
  2. Scientific principles are developed through experiments.
  3. Universal validity and application.

Management can be treated as a science because:

  • Management has a systematized body of knowledge.
  • Management principles are developed after scientific enquiry, experimentation and observation.
  • Management principles are applicable to all types of organizations.

So management is also called a science.

Management as a Profession

Profession means an occupation for which specialized knowledge and skills are required. The main features of profession are as follows.

  1. Well defined body of knowledge
  2. Formal education and training
  3. Professional Associations

Management is a profession because:

  • Management is based on a systematic body of knowledge comprising well defined principles.
  • A manager acquires management skills through formal education and training.
  • All professions are affiliated to a professional association which regulates entry and frame code of conduct relating to the profession.

Levels of Management

There are three levels in the hierarchy of an organisation. They are:

  1. Top-Level Management
  2. Middle-Level Management
  3. Lower-Level Management

Plus Two Business Studies Notes Chapter 1 Nature and Significance of Management 1

1. Top Management: It consists of chairman, the Chief Executive Officer, Board of Directors, Managing Director, etc.

Functions of Top Level Management:

  • Lays down the objectives of the business
  • Prepares strategic plans and policies
  • Appoint middle level managers
  • Issues necessary instructions to departmental heads.
  • To maintain relations with outside agencies like govt, public, trade unions, etc.
  • Co-ordinate and control all the departments in the organisation

2. Middle Management: All the functional department heads and branch managers come under the category of middle level managers. E.g. Production manager, Sales manager, Finance manager, etc.,

Functions of Middle Level Management:

  • Carry out the plans formulated by the top managers.
  • To act as a link between Top Level Management and Lower Level Management.
  • Assign necessary duties and responsibilities to the subordinates.
  • Motivate them to achieve desired objectives.
  • Co-operate with other departments.
  • Reporting to top level management.

3. Lower/Supervisory/Operational Management: This level includes foremen, supervisors, finance and accounts officers, sales officers, etc. This level of managers have direct contact with employees.

Functions of Lower Level Management:

  • Plan day-to-day production activities.
  • Assign workers to different jobs
  • Solve the problems of workers
  • Provide job training to workers
  • Looking after safety of workers.
  • Send periodical reports to middle level management.
  • Act as a link between management and employees.

Functions of Management

1. Planning: Planning is the function of determining in advance what is to be done and who is to do it.
2. Organising: It is the management function of assigning duties, grouping tasks, establishing authority responsibility relationship and allocating resources required to carry out a specific plan.
3. Staffing: Staffing means finding the right people with the right qualifications to accomplish the goals of the organisation. It involves activities such as recruitment, selection, placement and training of personnel.
4. Directing: Directing involves leading, supervising, communicating and motivating the employees to perform the tasks assigned to them.
5. Controlling: It means monitoring organizational performance towards the attainment of organisational goals.

Co-ordination

The process by which a manager synchronises the activities of different departments is known as co-ordination. Co-ordination is the force that binds all the other functions of management.

Characteristics of Co-ordination:

  • Co-ordination integrates group efforts of different departments
  • Co-ordination ensures unity of action
  • Co-ordination is a continuous process
  • Co-ordination is an all pervasive function
  • Co-ordination is the responsibility of all managers
  • Co-ordination is a deliberate function

Importance of Co-ordination:

  • It increases efficiency: Co-ordination increases organisational efficiency.
  • Key to other functions: Co-ordination is the key to other managerial functions. Co-ordination makes planning more effective, organisation more well-knit and control more regulative.
  • Functional differentiation: The process of linking the activities of various departments is accomplished by co-ordination.
  • Unity in diversity: In an organization, there are large numbers of employees with different ideas, culture, etc. Co-ordination brings unity in diversity.
  • Specialisation: Co-ordination helps to co-ordinate the efforts of various specialists in ah organisation.

Plus Two Computer Science Chapter Wise Previous Questions Chapter 12 ICT and Society

Kerala State Board New Syllabus Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 12 ICT and Society.

Kerala Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 12 ICT and Society

Question 1
a) Name a digital financial instrument. [MARCH -2016] (1)
b) Discuss about various IPRs with examples for each. (3)
Answer:
a) Credit card or Debit card or ATM machine or Swipe machine
b) Refer Sectionl2.2.1 Intellectual Property Right.

Question 2
Givethegoal of Computer forensics. [May-2016] (1)
Answer:
Critical evidence of a particular crime is available in electronic format with the help of computer foren¬sics. It helps to identify the criminal.

Question 3.
Explain different categories of cybercrimes against the government. [May-2016] (3)
Answer:
Just like normal crimes( theft, trespassing private area, destroy, etc,) Cyber crimes(Virus, Trojan Horse, Phishing, Denial of Service, Pornography etc) also increased significantly . Due to cyber crime, the victims lose money, reputation,etc and some ofthem commit suicide.

A) Cyber crimes against individuals
i) Identity theft: The various information such as personal details(name, Date of Birth, Address, Phone number etc.), Credit / Debit Card details(Card number, PIN, Expiry Date, CW, etc), Bank details, etc. are the identity of a person. Stealing these information by acting as the authorized person without the permission of a person is called Identity theft. The misuse of this information is a punishable offence.

ii) Harassment : Commenting badly about a particular person’s gender, colour, race, religion, nationality, in Social Media is considered as harassment. This is done with the help of Internet is called Cyber stalking (Nuisance). This is a kind of torturing and it may lead to spoil friend ship, career, self image and confidence. Sometimes may lead to a big tragedy of a whole family or a group of persons.

iii) Impersonation and cheating : Fake accounts are created in Social Medias and act as the original one for the purpose of cheating or misleading others. Eg: F.ake accounts in Social Medias (Facebook, Twitter,etc), fake sms, fake emails etc.

iv) Violation of privacy : Trespassing into another person’s life and try to spoil the life. It is a punishable offence. Hidden camera is used to capture the video or picture and black mailing them.

v) Dissemination of obscene material: With the help of hidden camera capture unwanted video or picture. Distribute or publish this obscene clips on Internet without the consent of the victims may mislead the people specifically the younger ones.

B) Cyber crimes against property
Stealing credit card details, hacking passwords of social media accounts or mail account or Net banking, uploading latest movies etc, are considered as cyber crimes against property.

i) Credit card fraud : Stealing the details such as credit card number, company name, expiry date, cw number,password etc. and use these details to make payment for purchasing goods ortransfer funds also.

ii) Intellectual property theft: The violation of Intellectual Property Right of Copy right, Trademark, Patent etc. In film industry crores of investment is needed to create a movie. Intellectual Property thieves upload the movies on the Releasing day itself. Hence the revenue from the theatres are less significantly and undergoes huge loss.(Eg: Premam, Bahubali, etc) Copying a person’s creation and present as a new creation is called plagiarism. This can be identified some tools(programs) available in the Internet.

iii) Internet time theft : This is deals with the misuse of WiFi Internet facility. If it is not protected by good password there is a chance of misuse our devices(Modem/Router) to access Internet without our consent by unauthorized persons. Hence our money and volume of data(Package) will lose and we may face the consequences if others make any crimes.

C) Cyber crimes against government
The cyber crimes against Govt, websites is increased significantly. For example in 2015 the website of Registration Department of Kerala is hacked and destroys data from 2012 onwards.

i) Cyber terrorism : It is deals with the attacks against very sensitive computer networks like computer controlled atomic energy power plants, air traffic controls, Gas line controls, telecom, Metro rail controls, Satellites etc. This is a very serious matter and may lead to huge loss (money and life of citizens). So Govt, is very conscious and give tight security mechanism for their services.

ii) Website defacement : It means spoil or hacking websites and posting bad comments about the Govt.

iii) Attacks against e-governance websites : Its main target is a Web server. Due to this attack the Web server/ computer forced to restart and this results refusal of service to the genuine users. If we want to access a website first you have to type the web site address in the URL and press Enter key, the browser requests that page from the web server. Dos attacks send huge number of requests to the web server until it collapses due to the load and stops functioning.

Question 4.
a) An Educational channel of Kerala Government is [MARCH -2017] (1)
b) Discuss about the schemes used in protecting intellectual property. (3)
Answer:
a) VICTERS.
b) Intellectual property is divided into two categories
1) Industrial Property
2) Copy right

1) Industrial property
It ensures the protection of industrial inventions, designs, Agricultural products etc from unauthorized copying or creation or use. In India this is done by Controller of Patents Designs and Trademarks.

• Patents
A person or organization invented a product or a creation can be protected from unauthorized copying or creation without the permission of the creator by law. This right is called Patent. In India the validity of the right is up to 20 years. After this anybody can use freely.

• Trademark
This is a unique, simple and memorable – sign to promote a brand and hence increase the business and goodwill of a company, it must be registered. The period of registration is for 10 years and can be renewed. The registered trademark under Controller General of Patents Design and Trademarks cannot use or copy by anybody else.

• Industrial designs:
A product or article is designed so beautifully to attract the customers. This type of designs is called industrial design. This is a prototype and used as a model for large scale production.

• Geographical indications
Some products are well known by the place of its origin. Kozhikkodan Halwa, Marayoor Sharkkara(Jaggery), Thirupathi Ladoo, etc are the examples.

2) Copyright
The trade mark is ©, copy right is the property right that arises automatically when a person creates a new work by his own and by Law it Prevents the others from the unauthorized or intentional copying of this without the permission of the creator for 60 years after the death of the author.

Attributes Patent Trademark Copyright
Items Product, Process Name, Logo, Signs Creativity, artistic
Registration Required Yes Yes No(Automatic)
Duration 20 years 10 years Upto60 years after the death ofthe author
Renewable No Yes NA

Plus Two Computer Science Chapter Wise Previous Questions Chapter 11 Advances in Computing

Kerala State Board New Syllabus Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 11 Advances in Computing.

Kerala Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 11 Advances in Computing

Question 1.
a) The computing technology in which a problem is broken into pieces and solved concurrently is called …………….. [March -2016] (1)
b) Categorize the cloud service models. (3)
Answer:
a) Parallel or Distributed computing
b) Refer 5 Mark, Question 1

Question 2.
Give any three advantages and disadvantages of grid computing. [May – 2016] (3)
Answer:
Refer 3 Mark, Question 11

Question 3.
a) A widely used operating system for cluster computers is ………….. [March -2017] (1)
b) Discuss advantages of grid computing, cluster computing and cloud computing. (3)
Answer:
a) Any OS
b) 1) Grid computing advantages

  • It is used to solve more complex problems in a short time
  • Existing hardware used efficiently
  • Scalable : The number of computers can be added according to the work load increases.

2) Cluster computing Advantages

  • Price-performance ratio: The performance is high and the cost is less.
  • Availability : If one group of system fails the other group will do the work. Scalability: Computers can be easily added according to the work load increases.

3) Cloud computing
Advantages

  • Cost savings : Companies can reduce costs by using cloud computing
  • scalability/ Flexibility: More resources are used when the work load increases.
  • Reliability : It is reliable and helps in disaster recovery
  • Maintenance : The service provider do the system maintenance, then reducing maintenance requirements.
  • Mobile accessible : Employees can do their job even when they are in move.

Plus Two Computer Science Chapter Wise Assess Questions and Answers

Question 1.
Explain the features of distributed computing.
Answer:
Distributed computing is a method of computing in which large problems can be divided into smaller ones and these smaller ones are distributed among several computers. The solution for the smaller ones are computed separately and simultaneously. Finally the results are assembled to get the desired overall solution.

Advantages:

  • Economical: Reduces the computing cost hence it is economical
  • Speed : The work load of the entire system is less hence the speed is high.
  • Reliability : When one computer in the network fails the entire work will not be blocked, i.e. the other computers will do the work properly.
  • Scalability : We can add computers according to the work load.

Question 2.
Compare parallel and serial computing.
Answer:
The difference between these two is given below,

Serial computing Parallel computing
A single processor is used Multiple processors are used with shared memory
A problem is divided into a series of instructions A problem is divided into smaller ones that can be solved simultaneously
Instructions executed sequentially Instructions executed simultaneously
One instruction is executed on a single processor at any moment More than one instruction is executed on multiple processors at any moment of time.

Question 3.
The distributed paradigm that uses existing hardware is ___________
Answer:
effectively

Question 4.
List advantages of cluster computing.
Answer:
The advantages of cluster computing is given below.

  • Price-performance ratio: The performance is high and the cost is less.
  • Availability: If one group of system fails the other group will do the work.
  • Scalability : Computers can be easily added according to the work load increases.

Question 5.
Explain how cloud service model change the way we use computers.
Answer:
It is an emerging computing technology. Here with the use of Internet and central remote servers to maintain data and applications. Example forthis is Email service, Office Software(word processor, spread sheets, presentations, data base etc), graphic software etc. The information is placed in a central remote server just like clouds in the sky hence the name cloud computing.

Cloud service models (3 major services)
1) Software as a Service (SaaS): A SaaS provider company provides more services on demand such as they allow to access both resources and applications.

Examples are Google Docs, Adobe creative cloud, Microsoft Office 365, Facebook.com etc.

2) Platform as a Service(PaaS): A PaaS provider company provides subscribers access to the components that they, require to develop and operate applications over the Internet.

Example : LAMP platform(Linux,Apache Server,MySQL and PHP), ASP.NET, PHP and Python, Google’s App Engine, Microsoft Azure, Force.com, etc.

3) Infrastructure as a Service(laaS): It provides basic storage devices and computing capabilities as standardized services over the network.

Example: Amazon Web Services, Joyent, AT&T, GoGrid etc.

Question 6.
Give example for companies that offer SaaS.
Answer:
A SaaS provider company provides more services on demand such as they allow to access both resources and applications. Examples are Google Docs, Adobe creative cloud, Microsoft Office 365, Facebook.com etc.

Question 7.
List the advantages and limitations of cloud computing.
Answer:
Advantages

  • Cost savings : Companies can reduce costs by using cloud computing
  • Scalability/ Flexibility: More resources are used when the work load increases.
  • Reliability : It is reliable and helps in disaster recovery
  • Maintenance: The service provider do the system maintenance, then reducing maintenance requirements.
  • Mobile accessible : Employees can do their job even when they are in move.

Disadvantages:

  • Security and privacy Security measurements must be applied otherwise the data will be misused
  • Lack of standards : Clouds have no standards so it is not possible to export or import programs.

Question 8.
Draw and explain the knowledge pyramid.
Plus Two Computer Science Chapter Wise Previous Questions Chapter 11 Advances in Computing 1
Answer:
Data is termed as a collection of mere symbols. While processing data we get information and knowledge is the organized information. It can be a piece of information that helps in decision making. The ability to draw useful inferences from the available knowledge is generally referred as intelligence. Wisdom is the maturity of the mind that directs its intelligence to achieve desirable goals.

Question 9.
What is Computational Intelligence?
Answer:
Earlier machines were used to do our work. But with the invention of digital computers, we use computers to solve time-consuming and complex tasks faced in real life. The main goal is to make the interaction of machines is more and man less. The study of man and machine interactions and control methods are known as Cybernetics.

Question 10.
Define Cybernetics?
Answer:
The study of man and machine interactions and control methods are known as Cybernetics.

Question 11.
The test used tõ to decide whether a machine is intelligent or not ¡s called _________.
Answer:
Turing test.

Question 12
What is ANN?
Answer:
Artificial Neural Networks(ANN) : The brain is a complex, nonlinear and parallel computer with ability to perform tasks such as recognise pattern, perception and motor control.ANN is the method of simulate biological neural systems to learn, memorise and generalize like human beings. A human brain cortex consists of 10-500 billion neurons with 60 trillion synâpses(a synapse is a stwcture that permits a neuron to pass an electrical)

Question 13
Explain Swarm Intelligence
Answer:
Swarm Intelligence is the study of behaviour of colonies or groups of social animals, birds, insects. ants etc. How they communicate and create and manage their own colonies beautifully.

Question 14.
Explain Fuzzy Systems
Answer:
Human beings use common sense while facing a problem, just like human beings fuzzy systems can also use common sense and behave like a human beings. Fuzzy systems ¡s used to control gear transmission and raking systems, control lifts, home appliances, controlling traffic signals etc.

Question 15.
List some uses of biometrics.
Answer:
Biometrics are used in the attendance management system, authentication in computers and other devices, Aadhar cards, etc.

Question 16.
Write the uses of robotics.
Answer:
Robotics are used in all the areas. Some of them are discussed below.

  1. Uses in vehicle manufacturing industry : Robots are used to do all tasks such as welding, cutting, lifting, sorting and bending. Since it is a machine, it can operate for long hours untiringly.
  2. Exploration of outer space : Robots are very much useful in this field such as they are used to do all the tasks related to launch a satellite.
  3. In intelligent homes : Robots are used in home segments to safe guard the home, automatically open the gate, doors and windows, etc.
  4. Exploration in difficult environments : Human beings are not ready to work in situations like too hot and too cold. Since it is a machine robots are used instead of human beings. Robots are used in oil filed etc.
  5. Uses in military : Unmanned air crafts and vehicles are controlled by robots. Drones and computer-controlled cameras are used in Military service.
  6. Uses in agriculture : Nowadays in India the agriculture field is also in mechanization trend. Hence increase the productivity.

Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP

Kerala State Board New Syllabus Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 10 Server Side Scripting Using PHP.

Kerala Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 10 Server Side Scripting Using PHP

Question 1.
PHP is [March – 2016]
(a) freeware
(b) proletary
(c) both
(d) none (1)
Answer:
(a) freeware

Question 2
a) Compare Indexed and associative arrays in PHP. [March – 2016] (2)
b) Write a PHP program to display prime numbers below 50. (3)
OR
Write a PHP program to display the perfect numbers below 100. (3)
Answer:
a) In PHP array is a collection of key and value pairs. Unlike C++, in PHP we can use either non-negative integers or strings as keys.

Different types of arrays in PHP

  • Indexed arrays
  • Associate arrays
  • Multi dimensional arrays.

Indexed arrays-: The elements in an array can be distinguished as first or second or third etc. by the indices and the index of the first element is zero. In PHP the function array() is used to create an array.
Syntax: $array_name=array(valuel ,value2 );
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 47
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 48
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 49

Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 1
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 2

Question 3.
An array in PHP is given as follows: [May – 2016]
Sfamily = array (“Father”=>”Ajay”, “Son”=>”Arjun”, “Daughter”=>” “Archana”);
Name the type of this array. Write a for each loop that prints all the array elements. (2)
Answer:
This array is called associative array <? PHP
$family = array (“Father” = > “Ajay”, “Son” => “Arjun”, “Daughter” = > “Archana”);
foreach($family as $key =>$name) echo “$key – $name”. “, “;
?>

Question 4
A web server that supports PHP on any operating system is _____________ . [May – 2016] (1)
Answer:
Apache / LAMP/ WAMP

Question 5.
Discuss about special data types used in PHP. [May – 2016] (2)
Answer:
Special data types

  • Null: Special data type with value NULL. This is the default value to a variable, if we do not set a value to it.
    $m=null;
  • Array: Array is a collection of elements. With the same name we can store many elements.
    Three types of array –

    • Indexed array:
    • Associated array:
    • Multidimensional array:
  • Object: Similar in C++ and must be declared explicitly. At first a class is declared and then objects can be created using the command ‘new’.
  • Resources: It is not an actual data type rather it is a special variable that hold references to file handler, data base object, etc.

Question 6.
Create an HTML form in PHP showing the difference of the GET and POST method. [May – 2016]
OR
Write a function in PHP to find the factorial of a (3)
Answer:
The difference between GET and POST method is given below.

Get method  Post method
1) Faster  1) Slower
2) Tosendsmallvolume of data.  2) To send large volume of data
3) Up to 2000 characters  3) No limit
4) Less secure  4) More secure
5) Data visible during submission  5) Data not visible during submission
6) Page link can be book marked  6) Page link can never be book marked.

OR
Step 1
Take a note pad and type the following and save it as fact_form.html in C:\Abyss Web Server\htdocs
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 3

Step2
Take another notepad and type the following and save it as fact.php in C:\Abyss Web Server\htdocs
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 4

Step 3
Open Internet Explorer and type the following in the address bar
http://localhost/fact_form.html.

Plus Two Computer Science Chapter Wise Practice Questions and Answers

Question 1.
Write a PHP program to display the multiplication table of 5.
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 5

Question 2.
Write a PHP program to display all palindrome numbers between 100 and 200.
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 6

Question 3.
Write a PHP program to display all Armstrong numbers below 1000.
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 7

Question 4.
Display the following table using PHP and HTML. Each cell should display the row number and column number of the cell. You are supposed to use the PHP loop statement to generate the table.
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 8
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 9
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 10

Question 5.
Write a program to find the biggest of three numbers.
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 11
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 12

Question 6.
Create a registration form which contains the fields Name, Roll No, General and a submit button. Write a PHP script which accepts these details and display it back on the browser when the user clicks the submit button.
Answer:
Step 1
Take a notepad and type the following
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 13

Step 2
Take another notepad and type the following
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 14
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 15

Step 3.
Run the first file.

Question 7.
Write a PHP script for the following. Design a form to accept a string. Write a function to count the total number of vowels (a, e, i, o, u) from the string.
Answer:
Step 1
Take a notepad and type the following
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 16

Step 2
Take another notepad and type the following
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 17
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 18
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 19

Question 8.
Create a table in MySQL and insert a few records. Write a PHP script script to display the inserted records on a browser.
Answer:
Step 1
Take MySQL and create a table as follows
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 20

Step 2
Take a notepad and type the following and run.
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 21
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 22
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 23
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 24

Question 9.
Create a table in MySQL and insert a few records. Write a PHP script to accept a value using a form, search the value in the database and display the record on a browser.
Answer:
Step 1.
Take a notepad and type the following. Save it as practiceQ9.html.

<html>
<head>
<title>
form
</title>
</head>
<body bgcolor=”cyan”>
<form method - ’post” action=”practiceQ9.php”>
Enter the Item code:
<input type=”text” name=”itemcode”><br>
<inputtype=’’submit” value=”submit”>
</form>
</body>
</html>

Step 2.
Take another notepad and type the following and save it as practiceQ9.php.
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 26
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 27
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 28

Step 3.
Run the file practice9.html
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 29
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 30

Plus Two Computer Science Chapter Wise Assess Questions and Answers

Question 1
Which of the following functions returns 1 when the output is successful?
a) echo ()
b) print ()
c) both
d) None
Answer:
b) print()

Question 2.
Which of the following printing constructs accepts multiple parameters?
a) echo
b) print
c) printf
d) All of the above
Answer:
a) echo

Question 3
Which one of the following should not be used while sending password or other sensitive information?
a) Get
b) Post
c) Request
d) Next
Answer:
a) Get

Question 4
Which of the following functions returns the number of characters in a string variable?
a) count($variable)
b) ien($variable)
c) strcount($variable)
d) strlen(Svariable)
Answer:
d) strlen($variable)

Question 5
Which of the following variables is not a predefined variable?
a) $GET
b) $ASK
c) SREQUEST
d) $POST
Answer:
b) $ASK

Question 6
When $_GET variable is used to collect data, the data is visible to
a) none
b) only you
c) everyone
d) selected few
Answer:
c) everyone.

Question 7
When $_POST variable is used to collect data, the data is visible to
a) none
b) only you
c) everyone
d) selected few
Answer:
a) none

Question 8
Which variable is used to collect form data sent with both the GET and POST methods?
a) %Both
b) $_Both
c) $Request
d) $_Request
Answer:
d) $_Request

Question 9.
Which one of the following parameters is not used mysql_connect()?
a) database host
b) user ID
c) password
d) database name
Answer:
d) database name

Question 10
Study the following steps and determine the correct order
i) Open a connection to MySQL server
ii) Execute the SQL, query
iii) Fetch the data from query
iv) Select database
v) Close Connections
a) 1, 4, 2, 3, 5
b) 4, 1, 2, 3, 5
c) 1, 5, 4, 2, 1
d) 4, 1, 3, 2, 5
Answer:
a) 1, 4, 2, 3, 5.

Question 11.
What is PHP?
Answer:
Sip Formerly it is known as Personal Home Pages. Nowadays PHP stands for PHP Hypertext Preprocessor. Normally, it runs on a web server.

Question 12.
What is the difference between PHP and JavaScript?
Answer:
Client-side scripts(JavaScript) are run faster but it has some limitations. The limitations are we can view the source code hence it is less secure. On the other hand PHP is executed on the server and the result is sent back to the client(browser) so it is impossible to view the source code.

Benefits of using PHP
Client-side scripts(JavaScript) are run faster but it has some limitations. The limitations are we can view the source code hence it is less secure. On the other hand PHP is executed on the server and the result is sent back to the client(browser) so it is impossible to view the source code.

Benefits of PHP are given below

  • As PHP can be easily embedded into HTML moreover its easiness to convert a static website into a dynamic one.
  • It is compatible with almost all databases
  • It is platform-independent can run on almost all OS (Windows, Linux, MAC)
  • It is simple and easy to learn
  • It uses very small amount of system resources to run and faster.
  • PHP provides security to prevent malicious attacks.
  • Open-source community supports PHP
  • It is a free s/w by all means hence can be used to develop all types of web sites.

Question 13.
What are the steps involved in running a PHP?
Answer:
Take a note pad and type the code, PHP code should begin with <?php and end with ?>. Save this file in the root directory of the web server with extension php.

Step 1
Take a notepad and type the following and save it as first.php on C:\Abyss Web Server\htdocs.
<?php
echo”My first PHP web page”;
?>

Step 2
Start the web server if it is off

Step 3
Type as “http://localhost/first.php” in the address bar.
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 31

Question 14
What is the use of “echo” in PHP?
Answer:
echo is an output statement, echo is used to produce multiple outputs. Parenthesis is optional.
eg:
echo “ first output”, “second output”;
or
echo (“ first output”, “second output”);

Question 15
What is the use of ‘print’ in PHP?
Answer:
print is an output statement, print is used to produce single outputs. It tales only one parameter and it is slower. It Returns TRUE or 1 on successful print and FALSE otherwise:
print “only one output”;
or
print (“only one output”);

Question 16.
What are the differences between “echo” and “print” statements?
Answer:
The difference between echo and print

echo print
take more than one parameter only one parameter
Does not return any value Returns TRUE or 1 on successful print and FALSE otherwise
Faster slower

Question 17.
Why is PHP superior to client-side languages such as JavaScript?
Answer:
Benefits of using PHP
Client-side scripts(JavaScript) are run faster but it has some limitations. The limitations are we can view the source code hence it is less secure. On the other hand PHP is executed on the server and the result is sent back to the client (browser) so it is impossible to view the source code.

Benefits of PHP are given below

  • As PHP can be easily embedded into HTML moreover its easiness to convert a static website into dynamic one.
  • It is compatible with almost all databases
  • It is platform-independent can run on almost all OS (Windows, Linux, MAC)
  • It is simple and easy to learn
  • It uses very small amount of system resources to run and faster.
  • PHP provides security to prevent malicious attacks.
  • Open-source community supports PHP
  • It is a free s/w by all means hence can be used to develop all types of web sites.

Question 18.
Which character is used to terminate a PHP statement? Name one situation where omitting this termination character does not produce an error.
Answer:
In PHP each and every statement must be end with semicolon. There is an exception for the last statement. For the last statement of PHP code semicolon is not compulsory.

Question 19.
What is an escape sequence? Name three commonly used escape sequences.
Answer:
Escape sequences
It is a character preceded by a back slash(\)

Operator Definition Example Output
\” To print “ echo TPHPY”’ “PHP”
\’ To print ‘ echo”XYian” X’ian
\n New line echo “BVM \nHSS” BVM HSS
\t To print tab echo”BVM\tHSS” BVM HSS
\r Print carriage return
\$ To print S echo “100\$” 100$
\\ To print\ echo’’\\n is used as new line” \n is used as new line

Question 20.
What will be the output of the following PHP scripts?
a) <?php
echo “Today looks \nbright and sunny”;
?>

b) <?php
echo “ours not to question why;”;
echo “ours but to do and die”;
?>

c) <?php
$x = 8 ;
$y = 8 ;
echo (sx = = sy) ;
?>
Answer:
a) Today looks bright and sunny
b)
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 32
C) 1

Question 21.
Find the error in each of the following PHP scripts:
a) <?php
/* print a line of output /
echo ‘hello’
?>

b) <?php
echo ‘<p align=”right”>Copyright Me, 2008</p>’;
?>

c) <?php
echo‘Line 1;
?>
Answer:
a) There is an error
Un terminated comment line The correct code is as follows
<?php
/‘print a line of output*/
echo’hello’
?>

b) no error.
c) String must be enclosed in single or double quotes. The correct code is as follows.
<?php
echo’Line 1‘;
?>

Question 22.
Which are the different types of loops in PHP?
Answer:
Loops in PHP

a) while loop
It is an entry controlled loop The syntax is given below
Loop variable initialised

while(expression)
{
Body of the loop;
Update loop variable;
}

Here the loop variable must be initialised out side the while loop. Then the expression is evaluated, if it is true then only the body of the loop will be executed and the loop variable must be updated inside the body. The body of the loop will be executed until the expression becomes false.

<?php
$i=10;
while($i>0)
{
echo”$i\t”;
$i - ;
}
?>

b) do-while loop
This loop will execute at least once. The body of the loop will be executed until the expression becomes false,

do
{
Body of the loop;
Update loop variable;
}while(expression);
Eg.
<?php
$i=10;
do
{
echo”$i\t”;
Si- -;
}while(Si>0);
?>

c) for loop
The syntax of for loop is given below For(initialisation; testing; updation)

{
Body of the for loop;
}
Eg.
<!DOCTYPE HTML>
<html lang=”en”>
<head>
<title>
We are learning PHP
</title>
</head>
<body bgcolor=”cyan”>
<?php
for($i=10;$i>0;$i- -)
echo”$i\t”;
?>
</body>
</html>

d) foreach loops(Extension of for loop)
The number of elements in an array is not known in advance foreach loop is used.

Two types
a) for ($array_variable_name as $value)
No need to specify the starting index and ending index, the array pointer is moved one by one.
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 35

b) foreach($array_variable_name as key=>$value) Here the value of the current array element is assigned to $value and the key is assigned to $key.
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 36

Question 23
How do we declare an array in php?
Answer:
Arrays in PHP
In PHP array is a collection of key and value pairs. Unlike C++, in PHP we can use either non-negative integers or strings as keys.

Different types of arrays in PHP

  • Indexed arrays
  • Associate arrays
  • Multi dimensional arrays.

Indexed arrays: The elements in an array can be distinguished as first or second or third etc. by the indices and the index of the first element is zero. In PHP the function array() is used to create an array.

Syntax: $array_name=array(value1 ,value2,……….);
OR
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 37

2 Associative arrays
Arräys with named keys and string indices are called associative arrays.
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 38
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 39

Question 24
What is the importance of “action” attribute in an HTML, form?
Answer:
The action attribute in an HTML form specifies the file name the data to be submitted. When the submit button in the form is clicked the data is submitted to the file specified in the action attribute.

Question 25
How can we extract the string “hotmail.com” from a string “scert@hotmail.com”?
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 40
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 41

Question 26.
What will be the output of the folloiwng code?
$a = 10;
if($a> 5cr< 15)
echo ‘true’;
else
echo ‘false’;
Answer:
An error occurred the correct code and output is as follows

<?php
$a=10;
if($a>5or$a<15)
echo 'true’;
else
echo’false’;
?>
The out put is true.

Question 27.
What will be the output of the following code? (1)

function fn ($var)
{
$var = $var - ($var/10*5);
return $var;
}
echo fn (100);

Answer:
The output is 50.

Question 28.
How do super global arrays help programming in PHP?
Answer:
This is a special variable available to all programs.

Superglobal Purpose
GLOBALS Global scope variables available.
$_SERVER Information about the server
$_GET Data passed using the HTTP GET method
$_POST Data passed using the HTTP POST method
$_REQUEST Data passed via HTTP request
$_FILES Data passed by an HTML file input
S_SESSION Current session data specific to the user
S_COOKIE Data stored on the browser.

Question 29
What is the use of $ SERVER?
Answer:
PHP $_SERVER
This returns the paths and script locations.

Code Description
$_SERVER [‘PHP_SELF’] Returns the currently executing file name
$_SERVER [‘SERVER_NAME’] Returns the host server name
$ SERVER [‘SCRIPT_NAME’] same as $_SERVER[‘PHP_SELF]

Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 42
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 43
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 44

Question 30
What are the difference between GET and POST methods in form submitting? (5)
Answer:
The difference between GET and POST method is given below.

Get method Post method
1. Faster 1. Slower
2. To send small volume of data. 2 To send large volume of data
3. Up to 2000 characters 3. No limit
4. Less secure 4. More secure
5. Data visible during submission 5. Data not visible during submission
6. Page link can be book marked 6. Page link can never be book marked.

Question 31
While submitting a form, the URL displayed on the address barwas http://localhost:8080 check2.php? exam=March2014&web=www.dhsekerala.gov.in Can you identify which method was used here?
Answer:
The method used was GET method because it displayed all the data during data submission.

Question 32
While trying to open a dynamic webpage from a . bookmark saved earlier, the webpage did not show properly. What could be the reason for this?
Answer:
The reason for this is that the method used for data submission is POST method. It is invisible to others that is the variables are not displayed in the URL hence it is not possible to bookmark the page.

Question 33
How do we create a MySQL connection?
Answer:
Establishing connection to MySQL database To access data from the data base, the PHP program first establish a connection to the data base server(MySQL) and then specify the data base to use.

Consider the following
1) Open a connection to MySQL.
2) Secify the data base we want to open.
3) Retrieve data from or insert data in to dat base.
4) Close the connection.

Question 34
How do we select a MySQL database from PHP?
Answer:
MySQL server may contain many data bases. mysqi_select_db() is a function used to select pa, ocular data base. It return true if it finds the data base otherwise false.
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 45
Plus Two Computer Science Chapter Wise Previous Questions Chapter 10 Server Side Scripting Using PHP 46

Question 35
How do we execute an SQL query? How to fetch its result?
Answer:
Two steps
a) Execute the SQL query on the data base using the function mysql_query()
Syntax:
$result_set=mysql7_query(query, connection);
b) I nsert a row using the function mysql_fetch_array()
$result_set=mysql_query(query, connection);
$fetched_row=mysql_fetch_array($result_set);

Plus Two Computer Science Chapter Wise Previous Questions Chapter 9 Structured Query Language

Kerala State Board New Syllabus Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 9 Structured Query Language.

Kerala Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 9 Structured Query Language

Question 1.
The keyword is used in a SELECT statement to avoid duplicate rows. [March – 2008] (1)
Answer:
Distinct

Question 2.
The columns used in a table are called ……………………….. [March – 2008] (1)
Answer:
Attributes

Question 3.
Manju wants to create a table for a new inventory application. The table contains the details of products in a shop. The details are item code, description, stock quantity, reorder level. Write SQL commands to create this table with necessary constraints. [March – 2008] (3)
a) Itencode should not be empty for any row and it must be primary key.
b) Description should have some value.
c) The reorder level should be at least 10.
Answer:
Create table inventory item code mt not null primary key, despite char(30) not null.ock_qty mt, rol mt);

Question 4.
Name any two aggregate functions. [March – 2008] (1)
Answer:
SUM().AVG()

Question 5.
A village hospital has maintained a database for pa-tients with fields IPNO primary key varchar(10), Patient Name varchar(20), Age number(3), Roomno number(3) Write SQL queries to do the following: [February – 2008] (5)
a) Modify the table by adding field Doctor name not null
b) Update Doctor name field with a value ‘LINDA’ for a particular record with IPNO=30
c) Display all patients group by Doctors name.
d) Display all patients in the age group 20 to 30 years age
e) Display details of all patients whose name start with ‘An’
Answer:
a) Alter table patient add(Doctorname char(20) not null);
b) Update patient set Doctorname= ‘LINDA’where IPNO=30;
c) Select ‘from patient group by Doctorname;
d) Select * from patient where age between 20 and 30;
e) Select * from patient where PatientName like ‘An%’;

Question 6.
Duplication of data is called __________ [February – 2008] (1)
Answer:
Data Redundancy

Question 7.
Explain aggregate functions. [February – 2008] (3)
OR
Write any four Aggregate functions in SQL and its use.
Answer:
1) Sum() – To find the total of column name specified as the argument.
2) Avg()- To find the average of column name speci-fied as the argument.
3) Min() – To find the smallest value of column name specified as the argument.
4) Max() – To find the largest value of column name specified as the argument.
5) Count()- To find the number of values in the col-umn specified as the Argument.

Question 8.
Which command is used to remove a table from a database? [February – 2008] (1)
Answer:
DROP TABLE <table name>

Question 9.
View can be used just like a table. Then what is the purpose of creating view? [February – 2008] (2)
Answer:
A view is a virtual table. That means it really does not exist. We can create a view based upon a table. If we create a view all users cannot see the entire data base.

It gives high security.

Question 10.
Ceena wants to delete the records or all commerce Students having marks less than 35 from the table named Student. Write the SQL command for this. Name, Reg No,subject and marks are the fields of the table. [March – 2009] (2)
Answer:
Delete from Student where Subject-Commerce’ and Marks<35.

Question 11.
Which key word can be used with SELECT command to avoid duplication of rows in the selection? [March – 2009] (1)
Answer:
Distinct

Question 12.
A company wants to create a table to store the stock details. Write SQL commands for the following. [June – 2009] (5)
1) Create a table with name stock and fields item code, name, qty, and unit price.
2) Insert 2 records into the table.
3) Display the items in the ascending order of name.
4) List all the items where qty is less than 10
5) List all items with a price greater than 100.
The name field is char type and the others are numeric.
Answer:
1) Create table stock(itemcode decimal(4), name char(25),qty decimal(4),pricedecimal(8,2));
2) insert into stock values (101, ‘Pears’, 1000,48);
3) select name from stock order by name;
4) select name from stock where qty < 10;
5) select name from stock where price < 100;

Question 13.
What are the features of Data manipulation language which makes it attractive? [June – 2009] (2)
Answer:
DML related to the instance of the database provides commands for inserting rows into the table, deleting rows from the table. It also facilitates the modification of the Contents of the tables and it allows the retrieval of information from the database. The DML commands are inserted, update, delete, and select.

Question 14.
Prabha created a table in SQL with 10 records. Which DML command is used to change the values in a column of specified rows? Write the format also. [June – 2009] (2)
Answer:
The update is the DML command used to change the values in a column of specified rows. The keyword set is used and the clause where is also used to change the specified row. The syntax is given below: Update <table name> set <column name> = value where <condition>;

Ex: update Student set age =17 where rollno = 1;

Question 15.
Write a query on the CUSTOMER table whose output will exclude all customers with a RATING <=100, unless they are located in Kochi. [February – 2009] (2)
Answer:
Select * from CUSTOMER where RATING <=100 and Place= ‘Kochi’

Question 16.
A table BANK consists of fields A/c. No, Customer Name, age,Type of deposits (Savings, Current, Fixed), Deposited Amount.

Write SQL statements to [March – 2010] (5)
a) Display A/c. No. and Customer Name whose age is greater than 60.
b) Display A/c.No. and Customer Name of those who having Savings A/c.
c) Display the Customer Names which starting with the alphabet A.
d) Display the A/c. No. and Customers Names of those who deposited above 1 lakh rupees as Fixed Deposit.
e) To include a new field Address.
Answer:
a) Select Acc No, Name from Bankwhere age>=60;
b) Select accno, name from Bank where type_of_deposits=’savings’;
c) Select name from Bank where name like‘A%’;
d) Select accno, name from Bank where type_of_deposits=‘savings’and amount>100000;
e) Alter table Bank add (Address char(30))

Question 17.
Find the odd one out. [March – 2010] (1)
(a)Oracle
(b) SQLServer
(c) DDL
(d) MySql
Answer:
DDL

Question 18
Can you find any alternate keys in the following table? Justify your answer. [March – 2010] (2)

Reg_no Roll_no Year Name
1 1 2001 Ramya
2 2 2001 Resmi
3 3 2001 Sheeba
4 1 2002 Sona
5 2 2002 Soumya

Answer:
The candidate key that is not the primary key is called the alternate key. Here the candidate keys are Reg.No, Roll No.+year, Roll No. + name. If we set Reg.No. as the primary key then the other keys are alternate keys.

Question 19.
A table Student consists of fields Rollno, Name, Batch and Mark. [June – 2010]
Write SQL statements to
a) Display Rollno and Name of Students where mark is less than 90 and greater than 70.
b) Display Rollno and Name of all Students in science batch whose mark is more than 90.
c) Display Names of all Students in Commerce and Humanities batches.
d) Display the Rollno and Name in the ascending order of batch and descending order of Mark.
e) Display the number of Students in each batch. (5)
Answer:
a) Select RollNo.Name from Student where Mark<90 and Mark > 70;
b) Select RollNo.Name from Student where . Batch-Science’ and Mark > 90;
c) Select Name from Student where Batch- Com-merce’ OrBatch=’Humanities‘;
d) Select RollNo.Name from Student order by Batch, Mark desc;
e) Select Batch,Count(Mark) from Student group by Batch;

Question 20.
Write the essential clause required for each of the following SQL command. [June – 2010]
a) Insert Into
b) Select
c) Update
Answer:
a) Insert Into – Values
b) Select – From
c) Update – Set

Question 21
Write the syntax of Create Table Command. [June – 2010] (2)
Answer:
Create table <table name>(<column name> <datatype> [(size)] [<column constraints-],<column names <datatype> [(size)] [<column constraints>],);

Question 22.
Consider the following table Student: [March -2011] (3)

Name  Sex  Course  Per
Sandeep  M  Science  85
Martin  M  Commerce  70
Shiji  F  Commerce  75

a) Write a query to display names and percent of all mate Students in the Science branch.
b) Write an UPDATE command to set the Course attribute with ‘Humanities’ whose NAME is “Shiji”.
Answer:
a) select Name, Per from Student where Sex=’M’ and Course=’Science’;
b) Update Student set Course=’Humanities’ where Name-Shiji’;

Question 23.
The SQL Data Manipulation Language (DML) includes a Query language based on relational algebra. [March -2011] (3)
a) Give any four commands used in DML.
b) Write an SQL statement to INSERT values to the fields (adm_no, name, course, percent) with values (101, “Anoop”, “Science”, 75) for the table STUD.
Answer:
a) Insert, delete, select and update
b) insert into STUD values(101,’Anoop’,’Science’,75);

Question 24.
Tina wants to create a t^ble named mark with the fields name, regno, mark 1, mark 2 and total. Write the SQL commands to create the table with regno as primary key. [March – 2012] (3)
Answer:
Create table mark(name char(20), regno decimal(4) not null primary key,mark1 decimal(3), mark2 decimal^), total decimal(3));

Question 25
While naming a table in SQL, Reena typed ‘Select’ as thetable name. Isthere any mistake? Give reason. [March – 2012] (3)
Answer:
Yes, The Key words (Reserved words) or commands cannot used to name a table. Select is a keyword.

Question 26.
Give the correct syntax of the queries in SQL for the following: [March – 2016]
a) Renaming a table
b) Deleting rows from a tble .
C) Changing definition of a column
d) Removing columns from a table
e) Addinganewcolumn (5)
Answer:
a) Alter table <table name>
Rename to <New table name>

b) Delete from <table name>
[where <condition>];

c) Alter table <table name>
modify <column name>cdata type>
[<size>] [<constraint>];

d) Altertable <table narne>drop <column name>;

e) Altertable<table name> add <column name>
<data type> [<size>] [<constraint>];

Question 27.
Give the output obtained with the pattern match ‘i—”In the string board. [March – 2016] (1)
Answer:
“_ _ _” matches any string of exactly 3 characters without any space in between them, Hence “board” will not select.

Question 28.
What happens when we use DELETE FROM command without AWHERE clause? [May – 2016] (1)
Answer:
All the tu pies (rows/records) are deleted from the table.

Question 29.
Ifa table named mark” has field’s regNo. subcode and marks write SQL statements for the following: [May – 2016]
a) List the subject codes eliminating duplicates.
b) List the marks obtained by Students with subject codes 3001 and 3002.
c) Arrange the table based on marks for each source
d) List all the Students who have obtained marks above 90 for the subject codes 3001 and 3002.
e) List the contents of the table in the descending order of marks. (5)
Answer:
a) Select distinct subcode from mark;
b) Select marks from mark where subCode= 3001 orsubCode = 3002;
c) Select * from mark order by subcode, marks;
d) Select * from mark where subcode in (3001,3002) and marks >90;
e) Select *from mark order by marks desc;

Question 30
Distinguish between DDL and DML and give examples for each type. [May – 2016] (5)
Answer:
Data Definition Language(DDL) – It is used to define the structure of a table.

Data Definition Language is used to specify the definitions of Database Schema. The result of the compilation of DDL statements is a set of tables stored in a special file called data dictionary.

DDL Commands are Create table, Alter table and Drop table.

Data Manipulation Language(DML) – It is used to add, retrieve, modify and delete records in a database.lt is a language that enable users to access or manipulate data in the database. It also provides interfaces with programming languages.

DML Commands are select, insert, update and delete

Question 31.
Null values in tables are specified as “null”. State whether true or false. [May – 2016] (1)
Answer:
False. (without double quotes i.e. null is then it is true.)

Question 32.
Which command is used to delete the table? [May – 2017]
a) delete from
b) drop table
c) deletetable
d) dropview (1)
Answer:
b) drop table

Question 33.
Differentiate between CHAR and VARCHAR data types in SQL. [May – 2017] (3)
Answer:
Char – It is used to store fixed number of characters. It is declared as char(size).

Varchar – It is used to store-characters but it uses only enough memory.

It is declared as varchar(size).

Question 34.
Name the most appropriate SQL data type required to store the following data: [May – 2017]
a) Name of a Student (maximum 70 characters)
b) Date of Birth of a Student
c) Percentage of marks obtained (correct to 2 decimal places) (3)
Answer:
a) varchar
b) date
c) decimal

Question 35.
As part of your school project you are asked to create a relation Student.contains the details of 10 Students with the fields Roll No., Name, Date of Birth and Score in IT. The constraints required are – Roll No. is the primary key, name cannot be empty and score in IT should be less than 60. Based on this table Student answerthe following queries in relational algebra.
a) Display the details of Students whose-score is greater than 50.
b) Display the name of Students whose score lies between 45 and or equal to 60. [May – 2017] (5)
Answer:
Student

Roll No Name Date Of Birth IT Score
1 Raju 15.04.2003 55
2 Leo 25.03.2003 43
3 Geo 15.05.2003 44
4 Alvis 15.02.2003 56
5 Adeline 15.10.2002 54
6 Ann 25.01.2003 34
7 Andrea 11.04.2003 57
8 Jose 17.04.2003 34
9 Christy 13.03.2003 43
10 George 22.04.2003 40

a) σIT_Score > 50 (Student)

Roll No Name Date Of Birth IT Score
1 Raju 15.04.2003 55
4 Alvis 15.02.2003 56
5 Adeline 15.10.2002 54
7 Andrea 11.04.2003 57

b) π Name (σ IT_Score > 45 and IT_Score<=60 (Student))

Name
Raju
Alvis
Adeline
Andrea

Plus Two Computer Science Chapter Wise Practice Questions and Answers

Question 1.
The structure of a table is given to store the details of marks scored by Students in an examination. (5 Mark)

Data Type Description
Register number Numeric A unique and essential data to identify a student
Name String A maximum of 30 characters
Course String It can be Science, Commerce or Humanities
Marks of six subjects Numeric each Six separate columns are required

Write SQL statements for the creation of the table and the following requirements:
a) Insert data into the fields (at least 10 records).
b) Display the details of all Students.
c) List the details of Science group Students.
d) Count the number of Students in each course.
e) Add a new column named Total to store the total marks.
Fill the column Total with the sum of the six marks of each Student.
g) Display the highest total in each group.
h) Find the highest, lowest and average score in Subject 6 in Commerce group.
i) Display the names in the alphabetical order in each course.
j) Display the name of the Student with the highest total.
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 9 Structured Query Language 1

a)
Plus Two Computer Science Chapter Wise Previous Questions Chapter 9 Structured Query Language 2

b)
Plus Two Computer Science Chapter Wise Previous Questions Chapter 9 Structured Query Language 3
c) mysql>seljept * from Student where course=’Science’;
d) mysql> select course,count(*) from -> Studentl group by course;
e) mysql>altertable Studentl add(total int);
f) mysql>update Studentl set total=mark1+ . mark2+mark3+mark4+mark5+mark6;
g) mysql>select course,max(total) from Studentl group by course;
h) mysql>selectmax(mark6),min(mark6), avg(mark6) from Studentl;
i) mysql>select course,name from Studentl order by course,name;
j) mysql>select name from Studentl where total=(selectmax(total) from Studentl);

Question 2.
The structure Qf a table is given to store the details of items in a computer shop. (5 Mark)

Data Type Description
Item number Numeric A unique and essential data to identify an item
Item name String A maximum of 30 characters
Date of purchase Date Duplication is allowed
Unit price Fractional Price of a single item
Quantity Numeric Number of items
Manufacturer String Name of the supplier (can duplicate)

Write SQL statements for the creation of the table and the following requirements.
a) Insert data into the fields (at least 10 records).
b) Display the details of all items in the table.
c) Display the names of items and total price of each.
d) List the items manufactured by a company (specify the name) available in the table,
e) Find the number of items from each manufacturer.
f) Display the details of items with the highest price.
g) List the names of items whose price is more than the average price of all the items. ‘
h) Display the names of items purchased after 1 -1 -2015.
i) Get the details of items manufactured by two or three companies (specify the names) available in the table.
j) Display the details of items from a company (specify the name) with a stock of more than 20 pieces.
Answer:
mysql>create table shop (ItemNo int primary key, name char(30) not null,
DOP date,
UnitPricefloat(8,2),
Qty int,
mfrer char(30));

a) mysq!>insert into shop values(1,’Keyboard’, ‘2014-08-21 ’,300.00,100,’Tech Com’); mysql>insert into shop values(2,’Mouse’, ‘2014-08-21’,300.00,100,’Tech Com’); mysql>insert into shop values(3,’Speaker’,’2015- 08-21’,550.00,100,’I Ball’); mysql>insert into shop values(4,’CPU’,’2015-07- 21’,3500.00,100,’AMD’); mysql>insert into shop values(5,’RAM’, ‘2015-08-1 ’,1300.00,100,’Hynix’);
b) mysql>select * from shop;
c) mysql>select name, UnitPrice*Qty from shop;
d) mysql>select name from shop where mfrer=’Tech Com’;
e) mysql>select mfrer,count(*) from shop group by mfrer;
1) mysql>select * from shop where UnitPrice = (select max(UnitPrice) from shop);
g) mysql>select name from shop where UnitPrice > (select avg(UnitPrioe) from shop);
h) mysql> select* from shop where DOP>’2015-1-1 ’;
i) mysql> select name from shop where mfrer=’l Ball’and Qty>20;

Question 3.
The structure of a table is given to store the details of higher secondary school teachers. (5 Mark)

Data Type Description
Teacher ID Numeric A unique and essential data to identify a teacher
Name String A maximum of 30 characters
Gender Character Male or Female
Date of joining Date Duplication is allowed
Department String Science, Commerce, Humanities or Language
Basic pay Numeric Basic salary of a teacher

Write SQL statements for the creation of the table and the following requirements:
a) Insert data into the fields (at least 10 records).
b) Display the details of all female teachers in the table.
c) List the details of male teachers in the Science department.
d) Display the names and basic pay of teachers in the Language department whose basic pay is Rs. 21000/-or more.
e) Display the names and 71 % of basic pay of the teachers.
f) Find the numbe of teachers in each department.
g) Display the details of teachers whose basic pay is less than the average basic pay.
h) List the male teachers who joined before 1-1-2010.
i) Increment the basic pay of all teachers by Rs. 1000/-.
j) Delete the details of teachers from the Language department.
Answer:
mysql>create table hsst (Teache rld in primary key, name varchar(30) not null,
gender char,
DOJ date,
Dept varchar(15),
BP float(8,2));
a) mysql>insert into hsst values(1,’Jose’,’M’,‘2002-01-01 ‘,‘Science’,25660);
mysql> insert into hsst values(2’Christy’,’F’,‘2012-01-01 ‘,‘Commerce’,20740);
mysql>insert into hsst values(3,’Geejo George’,’M’, ‘2007-01-01 ‘,‘Humani’ties’,22360);

b) mysql>select * from hsst where gender=’F’;

c) mysql>select * from hsst where gender=’M’ and
Dept= Science’;

d) mysql>select name, BP from hsst where
dept=’Language’ and BP >21 000;

e) mysql>select name, BP*.71 from hsst;
f) mysql>select Dept,count(*) from hsst group by Dept;
g) mysql>select * from hsst where BP < (select avg(BP) from hsst);
h) mysql>select * from hsst where gender=’M’ and DOJ<2010-01-01’;
i) mysql>update hsst set BP=BP+1000;
j) mysql>delete from hsst where Dept=’Language’;

Question 4.
The structure of a table s given to store the details of customers in a bank. (5 Mark)

Data Type Description
Account number Numeric A unique and essential, data to identify a customer
Name String A maximum of 30 characters
Gender Character Male or Female
Date of joining Date Duplication is allowed
Type of account String SB or Current
Balance amount Numeric Can be a.fraetional number

Write SQL statements for the creation of the table and the following requirements:
a) insert data into the fields (at least lo records).
b) Display the details of customers having SB ac count.
c) Display the names of customers with a balance among greater than Rs. 5000/-.
d) Display the details of female customers with a balance amount greater than Rs. 10000/-
e) Cpunt the number of male and female customers.
f) Display the names of customers with the highest balance amount.
g) Display the names of customers whose names end with ‘kumar.
h) Update the balance amount of a particular cus tornerwith a deposit amount of Rs. 2000/-.
i) Display the details of customers with a tax deduction of 2% of the balance amount for those wtio have Rs. 2,00,000/- ¡n their account.
j) Delete the details of customers with current acco un
Answer:
mysql>create table customer
AccNo mt primary key,
name varchar(30),
gender char,
DOJ date,
TypeOfAcc char(8),
Balance double(10,2));

a) mysql>inserl ¡ nb customer values
(1001 ,‘Adeline’,’F’,’2008-11-26’’SB’,50000.O0);

mysql>insert into customer values
(1 002,’Aivis’ ‘M’, ‘2007-05-19 ‘Current50O000.00);
mysql>insert ¡rito customer values
(1003, ‘Andrea’,’F’, 2012-07-29’, ‘SB’450000.00);

b) mysql>select from customer where TypeofAcc=’SB’;
c) mysql>select name from customer where Balance>5000;
d) mysql>select name from customer where gender=’F’ and Balance>1 0000;
e) mysql>select gender,count(*) from customer group by gender;

mysql>select name from customer where Balance=(select max(Balance) from customer);
g) mysqi> select name from customer where name like “%kumar”;
h) mysql’update customer set Balance= Balance+ 2000whereAccno=1001;
i) mysql>select Accno,name, Balance*.02 from customer where Balance>=200000;
j) mysql > delete from customer where Type OtAcc = ‘Current’;

Plus Two Computer Science Chapter Wise Assess Questions and Answers

Question 1.
The command to remove rows from a table ‘CUSTOMER’ is: (1 Mark)
a) Remove From Customer
b) Drop Table Customer
c) Delete From Customer
d) Update Customer
Answer:
c) Delete From Customer

Question 2.
If values for some columns are unknown, how is a row inserted? (2 Mark)
Answer:
In this occasion the column list must be included, following the table name.
Eg. INSERT INTO <TABLE NAME> (COLUMN NAME1, COLUMN NAME2, ….) VALUES (VALUE1, VALUE2,… .);

Question 3.
Distinguish between CHAR and VARCHAR data types of SQL. (2 Mark)
Answer:
Char- It is used to store fixed number of characters. It is declared as char(size).
Varchar – It is used to store characters but it uses only enough memory.
It is declared as varchar(size).

Question 4.
What is the difference between PRIMARY KEY and UNIQUE constraints? (2 Mark)
Answer:
Unique – It ensures that no two rows have the same value in a column.
Primary key – Similar to unique but it can be used only once in a table.

The strings
(i) and
(iv) only

Question 5.
What do you mean by NULL value in SQL? (1 Mark)
Answer:
Null is a key word in SQL that represents an empty * value.

Question 6.
Which of the following is the correct order of clauses for the SELECT statements? (1 Mark)
a) Select, From, Where, Order By
b) Select, From, Order By, Where
c) Select, Where, From, Order By
d) Select, Where, Order By, From
Answer:
a. Select From, Where, Order By

Question 7.
The SQL operator …………….. is used with pattern matching. (1 Mark)
Answer:
Like Operator

Question 8.
Read the following strings : (1 Mark)
i) ‘Sree Kumar’
ii) ‘Kumaran’
iii) ‘Kumar Shanu’
iv) ‘Sreekumar’
Choose the correct option that matches with the pattern ‘%Kumar’, when used with LIKE operator in a SELECT statement.
a) Strings (i) and (ii) only
b) Strings (i), (iii) and (iv) only
c) Strings (i) and (iii) only
d) All the strings
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 9 Structured Query Language 4

Question 9.
List any five built-in functions of SQL arid the value- returned by each. (2 Mark)
Answer:
Aggregate functions
1. Sum()- find the total of column.
2. Avg() – find the average of a column.
3. Min()- find the smallest value of a column.
4. Max() – find the largest value of the column.
5. Count() -find the number of values in a column.

Question 10.
Distinguish between WHERE clause and HAVING clause. (2 Mark)
Answer:
Where clause is used to specify the condition.
Syntax: Select * from Student where roll=1;
Plus Two Computer Science Chapter Wise Previous Questions Chapter 9 Structured Query Language 5

Having clause is used with Group By to give conditions and to ofrm groups of records, not individual rows.
Plus Two Computer Science Chapter Wise Previous Questions Chapter 9 Structured Query Language 6

Question 11.
Write any four DML commands in SQL. (2 Mark)
Answer:
The four DML commands are
1) Insert
2) Update
3) Select
4) Delete

Question 12.
Write the essential clause required for each of the following SQL command. (2 Mark)
a) Insert Into
b) Select
c) Update
Answer:
a) Insert Into – Values
b) Select – From
c) Update – Set

Question 13.
Consider the given table Cùstomer and write the out put of the following SQL queries: (5 Mark)

Acc.No Name Branch Amount
1001 Kumar Calicut 10000
1002 Salim Trivandrum 20000
1003 Fida Kottayam 18000
1004 John Kannur 30000
1005 Raju Thrissur 5000

a) SELECT * FROM customer WHERE
Amount>25000:

b) SELECT Name FROM customer
WHERE Branch IN (‘Calicut, ‘Kannur’);

c) SELECT COUNT (*) FROM customer WHERE
Amount < 20000;

d) SELECT Name FROM customer WHERE Name like %m%;
e) SELECT * FROM customer ORDER BY Amount DESC;
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 9 Structured Query Language 7
Plus Two Computer Science Chapter Wise Previous Questions Chapter 9 Structured Query Language 8

Question 14.
Distinguish between COUNT (*) and COUNT (column-name). (2 Mark)
Answer:
Count() – find the number of non null values in a column.
Cou nt(*) This is used to find the number of records with at least one field.

Question 15.
Consider the given table ITEMS. (5 Mark)

Item Code Name Category Price Unit Price Sales
0001 Pencil Stationery 5.00 8.00
0002 Pen Stationery 8.00 10.00
0003 NoteBook Stationery 10.00 20.00
0004 Chappal Footwear 50.00 70.00
0005 Apple Fruits 60.00 90.00
0006 Orange Fruits 40.00 60.00
0007 Pen Stationery 10.00 12.00

a) Suggest a suitable primary key for the above table. Give justification.
b) write SQL statements for the following:
i) To list all stationery items.
ii) To list itern code. name and profit of all items.
iii) To count the number of items in each category.
iv) To list all stationery items in the descending order of their unit price.
v) To find the item with the highest selliñg price.
vi) To, create a view that contains the details of all stationery items.
Answer:
a) Item code is the primary key for the table

b) (i)
Plus Two Computer Science Chapter Wise Previous Questions Chapter 9 Structured Query Language 9

(ii)
Plus Two Computer Science Chapter Wise Previous Questions Chapter 9 Structured Query Language 10

(iii)
Plus Two Computer Science Chapter Wise Previous Questions Chapter 9 Structured Query Language 11

(iv)
Plus Two Computer Science Chapter Wise Previous Questions Chapter 9 Structured Query Language 12

(v)
Plus Two Computer Science Chapter Wise Previous Questions Chapter 9 Structured Query Language 13

(vi)
Plus Two Computer Science Chapter Wise Previous Questions Chapter 9 Structured Query Language 14

Question 16.
What are the different modifications that can be made on the structure of a table? Which is the SQL corn mand required for this? Specify the clauses needs for each type of modification. (3 Mark)
Answer:
Alter table command is used to modify existing column or add new column to an existing table. There are 2 keywords used ADD and MODIFY.

We can alter the table in two ways.

We can add a new column to the existing table using the following syntax,

ALTER TABLE <tabiename>ADD(<cloumnname> <type> <constraint>);

We can also cha rige or modify the existing column in terms of type or size using the following syntax,
ALTER TABLE<tablename>MODIFY(<column> <newtype>);

Question 17.
A table is created in SQL with 10 records. Which SQL command is used to change the values in a column of specified ¿ows? Write the format. (2 Mark)
Answer:
UPDATE command s used for this.
Syntax : UPDATE <table name> set <column name>=value where condition.

Question 18.
Name the keyword used with SELECT command to avoid duplication of values in a column. (1 Mark)
Answer:
DISTINCT

Question 19.
Distinguish between DISTINCT and UNIQUE in SQL. (2 Mark)
Answer:
DISTINCT – This keyword is used to avoid duplicate values in a column of a table.
Unique – It ensures that no two rows have the same value in a column.

Question 20.
Pick the odd one out and give reason: (1 Mark)
a) CREATE
b) SELECT
c) UPDATE
d) INSERT
Answer:
a) CREATE, It is a DDL command the others are DML commands

Plus Two Computer Science Chapter Wise Previous Questions Chapter 8 Database Management System

Kerala State Board New Syllabus Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 8 Database Management System.

Kerala Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 8 Database Management System

Question 1.
Components of DBMS [MARCH – 2008] (3)
Answer:
a) databases – database is an organized collection of information.
b) Data Definition Language(DDL) – Data Definition Language is used to specify the definitions of Da-tabase Schema. The result of compilation of DDL statements is a set of tables stored in a special file called data dictionary.
c) Data Manipulation Language(DML) – It is a language that enable users to access or manipulate data in the database. It also provides interfaces with programming languages.
d) Users – users interact with DBMS indirectly via ; application programs or directly via simple query language.

Question 2.
What are the advantages of DBMS? [MARCH – 2008] (5)
OR
Consider there is a strike against the introduction of computer in your firm. How can you convince the ben-efits of computerization to the employees by pointing out the benefits of database over manual system?
Answer:
1) Data Redundancy .Duplication of data is known as redundancy, i.e., the same data may be repeated in many files. It leads to higher storage and access cost. So data redundancy should be eliminated.

2) Inconsistency can be avoided: If data redundancy exist, it may lead to data inconsistency. If redun-dancy is removed then inconsistency can be avoided.

3) Data can be shared: If the computers are connected to a network, the data stored in the database can be shared among several users or programs.

4) Standards can be enforced: There is a standard BIS (Bureau of Indian Standards) in the field of Gold and ISBN (International Standard Book Number) in the field of publication. Similarly here is also some standards like ANSI(American National Standards Institute), ISO (International Organization for standardization), etc.. For example a filed “Name” should have 40 characters is a standard.

5) Security restrictions can be applied: The database is of great value to a company or Organization. Data security means protection of data against accidental or intentional disclosure or unauthorized destruction or modification by un-authorized persons.

6) Integrity can be maintained: It ensures that the data entered in the database is correct. The data may contain incorrect information for example a date of birth can be 30/30/2001. To avoid this DBMS defines integrity check.

7) Efficient data access: It stored huge amount of data efficiently and can be retrieved whenever a need arise.

8) Crash recovery: Sometimes all ora portion of the data is lost when a system crashes. A good DBMS helpsto recover data afterthe system crashed.

Question 3.
The repetition of same data in a file system is known as ……….. . [MARCH – 2009]
Answer:
Data Redundancy

Question 4.
What is a Cartesian product? [MARCH – 2009]
Answer:
Cartesian product returns a relation consisting of all possible combinations of the tuple from two relations. Which is a binary operation. It is denoted by X. It is also called Cross Product.

Question 5.
Explain the different levels of data independence. [MARCH – 2009] (2)
Answer:
Data independence is the ability to modify the schema definition in one level without affecting the schema definition at the next higher level. There are two levels Of data independence, Physical data independence and. Logical data independence.

Question 6.
Name the different data models available for database systems. Which of them is the most preferred one? Briefly explain with a suitable example. [FEBRUARY – 2009] (S)
Answer:
There are three models:-
a) Hierarchical Model:
It assigns records to different levels of hierarchy. A lower level record is called the child and the higher level is called the parent. Data redundancy is the disadvantage of this model.

b) Network Model : It is similar to hierarchical model, but each child record can have more than one parent record. This model eliminates the re-dundancy encountered in the hierarchy model, but it has a high degree of complexity. It was introduced by CODASYL-DBTG in 1971.

c) Relational Model : It is based on the concept introduced by E F Godd. It composed of one or more tables. Here tables are called relations, rows are called tuples and the columns are called at-tributes. It has no data redundancy and complex-ity. So this is the best model.

Question 7.
Explain two unary operations in RDBMS using an example. [FEBRUARY – 2009] (3)
Answer:
1) Select: It is used to select tuples in a relation that satisfy a selection condition. To denote selection the lowercase Greek letters are used. The condition appears as a subscript to a. The relation is given in the parenthesis.
Eg:
To select the tuples whose salary > 5000 from Employee relation Employee)

2) Project: It selects certain columns from the table and discardsthe other columns. It is denoted by the Greek letter n.
Eg:
To select name and salary from the relation Employee.
nna™,salary (Employee)

Question 8.
Select a terminology which is not a part of DBMS. [JUNE – 2009] (1)
a) Relation b) Function c) Domain d) Tuple
Answer:
Function

Question 9.
Explain the different levels of data abstraction. [JUNE – 2009] (3)
Answer:
1) Physical Level is the lowest level. It describes how the data is actually stored in the storage medium. At physical level complex low-level data structures are described in detail.

2) Logical level describes what data are stored in the database and what relationships exist among data. Here database is described in terms of simple structures. Records are defined in this level. Programmers work at this level.

3) View level is the highest level of data abstraction. It is concerned with the way in which the users view the database. It describes only part of the database.

Question 10.
What are the components of DBMS? Explain. [JUNE – 2009] (3)
Answer:
a) databases – database is an organized collection of information.
b) Data Definition Language(DDL) – Data Definition Language is used to specify the definitions of Da-tabase Schema. The result of compilation of DDL statements is a set of tables stored in a special file called data dictionary.
c) Data Manipulation Language(DML) – It is a lan-guage that enable users to access or manipulate data in the database. It also provides interfaces with programming languages.
d) Users – users interact with DBMS indirectly via application programs or directly via simple query language.

Question 11.
Explain the structure of a file. [JUNE – 2009] (2)
Answer:
The structure of a file
Field: A field is the smallest unit of data. Ex: roll number, name.

Record : The collection of related fields is called a record. Ex: The information about a student File: A file is a collection of related records. Ex: The students details of a class.

Question 12.
__________ is the smallest unit of data. [JUNE – 2009] (1)
a) Record
b) file
c) key
d) field
Answer:
d. Field

Question 13.
Consider the database of Online Ticket reservation. Explain the classification of the users of this database. [MARCH – 2010] (3)
Answer:

A B
Database Administrator b) Person who has a central con­trol over definition and DBMS.
Application Programer c) Computer professionals who in­teract with the DBMS through Application programs
Users a) Not concerned with or even aware of details of the DBMS.

Question 14.
There is an attribute Roll number in the table STUDENT. This attribute is also the candidate key in the table EXAM. So the Roll number is considered as key in the table EXAM. [MARCH – 2010]
(a) Foreign
(b) Primary
(C) Alternate
(d) Super
Answer:
(a) Foreign

Question 15.
Consider the following table and write relational al-gebra operations for the following: [MARCH – 2010] (3)
Student

Regno Name Mark Mark2 Total
101 ABC 18 36 54
102 XYZ 45 48 93
103 ZYX 38 46 84
104 BCD 45 46 91
105 DEF 32 41 73

a) To display those tuples from STUDENT relation where total is greater than 90.
b) To display cnly Regno and Name of all students.
Answer:
a) σTotal>90 (Student)
b) πRegno, Name (Student)

Question 16.
Briefly explain the different keys that are used in RDBMS. [MARCH – 2010] (4)
Answer:

  1. Candidate Key:lt is a set of attributes that uniquely identifies a row. There may be more than candidate key and may be a combination of more than one attribute.
  2. Primary Key : A primary key is one of the Candidate Keys. It is a set of one or more attributes that can uniquely identify tuples in a relation.
  3. Alternate Key: The Candidate key that is not the primary key is called the alternate key.
  4. Super Key : A combination of a primary key with any other attribute or group of attributes is called a super key.
  5. Foreign Key : Asingle attribute or a set of attributes, which is a candidate key in another table, is called foreign key.

Question 17.
Match the following with the levels of abstraction to which the users are primarily associated: [MARCH -2011] (3)
Levels of Abstraction – Users
1. Physical level – A. Naive users
2. Logical level – B. Database administrator
3. View level – C. Application programmer
Answer:
1) Physical Level – Database Administrator
2) Logical Level – Application programmer
3) View Level – Naive users

Question 18
A data model provides a way to represent data and their relationships. [MARCH -2011] (3)
a) Which data model assigns records to diferent levels of hierarchy?
b) Briefly explain the relational data model.
Answer:
a) Hierarchical Data Model
b) In relational data model data are stored as tables. Here the term relation means table. A table consists of rows and columns. Columns mean attributes and rows means tuples.

Question 19.
Explain how data is organized for effective storage and retrieval of information. [MARCH -2011] (2)
Answer:
There are three data models used for effective storage and retrieval of information. They are hierarchical, network and relational data models.

Question 20.
Which is not an RDBMS package? [MARCH -2011] (1)
a) Oracle
b) SQL Server
e) Mysql
d) HTML
Answer:
(d) HTML

Question 21.
The smallest unit of stored data in a database is [MARCH -2011] (1)
Answer:
Field

Question 22.
Mini created a relation in which two of the tuples have the same combination of values for all their at tributes.
Is this allowed? Give reason. [MARCH -2011] (2)
Answer 1.
No. It is not allowed because a good DBMS does not allow duplication of the same data. i.e. data redundancy is not allowed.

Answer 2.
Yes. Same values of data is allowed if primary key or unique key is not defined in the relation.

Question 23.
What ¡s the importance of primary key? [MARCH -2011] (2)
Answer:
Key: A pnmary key is one of the Candidate Keys. It is a set of one or more attributes that can uniquely identify tiiples in a relation.

Question 24.
Discuss the levels of data abstraction in DBMS. [March – 2016] (3)
Answer:
1) Physical Level is the lowest level.lt describes how ‘ the data is actually stored in the storage medium. At physical level complex low-level data structures are described in detail.

2) Logical level describes what data are stored in the database and what relationships exist among data. Here database is described in terms of simple structures. Records are defined in this level. Programmers work at this level.

3) View level is the highest level of data abstraction. It is concerned with the way in which the users view the database. It describes only part of the database.

Question 25.
In the ACCOUNT relation shown below [March – 2016]

Acc.Number  Name  Balance  Type
1000  Simon  1,50,000  SB
i001  Abey  2,00,000  SB
1002  jambal  1,00,000  SB
1003  Ram  2.50,000  SB

a) Identify the primary keys and candidate keys.
b) Select all account holders with balance greater than Rs. 2,00,000. (2)
Answer:
a) Primary key-ACC. Number
Candidate keys – Name and Balance

b) σ2Balance>200000 (ACCOUNT)
OR
Select * from Account where Balance>200000

Question 26.
What are the major advantages of the relational model over other data models? [May-2016] (1)
Answer:
The relational data model has no redundancy and no complexity.

Question 27.
a) Classify the following operations in relational algebra into unary and binary operations:
(1) UNION
(2) SELECT
(3) SET DIFFERENCE
(4) PROJECT (1)

b) Explain about SELECT, INTERSECTION and SET DIFFERENCE operations with example. [May-2016] (3)
Answer:
a) Unary Binary
(2) SELECT
(1) UNION
(4) PROJECT
(3) SET DIFFERENCE

b) SELECT operation
SELECT operation is used to select tuples in a relation that satisfy a selection condition. Greek letter cr (sigma) is used to denote the operation.

Syntax,
σCondition (relation)

eg. σSalary<100000 (EMPLOYEE)-selects tuple whose salary is less than 10000 from EMPLOYEE relation.

Intersection operation
This operation returns a relation consisting of all the tuples appearing in both of the specified rela-tions. It is denoted by n. It can takes place only on compatible relations, e.g. FOOTBALL ∩ CRICKET returns the players who are in both football and cricket teams.

Set difference operation (-)
All tuples appearing in the first relation and not in the second.

Question 28.
a) Discuss the advantages of DBMS. (3)
b) Create a database schema for the relation VEHICLE. [MARCH -2017] (2)
Answer:
a) Advantages of DBMS
1) Data Redundancy-It means duplication of data. DBMS eliminates redundancy. DBMS does not store more than one copy of the same data.

2) Inconsistency can be avoided – If redundancy occurs there is a chance to inconsistency. If redundancy is removed then inconsistency cannot occur.

3) Data can be shared – The data stored in the database can be shared by the users or programs.

4) Standards can be enforced – The data in the database follows some standards. Eg: a field ‘Name’ should have 40 characters long. Some standards are ANSI, ISO, etc.

5) Security restrictions can be applied – The data is of great value so it must be kept secure and private. Data security means the protection of data against accidental or intentional disclosure or unauthorized destruction or modification by unauthorized person.

6) Integrity can be maintained – It ensures that the data is to be entered in the databse is correct.

7) Efficient data access – It stored huge amount of data efficiently and can be retrieved whenever a need arise.

8) Crash recovery – Sometimes all or a portion of the data is lost when a system crashes. A good DBMS helps to recover data after the system crashed.

b)

RegNo Owner Name Make Year of Mfr Cub_Capacity
KL-45-L-100 Achuth TOYOTO 2015 2500
KL-45-N-1000 RAJU HONDA 2016 1100
KL-45-P JOSE MARUTHI 2017 1000

Question 29.
_________ in a table gives the complete data of a particular entity. [May – 2017]
a) Tuple
b) Attribute
c) Domain
d) Schema (1)
Answer:
d) Schema

Plus Two Computer Science Chapter Wise Assess Questions and Answers

Question 1.
Who is responsible for managing and controlling the activities associated with the database? (1 Mark)
a) Database administrator
b) Programmer
c) Native user
d) End user
Answer:
a) Database administrator

Question 2.
In the relational model, cardinality is the _______ . (1 Mark)
a) numberoftuples
b) number of attributes
c) number of tables
d) number of constraints
Answer:
a) numberoftuples

Question 3.
Cartesian product in relational algebra is _______ . (1 Mark)
a) a Unary operator
b) a Binary operator
c) a Ternary operator
d) not defined
Answer:
b) a Binary operator

Question 4.
Abstraction of the database can be viewed as _________ . (1 Mark)
a) two levels
b) four levels
c) three levels
d) one level
Answer:
c) three level

Question 5.
In a relational model, relations are termed as __________ . (1 Mark)
a) tuples
b) attributes
c) tables
d) rows
Answer:
c) tables

Question 6.
In the abstraction of a database system the external level is the ___________ . (1 Mark)
a) physical level
b) logical level
c) conceptual level
d) view level
Answer:
d) view level

Question 7 (1 Mark)
Related fields in a database are grouped to form a ___________ .
a) data file
b) data record
c) menu
d) bank
Answer:
b) data record

Question 8.
A relational database developer refers to a record as ___________ . (1 Mark)
a) criteria
b) relation
c) tuple
d) attribute
Answer:
c) tuple

Question 9.
An advantage of the database management approach is ___________ . (1 Mark)
a) data is dependent on programs
b) data redundancy increases
c) data is integrated and can be accessed by multiple programs
d) none of the above
Answer:
c) data is integrated and can be accessed by multiple programs

Question 10.
Data independence means (1 Mark)
a) data is defined separately and not included in programs
b) programs are not dependent on the physical at-tributes of data
c) programs are not dependent on the logical at-tributes of data
d) both (b) and (c)
Answer:
d) both (b) and (c)

Question 11.
Key to represent relationship between tables is called ___________ . (1 Mark)
a) primary key
b) candidate Key
c) foreign Key
d) alternate Key
Answer:
c) foreign key

Question 12.
Which of the folowing operations is used if we are interested only in certain columns of a table? ___________ . (1 Mark)
a) Projection
b) Selection
c) Union
d) Select
Answer:
a) Projection

Question 13.
Which of the following operations need the partici-pating relations to be union compatible? ___________ . (1 Mark)
a) UNION
b) INTERSECTION
c) SET DIFFERENCE
d) All of the above
Answer:
d) All of the above

Question 14.
Which database level is closest to the users? ___________ . (1 Mark)
a) External
b) Internal
c) Physical
d) Conceptual
Answer:
a) View level (External)

Question 15.
The result of the UNION operation between R1 and R2 is a relation that includes ___________ . (1 Mark)
a) all the tuples of R1
b) all the tuples of R2
c) all the tuples of R1 andR2
d) all the tuples of R1 and R2 which have common columns
Answer:
(d) All the tuples of R1 and R2 (eliminating the duplication)

Question 16.
A file manipulation command that extracts some of the records from a file is called ___________ . (1 Mark)
a) Select
b) Project
c) Join
d) Product
Answer:
a) select

Question 17.
An instance of relational schema R (A, B, C) has distinct values of A including NULL values. Which one of the following is true? ___________ . (1 Mark)
a) A is a candidate key
b) A is not a candidate key
c) A is a primary key
d) Both (a) and (c)
Answer:
a) A is a candidate key

Question 18.
How many distinct tuples are there in relation instance with cardinality 22? ___________ . (1 Mark)
a) 22
b) 11
c) 1
d) none
Answer:
a) 22

Question 19.
A set of possible data values is called ___________ . (1 Mark)
a) Attribute
b) Degree
c) Tuple
d) Domain
Answer:
d) Domain

Question 20.
Why should you choose a database system instead of simply storing data in conventional files? (5 Mark)
Answer:
Advantages of DBMS over conventional files Data Redundancy – It means duplication of data. DBMS eliminates redundancy. DBMS does not store more than one copy of the same data. Inconsistency can be avoided – If redundancy occurs there is & chance to inconsistency. If redundancy is removed then inconsistency cannot occur.

Efficient data access -: It stored huge amount of data efficiently and can be retrieved whenever a need arise.

Data can be shared – The data stored in the database can be shared by the users or programs. Standards can be enforced – The data in the database follows some standards. Eg: a field ‘Name’ should have 40 characters long. Some standards are ANSI, ISO, etc.

Security restrictions can be applied – The data is of great value so it must be kept secure and private. Data security means the protection of data against accidental of intentional disclosure or unauthorized destruction or modification by unauthorized person.

Integrity can be maintained – It ensures that the data is to be entered in the database is correct.

Crash recovery- Some times all ora portion of the data is lost when a system crashes. A good DBMS he’psto recover data after the system crashed.

Question 21.
Explain the different levels of data abstraction in DBMS? (3 Mark)
Answer:
Levels of Database Abstraction –
1) Physical Level (Lowest Level) – It describes how the data is actually stored in the storage medium.
2) Logical Level (Next Higher Level) – It describes what data are stored in the database.
3) View Level (Highest level) – It is closest to the users. It is concerned with the way in which the individual users view the data.

Question 22.
How are schema layers related to the concepts of logical and physical data independence? (3 Mark)
Answer:
Data Independence – It is the ability to modify the scheme definition in one level without affecting the scheme definition at the next higher level.
a) Physical Data independence – If is the ability to modify the physical scheme without causing application programs to be rewritten.
b) Logical Data Independence – It is the ability to modify the logical scheme without causing application programs to be rewritten.

Question 23.
Consider the instance of the EMPLOYEE relation shown in the following table. Identify the attributes, degree, cardinality and domain of Name and Emp_code. (3 Mark)

EmpCode Name Department Designation Salary
1000 Sudheesh Purchase Manager 25000
1001 Dhanya Sales Manager 25000
1002 Fathima Marketing Clerk 12000
1003 Shajan Sales Clerk 13000

Answer:
Attributes- These are column names, i.e, Emp_Code, Name, Department, Designation and Salary Degree(CD) -the number of Columns is the Degree
i. e Degree is 5(Here 5 columns)
Cardinality (RC)-: the number of Rows is the Cardinality
i. e. Cardinality is 4(Here 4 rows)
Domain is the pool of possible values
Domain of Name is a String(Sudheesh, Dhanya,
Fathima, Shajan.etc)
Domain of Emp_Code is a number (1000,1001,1002, 1003, etc)

Question 24.
Identify primary key, candidate keys and alternate keys in the instance of EMPLOYEE relation in Question 23. (3 Mark)
Answer:
Candidate key – It is used to uniquely identify the row.
Emp_code and Emp_Code + Department (Composite) are the candidate keys
Primary key – It is a set of one or more attributes used to uniquely identify a row.
Empjcode is the primary key
Alternate key – A candidate key other than the primary key.
We set Emp_code as the primary key then Emp_code+ Department is the alternate key

Question 25.
Consider the instance of the STUDENT relation shown in the following table Assume Reg_no as the primary key. (3 Mark)
a) Identify the candidate keys and alternate keys in the STUDENT relation
b) How are the primary key and the candidate key-related?

Reg_no Name Batch Result Marks
101 Sachin Science Pass 480
103 – Fathima Humanities Fall 200
106 Joseph Commerce Pass 360
108 Bincy Science Pass 300

Answer:
a) Reg_no and Reg_no+Batch are the candidate keys. We set Reg_no as the primary key hence Reg_no+Batch is the alternate key
b) Candidate Key :lt is a set of attributes that uniquely identifies a row. There may be more than candidate key and may be a combination of more than one attribute.

Primary Key: A primary key is one of the Candidate Keys. It is a set of one or more attributes that can uniquely identify tuples in a relation.

Question 26.
What is a database? Describe the advantages and disadvantages of using DBMS. (5 Mark)
Answer:
A Database is a collection of large volume of data.

Advantages of DBMS
Data Redundancy – It means duplication of data. DBMS eliminates redundancy. DBMS does not store more than one copy of the same data.
Inconsistency can be avoided – If redundancy occurs there is a chance to inconsistency. If redundancy is removed then inconsistency cannot occur. Efficient data access It stored huge amount of data efficiently and can be retrieved whenever a need arise.

Data can be shared – The data stored in the database can be shared by the users or programs.

Standards can be enforced – The data in the database follows some standards. Eg: a field ‘Name’ should have 40 characters long. Some standards are ANSI, ISO, etc.

Security restrictions can be applied – The data is of great value so it must be kept secure and private. Data security means the protection of data against accidental or intentional disclosure or unauthorized destruction or modification by unauthorized person.

Integrity can be maintained – It ensures that the data is to be entered in the database is correct.

Crash recovery- Sometimes all ora portion of the data is lost when a system crashes . A good DBMS helps to recover data after the system crashed.

Question 27.
What is data independence? Explain the difference between physical and logical data independence. (3 Mark)
Answer:
Data Independence – It is the ability to modify the scheme definition in one level without affecting the scheme definition at the next higher level.
a) Physical Data Independence – It is the ability to modify the physical scheme without causing application programs to be rewritten.
b) Logical Data Independence – It is the ability to modify the logical scheme without causing application programs to be rewritten.

Question 28 (3 Mark)
Enforcement of standard is an essential feature of DBMS. How are these standards applicable in a da-tabase?
Answer:
There is a standard BIS (Bureau of Indian Standards) in the field of Gold and ISBN (International Standard Book Number) in the field of publication. Similarly here is also some standards like ANSI(American National Standards Institute), ISO (International Organization for standardization), etc.. For example a filed “Name” should have 40 characters is a standard.

Question 29.
Cardinality of a table T1 is 10 and of table T2 is 8 and the two relations are union compatible. If the cardi-nality of result T1 ∪ T2 is 13, then what is the cardi-nality of T1 ∩ T2? Justify your answer. (3 Mark)
Answer:
Cardinalty of table T1 is 10 means it has 10 rows Cardinalty of table T2 is 8 means it has 8 rows Normally T1 ∪ T2 is 10+8 = 18 But Here T1 ∪ T2 is 13 means after eliminating duplication of 5 rows this happened.

This means 5 rows are common. That is T1 ∩ T2 is 5

Question 30.
CardinalityofatableTI is10andoftableT2is8and the two relations are union compatible. (3 Mark)
a) What will be the maximum possible cardinality of T1 ∪ T2?
b) What will be the minimum possible cardinality of T1 ∩ T2?
Answer:
a) Degree(CD) -the number of Columns is the Degree Cardinality (RC)-: the number of Rows is the Cardinality T1 ∪ T2 = Sum of cardinalities of Table 1 and Table 2
i. e.T1 ∪ T2 = 10 + 8 = 18

b) T1 ∩ T2 is the common rows(tuples) in T1 and T2 If there is no common tuples then T1 ∩ T2 is 0 hence the cardinality is 0.

Question 31.
Conside the relations, City (city_name, state) and Hotel (name, address, city_name). Answer the following queries in relational algebra (5 Mark)
a) Find the names and address of hotels in Kochi.
b) List the details of cities in Kerala state.
c) List the names of the hotels in Thrissur.
d) Find the names of different hotels.
e) Find the names of hotels in Kozhikode or Munnar.
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 8 Database Management System 1

Question 32.
Using the instance of the EMPLOYEE relation shown in question 23, write the result of the following relational algebra expressions. (5 Mark)
Plus Two Computer Science Chapter Wise Previous Questions Chapter 8 Database Management System 2
Answer:
a)

Emp_Code Name Department Designation : Salary
1001 Dhanya Sales Manager : 25000
1003 Shajan Sales Clerk : 113000

b)

Emp_Code Name Department Designation Salary
1001 Dhanya Sales Manager 25000

c)

Emp Code Name Department Designation Salary
1000 Sudheesh Purchase Manager 25000
1001 Dhanya Sales Manager 25000
1003 Shajan Sales Clerk 13000

d)

Name Salary
Sudheesh 25000
Dhanya 25000
Fathima 12000
Shajan 13000

e)

Name Salary
Sudheesh 25000
Dhanya 25000

f) No rows selected

Question 33.
Consider the instance of the BORROWER and DE- POSlTOR relations shown in following figure which stores the details of customers in a Bank. Answer the following queries in relational algebra. (5 Mark)
a) Display the details of the customers who are either a depositor or a borrower.
b) Display the name of customers who are both a depositor and a borrower.
c) Display the details of the customers who are d positors but not borrowers.
d) Display the name and’amount of customer who is a borrower but not depositor.

Borrower Depositor
Acc_No Name Amount Acc_No Name Amount
AC123 juwee 50000 AC123 juwee 500
AC103 Rasheeda 25000. AC105 Shabana 25000
AC106 Vishnu 25000 AC116 Vishnu 125000
AC108 Aiswarya 30000 AC108 Aiswarya 3000

Answer:
a)

Acc_No Name
AC 123 Albin
AC 105 Shabana
AC116 Vishnu
AC108 Aiswarya
AC103 Rasheeda
AC 106 Vishnu

b)

Acc_No Name
AC123 Albin
AC108 Aiswarya

c)

Acc_No Name
AC105 Shabana
AC116 Vishnu

d)

Name Amount
Rasheeda 25000
Vishnu 25000

Question 34.
Consider the instance of the CUSTOMER and BRANCH relations shown in the following table. Write the Cartesian Product of the two relations. (3 Mark)

CUSTOMER
Acc_No Name BranchJD Amount
AC123 Albin B1001 50000
AC103 Rasheeda B1001 25000
AC106 Vishnu B1001 25000
BRANCH
BranchJD Name
B1001 Kochi
B1002 Guruvayur
B10TT Iduki

Answer:

CUSTOMER X BRANCH
Acc No Name Branch ID Amount Branch ID Name
AC123 Albin B1001 50000 B1001 Kochi
AC 123 Albin B1001 50000 B1002 Guruvayur
AC123 Albin B1001 50000 B1077 Idukki
AC103 Rasheeda B1001 25000 B1001 Kochi
AC103 Rasheeda B1001 25000 B1002 Guruvayur
AC 103 Rasheeda B1001 25000 B1077 Idukki
AC 106 Vishnu B1001 25000 B1001 Kochi
AC106 Vishnu B1001 25000 B1002 Guruvayur
AC106 Vishnu B1001 25000 B1077 Idukki
AC 108 Aiswarya B1077 30000 B1001 Kochi
AC108 Aiswarya B1077 30000 B1002 Guruvayur
AC108 Aiswarya B1077 30000 B1077 Idukki

Plus Two Computer Science Chapter Wise Previous Questions Chapter 7 Web Hosting

Kerala State Board New Syllabus Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 7 Web Hosting.

Kerala Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 7 Web Hosting

Question 1.
What type of hosting will you use to support a government website? Give its advantages. [March – 2016] (2)
Answer:
Types of web hosting: Various types of web hosting services are available. We can choose the web host¬ing services according to our needs depends upon the storage space needed for hosting, the number of visitors expected to visit, etc.

1) Shared Hosting : This type of hosting sharing resources, like memory, disk space and CPU hence the name shared. Several websites share the same server. This is suitable for small websites that have less traffic and it is not suitable for large websites that have large bandwidth, large storage space and have large volume of traffic.

Eg:
Shared hosting is very similarto living in an Apartment(Villas) complex. All residents are in the same location and must share the available resources(Car parking area, Swimming pool, Gymnasium, playground, etc) with everyone.

2) Dedicated Hosting : A web server and its resources are exclusively for one website that have large volume of traffic means large volume of requests by the visitors. Some Govt, departments or large organizations require uninterrupted services forthat round the clock power supply is needed. It is too expensive but it is more reliable and provide good service to the public.

Eg:
It is similar to living in an Our own house. All the resources in your house are only for you. No . one else’s account resides on the computer and would not be capable, of tapping into your resources.

3) Virtual Private Server (VPS): A VPS is a virtual machine sold as a service by an Internet hosting Service. A VPS runs its own copy of an OS (Operating System) and customers have super level access to that OS instance, so they can install almost any s/wthat runs on that OS. This type is suitable for websites that require more features than shared hosting but less features than dedicated hosting.

Eg:
It is similar to owning a Condo

Question 2.
a) List the factors to be taken into consideration while buying hosting space on a web server. [May – 2016] (2)
b) What type of web page designing is called responsive web design? (1)
Answer:
a) It depends upon the storage space needed for hosting, the number of visitors expected to visit, etc.
b) Responsive web design means the home page of the website is displayed differently according to the screen size of the browsers window (mobile phone, palmtop, tablet, laptop, and desktop) we used.

Question 3.
An example of a virtualization software is ………………. [March – 2017] (1)
Answer:
VMware / Virtualbox / Free VPS / Usermode Linux / Microsoft Hyper-V

Question 4.
Discuss steps involved in registering the domain name of your school web site. [March – 2017] (2)
Answer:
Millions of websites are available over Internet so that, our school website must be registered with a suitable name. Domain Name registration is used to identify a website over Internet. A domain name must be unique(i.e. no two website with same name is available). So we have to check the availability of domain name before we register it, for this www.whois.net website will help. If the domain name entered is available then we can register it by paying the Annual registration fees through online.

Consider a Post Office, it has two addresses one string address (Irinjalakuda) and one numeric(pin) code (680121). Just like this the website has also two addresses a string address for example www.agker.cag.gov.in and a numeric address (http:/ /210.212.239.70/). We are following string address, hence this domain name has to be connected to the corresponding IP address of the web server. This is done by using ‘A record’(Address record) of the domain. ‘A record’ is used to store the IP address and the corresponding domain name.

Question 5.
What is the advantage of using SFTP protocol in FTP software? [May – 2017] (3)
Answer:
Then FTP client software helps to establish a connection between the client computer and the remote server computer. Unauthorised access is denied by using username and password hence secure our website files for that SSH(Secure Shell) FTP simply SFTP is used.

Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript

Kerala State Board New Syllabus Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 6 Client-Side Scripting Using JavaScript.

Kerala Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 6 Client-Side Scripting Using JavaScript

Question 1.
“TRUE AND FALSE are used to represent boolean values”. State if the above-given statement is correct or not. [March 2016] (1)
Answer:
Correct
Note: In the case of Javascript it is not correct.

Question 2.
Develop a webpage that implements a JavaScript function that takes two numbers as input and displays their product. [March 2016] (2)
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 1
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 2
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 3

Question 3.
Give the function in JavaScript that converts a string type data containing numbers to number type. [March 2016] (1)
Answer:
Number ()

Question 4.
a) Design a web page with form tag which accepts a number in a textbox and another textbox that should display either odd or even. Write a function in JavaScript to check whether the number is odd or even. [March 2016] (2)
OR
b) Develop a web page that accepts a number after validation and prints the factorial of it. (2)
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 4
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 5
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 6

Question 5.
JavaScript provides a large, number of built-in functions. [March 2016]
a) Name any two of them with an example. (2)
b) The property which returns the size of the string is ………………. (1)
Answer:
a) Refer Let us Asses Question 6
b) length property eg: x = “BVM”;
alert (x;length);

Question 6.
A virtual machine for executing JavaScript code is ______ . [March 2017] (1)
Answer:
JavaScript engine.

Question 7.
Discuss about six built-in functions used in JavaScript.
Answer:
Refer Let us Asses Question 6

Question 8.
Design a procedure in JavaScript that takes two strings as input and displays the concatenated strings as output. [March 2017] (2)
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 7
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 8

Question 9.
State whether the following statements are true or false: [May 2017]
a) JavaScript is the only client-side scripting language. (1)
b) JavaScript is a case sensitive scripting language. (1)
c) The keyword used to declare a variable in JavaScript is VAR. (1)
Answer:
a) false
b) false (The identifiers in JavaScript are case sensitive.)
c) true.

Question 10.
Predict the output of the following code: [May 2017]
<HTML>
<BODY>
<SCRIPT Language = “JavaScript”>
var i, s =0;
for (i=1; i<=10; i+=2)
s+=i;
document.write(“sum=”+s);
</SCRIPT>
</BODY>
</HTML> (2)
Answer:
The output is 25 (The sum of odd numbers less than 10)

Plus Two Computer Science Chapter Wise Practice Questions Chapter 6 Client-Side Scripting Using JavaScript

Question 1
Develop a web page to display the following screen. (3 Marck)
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 9
User can enter a number in the first text box. On clicking the show button, product of all numbers from 1 to the entered limit should be displayed in the second text box.
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 10

Question 2.
Develop a web to display the following screen (5 Mark)
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 11
clicking the show button, Even or Odd should be displayed in the second text box depending on whether the number is even or odd.
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 12
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 13

Question 3.
Develop a web page to display the following screen. (5 Mark)
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 14
The user can enter an age in the text box. If the user enters an alphabet, instead of a number in the text box, on clicking the show button, it should display a message “Invalid Age” to the user. Otherwise it should display a message “Correct Data”.
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 15
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 16

Question 4.
Develop a login page as shown in the following figure. (5 Mark)
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 17
The page must contain one text box for entering the username and one password box for entering the password. The user name must contain at least 4 characters and the password must contain at least 6 characters. The first two characters in the password must be numbers. On clicking the show button, if the valid data are given in boxes, a message ‘‘Correct Data” should be displayed. Otherwise, “Wrong Data” message should be displayed.
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 18
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 19

Question 5.
Develop a web page to implement a simple calculator. The page should have two text boxes to enter two numbers. It should also have 4 buttons to add, subtract, multiply and divide the two numbers. The answer should be displayed in a third text box on clicking the button. The web page should be as shown in the following figure. (5 Mark)
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 20
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 21
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 22
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 23

Plus Two Computer Science Chapter Wise Assess Questions and Answers

Question 1.
Write the value of the variable z in each of the following (5 Mark)
a) var x,y,z;
x5;
y=3;
z++x—y—;
Answer:
z=6-3 = 3
Hence z = 3.

b) var xy,z;
x=”12″;
y=”13″;
z=x+y;
Answer:
z= “12” + 13 = 1213. If one of the operand is a string the two strings concatenates the strings.That is It concatenates two strings.

c) var x,y,z;
x=20;
y=8;
x %=y;
z=x++;
Answer:
x %=y means x=x%y.
that is x= 20 % 8.
i.e. x = 4.
Then z = 4. (x++ first use the value then change)

d) var x,y,z;
x=1;
y=4;
z= !(x<y);
Answer:
The answer is false.
z= !(1<4)
z = !(true)
z = false

e) var x,yz;
x=5;
y=6;
z (x>y) || (y% 2 == ());
Answer:
The answer is true.
Steps
z= (5>6) || (6%2())
= (false) || (0 == ())
= (false) || (true)
= true.

Question 2.
Predict the output of the following (5 Mark)
a) <HTML>
<BODY>
<SCRIPT Language’JavaScript’>
var i;
for(i=10;i>=1 ;i—)
document.write(i + “<BR>”);
</SCRIPT>
</BC DY>
</HTML>
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 24

Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 25
Answer:
The output is 2500.

Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 26
Answer:
The output is 275.

Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 27
Answer:
The output is 120 (5 factorial)

Question 3
Following is an html code segment in a web page (1 Mark)
<FORM Name=”frmStud”>
<INPUT Type-‘text” Name=”studentName”>
</FORM>
Fill in the blanks to store the value of the text box to the variable n.
varn;
n= __________;
Answer:
n=document.frmstud.studentName.value;

Question 4.
Suppose you have written a JavaScript function named check Data(). You want to execute the function when the mouse pointer is just moved over the button. How will you complete the following to do the same? (1 Mark)
<INPUTType=”button” _________ = ‘‘checkData()”>
Answer:
<INPUTType-’button” onMouseEnter= “checkData()”>

Question 5.
Explain <SCRIPT> tag and its attributes. (2 Mark)
Answer:
Scripts are small programs embedded in the HTML pages, to write scripts <SCRIPT> tag is used.

* Language attribute specifies the name of the scripting language used.
*Example:
<SCRIPT Language=”JavaScript”>
___________
</SCRIPT>

Question 6.
Write the syntax of a built-in function in JavaScript. (5 Mark)
Answer:
Built in functions(methods)
1) alert()- : This is used to display a message(dialogue box) on the screen.
eg: alert(“Welcome to JS”);

2) isNaN()-: To check whether the given value is a number or not. It returns a Boolean value. If the value is not a number(NaN) then this function returns a true value otherwise it returns a false value.

Eg:
1. isNaN(“BVM”); returns true
2. isNaN(8172); returns false
3. isNaN(“680121”); returns false
4. alert(isNaN(8172); displays a message box as false

3) tollpperCase() -: This is used to convert the text to upper case.
Eg:
var x=”bvm”;
alert(x.toUpperCase());
Output is as follows
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 28

4) toLowerCase():- This is used to convert the text to lowercase.
Eg:
var x=”BVM”;
alert(x.toLowerCase());
Output is as follows
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 29

5) charAt():- It returns the character at a particular position.
Syntax: variable.charAt(index);
The index of first character is 0 and the second is 1 and so on.
Eg:
var x=”HIGHER SECONDARY”;
alert(x.charAt(4));
Output is as follows
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 30

Eg.
var x=”HIGHER SECONDARY”;
alert(“The characters @ first position is “+ x.charAt(()));
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 31

6) length property-: It returns the number of characters in a string.
Syntax: variable.length;
Eg.
var x=”HIGHER SECONDARY”;
alert(“The number of characters is “+ x.length);
Output is as follows(note that space is a character)
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 32

Question 7.
Classify the following values in JavaScript into suitable data types. (3 Mark)
“Welcome”, “123”, “true”, 67.4, .98, false, “hello”
Answer:
Number-: 67.4 and .98 .
String -: “Welcome”, “123”, “true” and “hello”. Boolean -: false.

Question 8.
What is meant by undefined data type in JavaScript mean? (2 Mark)
Answer:
undefined -: It is a special data type to represent variables that are not defined using var.

Question 9.
Explain operators in JavaScript. (5 Mark)
Answer:
Operators in JavaScript
Operators are the symbols used to perform an operation

1) Arithmetic operators
It is a binary operator. It is used to perform addition(+), subtraction(-), division(/), multiplication(*) ,modulus(%-givesthe remainder) ,increment(++) and decrement—) operations.
Eg. If x=10 and y=3 then

x+y x-y x*y x/y x%y
13 7 30 3.333 1

lfx=10then
document.write(++x); -> It prints 10+1=11
lf x=10then
document.write(x++); -> It prints 10 itself.
If x=10then
document.write(—x); It prints 10-1=9
lf x=10then
document.write(x—);-> It prints 10 itself.

2) Assignment operators
If a=10 and b=3 then a=b. This statement siets the value of a and b are same ,i.e. it sets a to 3. It is also called short hands
If X=10 and Y=3 then

Arithmetic Assignment Expression Equivalent Arithmetic Expression The value of X becomes
X+=Y X=X+Y 13
X-=Y X=X-Y 7
X*=y X=X*Y 30
X/=Y X=X/Y 3.333
X%=Y X=X%Y 1

3) Relational(Comparison) operators
It is used to perform comparison or relational operation between two values and returns either true or false.
Eg:
If X=10 and Y=3 then

X<Y X<=Y X>Y X>=Y X==Y X!=Y
false false true true false true

4) Logical operators
Here AND(&&), OR(||) are binary operators and NOT(!) is a unary operator. It is used to combine relational operations and it gives either true or false
If X=true and Y=false then

X&&X X&&Y Y&&X Y&&Y
true false False false

Both operands must be true to get a true value in the case of AND(&&) operation
If X=true and Y=false then

X || X X || Y Y || X Y || Y
true true true false

Either one of the operands must be true to get a true value in the case of OR(||) operation
If X= true and Y=false then

!X !Y
false true

5) String addition operator(+)
This is also called a concatenation operator. It joins (concatenates) two strings and forms a string.

Eg:
var x,y,z;
x= “BVM HSS”;
y= “Kalparamba”;
z=x+y;

* Here the variable z becomes “BVM HSS Kalparamba’’.
Note : If both the operands are numbers then addition operator(+) produces number as a result otherwise it produces string as a result.

Consider the following

Operand 1 data type Operand 2 data type Operation Resultant data type
number number number
number string +(addition) string
string number string
string string string

Eg:
1) 8(number) + 3(number)=11 (Result is a number)
2) 8 (number)+ “3″( string) = “83” (Result is a string)
3) “8” (string) + 3 (number) = “83”(Result is a string)
4) “8” (string) + “3” (string) = “83” (Result is a string)

Question 10.
Write JavaScript functions to perform the following (5 Mark)
a) To check whether a variable N contains a number
b) To convert the string “scert” to all capitals.
c) To convert the string “HTML” to all small letters.
d) To display a message “Welcome to functions”.
e) To display the third character in the string “Computer”.
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 33
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 34
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 35
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 36
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 37

Question 11.
Write JavaScript code to display the length of the string “Computer”. (3 Mark)
Answer:

<HTML>
<head>
<title>
length of a string
</title>
</head>
<BODY>
<SCRIPT Languages’JavaScript”>
var str.len;
str=”Computer";
len=str. length;
alert('The length of the string Computer is “+len);
</SCRIPT>
</BODY>
</HTML>

Question 12.
A web page contains a button. Write HTML code for the button which executes a function Message() on the occurrence of the following events. (2 Mark)
a) When a user clicks the mouse on the button.
b) When user moves the mouse over the button.
Answer:
a) <inputtype=”button”value=”Message”
onClick=”Message()”>

b) <input types”button” value=”Message”
onMouseEnter=”Message()”>

Question 13.
What are the advantages of writing JavaScript code in the head section of an HTML page? (2 Mark)
Answer:
Scripts can be placed inside the <HEAD> section. This method is widely accepted method. The main reason for this is that body section contains a large volume of text contents to be displayed on the web page. More over the head section is loaded before the body section.

Question 14.
Design an HTML page that contains a text box to enter the marks in a given subject. (5 Mark)
a) Write HTML code for this web page
b) Provide validations for this text box in a separate JavaScript file and link it with the HTML file. The validations are
(i) it should not be empty
(ii) it should be a number
(iii) it should be between 0 and 60.
c) List the advantages of writing the script in a separate file.
Answer:
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 39
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 40
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 41
Plus Two Computer Science Chapter Wise Previous Questions Chapter 6 Client-Side Scripting Using JavaScript 42

c) We can write scripts in a file and save it as a separate file with the extension .js. The advantage is that this file can be used across multiple HTML files and can be enhance the speed of page loading.


Plus Two Computer Science Chapter Wise Previous Questions Chapter 5 Web Designing Using HTML

Kerala State Board New Syllabus Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 5 Web Designing Using HTML.

Kerala Plus Two Computer Science Chapter Wise Previous Questions and Answers Chapter 5 Web Designing Using HTML

Question 1.
Considerthe following HTML statement. [MARCH – 2007]
<Table>
<TR>
<TH>Mark</TH>
<TD>90</TD>
</TR>
</Table>
What is the difference between the content displayed in the cells of the table? (2)
Answer:
<TH> means table heading
<TD> means table data
‘Mark’ is contained in <TH></TH>. It will displayed as Table Heads in Bold letter.
90 is contained in <TD></TD>. It will displayed as normal letters.

Question 2.
While designing a web page Raju wants to display a table which occupies the full browser window. Name the attribute which help him to do so. [MARCH – 2007] (1)
Answer:
The attribute is Width,it can be given in percentage of total window width.
Eg. <Table Border=1 Width= “100%”>

Question 3.
Complete the following table. [MARCH – 2007] (3)

HTML Tag Use
1. <B>
2. <HR>
3 Un ordered List
4. <DL>
5 It is the line break tag
6 To display Heading in the biggest size

Answer:

HTML Tag Use
1. <B> To display content in Bold
2. <HR> Draws a Horizontal Ruler
3. <UL> Un ordered List
4. <DL> ‘ Define Definition List
5. <Br> It is the line break tag
6, <H1> To display Heading in the biggest size

Question 4
Abhijith wishes to submit the data entered by him using a form. The amount of data is less and security of data is not a prime factor. Which method he may select to submit the data ? justify your answer. [MARCH – 2008] (4)
Answer:
Get method

Question 5
Match the following [MARCH – 2008]

<HTML>  HREF
<A>  SIZE
<BODY>  SRC
<BASEFONT>  START
<OL>  DIR
<IMG>  TOPMARGIN

Answer:

<HTML>  DIR
<A>  HREF
<BODY>  TOPMARGIN
<BASEFONT>  SIZE
<OL>  START
<IMG>  SRC

Question 6.
Some browsers do not support frameset. In such a situation which alternative is used. Explain? [FEBRUARY – 2008] (3)
OR
Mention how <NOFRAMES> tag can help us.
Answer:
It is true, some browsers do not support frameset. In such a situation the container tag <noframes> is the alternative for frameset. It specifies the content to be shown, if the browser cannot load the frames. The content is given in a body section placed within the <noframes> tag pairs.

Question 7.
Classify the HTML related words : [FEBRUARY – 2008] (2)
Align, Frame, Href, Font.
Answer:
Attribute-Align, Href. Tag-Frame, Font

Question 8.
Aji wants to create a form in HTML to do the following: [JUNE – 2008]
1) Input name using text box.
2) Two Radio Buttons to select Male or Female.
3) InputAddress.
4) Submit Button with caption ‘OK’
Write HTML program forthe above. (5)
Answer:
1) <inputtype=’’text>
2) <inputtype=”radio” name=”sex” value=”male”> <inputtype=”radio” name-’sex” value=”female”>
3) <input type=”textarea>
4) <inputtype=”Submit” value=”ok”>

Question 9.
Midhun wants to create a web page for passing information from the user to the web server. Name the HTML tag which provides this facility. [MARCH – 2009] (1)
Answer:
<form> tag

Question 10.
Which tag can be used to provide hyperlinks in HTML? [MARCH – 2009] (1)
Answer:
<A> Tag

Question 11.
Write an HTML code to create a form with controls to accept the Reg no. of a student and to submit it. [MARCH – 2009] (2)
Answer:
<Form Method=”Get”Action=”http://www.dhse.com/ det.asp”>
Regno<inputtype=”text”><br>
<input type=”submit” value=”Submit>
</form>

Question 12.
Varun is creating a web page. He wants to create a link on the text ‘sample’ to a file named sample, htm which resides in a subdirectory named Exam of the D drive. Write the HTML command for this purpose. [MARCH – 2009] (2)
Answer:
<A Href = “D:\Exam\sample.htm”> Sample</A>

Question 13.
The default align value for a table is _________ [February – 2009]
(a) left
(b) right
(c) top
Answer:
left

Question 14.
Shabeer wants to divide the browser wondow into two sections. Which option of HTML can be used for this? [June – 2009] (1)
Answer:
<frameset>

Question 15.
Write an HTML code to create a select box with three list options low, medium and high with medium as default item. [June – 2009] (2)
Answer:

<html>
<head>
<title>
select box
</title>
</head>
<body>
<select>
<option>low
<option selected>medium
<option>high
</select>
</body>
</html>

Question 16.
Find out the output forthe following HTML statements and describe the tags using. [March -2010] (5)

<HTML>
<BODY>
<TABLE BORDER=1>
<TR>
<TD Colspan=2>College</TD>
</TR>
<TR>
<TR Rowspan=3>
</TR>
<TR>
<TD>Department1</TD>
</TR>
<TR>
<TD>Department 2</TD>
</TR>
<TR>
<TD>Department 3</TD>
</TR>
</TABLE>
</BODY>
</HTML>

Answer:
<HTML> tag is used to start the program.
<Body> Here contents are to be written.
<TABLE> is used to create a table.
<TR> is used to create a row.
<TD> is used to give table column data.

College
Departments Department 1
Department 2
Department 3

Question 17.
Write the HTML code for creating the following Webpage: [March -2010] (3)
ABC Pvt. Ltd.
HYDERABAD
1 .Health Care
2. Baby Products
a. Toys
b. Dress
3. Men’s Wear
* Casuals
* Formals
Answer:

<HTML>
<HEAD>
<TITLE> ABC Pvt.Ltd</TITLE>
<1HEAD>
<BODY>
<HI> ABC Pvt. Ltd. <Br>HYDERABAD</HI>
<OL>
<LI>HealthCare
<LI>Baby products
<OLType=”a”>
<L>Toys
<LI>Dress
</OL>
<LI> Mens Wear
<UL>
<LI>Casuals
<LI>Formals
</UL>
</OL>
</BODY>
</HTML>

Question 18.
Write the HTML code for the following table. [June – 2010] (3)

Subject Mark
Science Physics 40
Chemistry 35
Biology 48

Answer:

<html>
<head>
<title>
</title>
</head>
<body>
<table border=”1 ">
<tralign=”center”>
<td colspan=2>Subject
<td>mark
</tr>
<tralign=”center”>
<td rowspan=3>Science
<td>Physics
<td>40
</tr>
<tr align=”center”>
<td>Chemistry
<td>35
</tr>
<tralign=”center”>
<td>Biology
<td>48
</tr>
</table>
</body>
</html>

Question 19.
The tag used to create a menu in HTML is ……………… . [June – 2010] (2)
Answer:
<SELECT>

Question 20.
Write HTML tag to create a form with a text box and a submit button. [June – 2010] (2)
Answer:

<html>
<head>
<title>form
</title>
</head>
<body>
<form>
<input type=”text”>
<input type=’submit”>
</Body>
</HTML>

Question 21
List the steps for creating a hyperlink with an example. [June – 2010] (2)
Answer:
The power of HTML lies in the ability to provide hyperlinks. <A> tag is used for this. There are two types of Linking.
1) External Linking. External links are hyperlinks given to another page. By clicking on hypertext we can link or go to other webpages.
<A> Anchor tag is used for External Linking.
<A href= “c:\main. html”>Main</A>

2) Internal Linking- Internal Links are given to a section in the same document.
<HTML>
<HEAD>
<Title>lnternal linking</Title>
</HEAD>
<Body>
<p><A name=”Bio”>Biology Group</A><BR>
Subject combinations are Physics, Chemistry, Mathematics and Biology. <P>
<P><A Name= “comp”> computergroup</A> <BR>
Subject combination are Physics, Chemistry, Mathematics and Computer Science. <P>
<P><A name = “Comm’’> Commerce Group</A> <BR>
The subject combination are Business studies, Economics, Accountancy and Computer Application
<br><A href=”#Bio’’>Go Biology</A>
<br><A href=”#Comp”>Go Computer</A>
<br><A href=”#Comm’’>Go Commerce</A>
</p>
</Body>
</HTML>

Question 22.
Write a HTML code for displaying the following table. [March -2011] (3)

Object  Property  Value
Form 1  Caption  First Form
Command 1  Caption  Show Next
Command 2  Caption  Exit

Answer:

<html>
<head>
<title>
table
</title>
</head>
<body bgcolor=’ ’vbcyan”>
<table border=1>
<tr>
<th>Objectc/th>
<th>Property</th>
<th>Valu e<Ith>
</tr>
<tr>
<td>Form1</td>
<td>Caption</td>
<td>First Form</td>
</tr>
<tr>
<td>Command1 </td>
<td>Caption</td>
<td>Show Next</td>
</tr>
<tr>
<td>Command2</td>
<td>Caption</td>
<td>Exit</td>
</tr>
</body>
</html>

Question 23.
In HTML, FORM tag can accept user input and communicate it to a server program. [March -2011]
(a) Write the general format of FORM tag. (1)
(b) How will you Construct a ‘SUBMIT’ button and a RESET’ button within the FORM tag? (2)
Answer:
a) <form action=url/mailto method=get/post> </form>
b) <input type=”submit”>
<input type=”reset”>

Question 24.
HTML has the facility to provide External links as well as Internal links. [March -2011] (3)
a) Which tag is used to include an External link?(1)
b) How will you construct an Internal link? (2)
Answer:
a) Anchor Tag i.e. <a href=”filename”>
b) Internal link is used to linktwo places of the same web page

<html>
<head>
<title>
Internal link
</title>
</head>
<body bgcolor=”vbcyan”>
<a name=top href=#bottom>Goto Bottom</a>
<ultype=”circle”>
<li>Form
<li>TextBox
<li>Label
<li>CommandButton
</ul>
<a name=bottom href=#top>Goto top</a> </body>
</html>

Question 25.
Write the HTML code for creating the following table: [March – 2012] (3)
Item – Price – Qty.
Soap – 15 10
Book – 23 12
Pen – 10 14
Answer:

<html>
<head>
<title>
table
</title>
</head>
<body>
<table bonder=1> <tr>
<th>ltem</th>
<th>Price</th>
<th>Qty</th>
</tr>
<tr>
<td>Soap</td>
<td>15</td>
<td>10</td>
</tr>
<tr>
<td>Book</td>
<td>23</td>
<td>12</td>
</tr>
<tr>
<td>Pen</td>
<td> 10</td>
<td> 14</td>
</tr>
</table>
</body>
</html>

Question 26.
Suggest an alternate tag for a browser which do not support frames tag. [March – 2012] (1)
Answer:
<Noframes>

Question 27.
What is the importance of .NET technology? [March – 2012] (2)
Answer:
NET is one of the latest technologies introduced by Microsoft Corporation. With the help of .NET a de veloper can use a programming language of his choice to quickly and easily develop distributed ap plications. Distributed application means process ing take place in any processor is free in the net work. It Is similar to JVM. It is platform independent.

Eg:ASP.NET, VB.NET

Question 28.
The <DD> tag gives _________ [March 2016] (1)
Answer:
Data Description or Data Definition.

Question 29.
Create a table with 5 types of fruit names, use headings as serial number, name and cost.
OR
Create an ordered list of five fruits numbered using small Roman numerals. (5)
Answer:

<html>
<head>
<title>
table creation
</title>
</head>
<body bgcolor =“red”>
<table bonder = “1”>
<tr>
<th> Serial No</th>
<th> Name </th>
<th> cost</th>
</tr>
<tr>
<td>1</td>
<td> Banana </td>
<td> Rs. 49 </td>
</tr>
<tr>
<td>2</td>
<td>grapes</td>
<td>Rs.110</td>
</tr>
<tr>
<td>3</td>
<td>Apple</td>
<td>Rs.180<ftd>
</tr>
<tr>
<td>4</td>
<td>Orange</td>
<td>Rs.60</td>
<td>5</td>
<td>Mango</td>
<td>Rs. 40<ltd>
</tr>
</table>
</body>
</html>
<html>
<head>
<title>
Ordered list demonstration
</title>
</head>
<body bgcolor=red;
<H1> Fruits </H1>
<OLType= "i">
<li> Apple </ii>
<li>Grapes </li>
<li>Orange </li>
<li> Mangoc/li>
<li> Banana </li>
</OL>
</ Body>
</html>

Question 30.
Rahim wants to connect his webpage to www.yahoo.com. Write the tag and attributes required for these. [May – 2016] (2)
Answer:
<A> tag with href attribute is used for this
eg: <A href= “httpp://www.yahoo.com”>
Yahoo</A>

Question 31.
a) What are the difference between GET and POST methods in form submitting? [May – 2016] (2)
b) Study the following steps and determine the correct order:
(1) Open a connection to MySQL server
(2) Execute the SQL query
(3) Fetch the data from query
(4) Select database
(5) Close connection
(a) 4, 1,2, 3, 5
(b) 1,4, 2. 3, 5
(c) 1,5, 4, 2, 3
(d) 4,1,3, 2, 5 (1)
Answer:
a) Refer 3 Mark Question 12
b) (b) 1,4, 2, 3; 5

Question 32.
A link to a particular section of the same document is called …………….. [March – 2017] (1)
Answer:
Internal linking.

Question 33.
Create a web page using frames for Tourism department showing list of tourist places in Kerala. When a place is selected a detailed description should be available in a separate window.
OR
Create a form that accepts information regarding a student. Fields necessary are name, age, class, sex, roll number, hobbies and date of birth. Use appropriate form controls. [March – 2017] (5)
Answer:
By using target property , we can design like this. Considerthe following five files.
Step 1. Take a notepad and type the following and save it as main.html on C:\

<html>
<head>
<title>
Tourist places in Kerala
</title>
</head>
<body bgcolor=”cyan”>
<h1><u><b><center>Tourist Places in Keralac/ center></b></u></h1 >
<ol>
<li><a href=”tvm.html” target=”f2">Thiruvanathapur- am<7a></li>
<li><a href=”ekm.html” target=”f2">Emakulam</ a></li>
<li><a href=”clt.html” target=”f2">Calicut</ax/li>
</ol>
</body>
</html>

Step 2. Take a notepad and type the following and save it as tvm.html on C:\

<html>
<head>
<title>
Tourist places in Kerala
</title>
</head>
<body bgcolor=”cyan”>
<h1><u><b><center>Thiruvanathapuram</center></b></ux/h1><ul>
<li>Kovalam</li>
<li>Zoo</li>
<li>Padmanabha Swami Temple</li>
</ul>
</body>
</html>

Step 3. Take a notepad and type the following and save it as ekm.html on C:\

<html>
<head>
<title>
Tourist places in Kerala
</title>
</head>
<body bgcolor="cyan”>
<h1><u><b><center>Emakulam</center></b></ u></h1 >
<ul>
<li>Bolghatty Palace</li>
<li>ShipYard</li>
<li>Marine Drive</li>
</ul>
</body>
</html>

Step 4. Take a notepad and type the following and save it as clt.html on C:\

<html>
<head>
<title>
Tourist places in Kerala
</title>
</head>
<body bgcolor=”cyan”>
<h1 ><u><b><center>Calicut</center></b></u></ h1>
<ul>
<li>Kappad Beach</li>
<li>Planetorium</li>
<li>Mananchira</li>
</ul>
</body>
</html>

Step 5. Take a notepad and type the following and ‘ save it as frame.html on C:\

<html>
<head>
<title>
fiame
</title>
<frameset cols=”33% ,*”>
<frame src=”main.htmr>
<frame src=”tvm.htmr name=”f2">
</frameset>
</html>

Step 6. Execute frame.html we will get the output.
OR

<html>
<head>
<title>
form
</trtle>
</head>
<body bgcolor="cyan">
<form method=”post” action=”fa.php”>
<h1 ><u><center><b> Application Form</b></ center></u></h1>
Name &nbsp;&nbsp;
<input type="text” name="txtname”>
<br>
Age &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br>
Class &nbsp;&nbsp;&nbsp;
<input type=”text” name=”txtclass”>
<br>
Sex &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Male<input type=”radio” name=”optsex” value=”Male”>
Female<input type=”radio” name=”optsex” value=”Female”>
<br>
Roll No
<input type=”text” name=”txtroll” size=”1 ">
<br>
Hobbies
Reading<input type=”checkbox” name=”cbread”>
Singing<input type=”checkbox” name=”cbsing”>
Playing<input type=”checkbox” name=”cbplay”>
<br>
Date of Birth
<input type=”text” name=”txtdob” size=”1 ">
<br><br>
<in put ty pe=”subm it” val ue=”su bmit”>
<input type=”reset” value=”reset”>
</form>
</body>
</html>

Question 34.
Which HTML tag is used to create ordered list? [May – 2017] (1)
Answer:
<ol>

Question 35.
Write an HTML code for a web page to show the following detailsin blue background: [May – 2017] (3)
Components of a Computer
* Hardware
1. RAM
2. ROM
3. Hard Disk

* Software
1. System Program
2. Application program
Answer:

<html>
<head>
<title>
list demo
</title>
</head>
<body bgcolor=”blue”>
Components of a Computer
<ul type=”disc”>
<li>Handware</li>
<ol>
<li>RAM</li>
<li>Rom</li>
<li>Hard Disk</li>
</ol>
<li>Software</li>
<ol>
<li>System Program</li>
<li>Application Program</li>
</ol>
</ul>
</body>
</html>

Question 36.
<FORM> tag contains some other tags to facilitate interaction between user and web page. Write any two control tags and explain their mode of interaction. [May – 2017] (2)
Answer:
<lnput> It is used to create input controls. Its type attribute determines the control type.
Main values of type attribute is given below.
1. Text – To create a text box.
2. Password – To create a password text box.
3. Checkbox – To create a check box.
4. Radio-To create a radio button.
5. Reset – To create a Reset button.
6. Submit-To create a submit button.
7. Button – To create a button

Question 37.
a) Write an HTML code for a web page for your supermarket named “HELPLINE SUPER MARKET’ with the following details and features. [May – 2017]
1) A heading followed by a paragraph of 2 sentences about the district using text formatting tags and attributes.
2) Give postal address of the supermarket with phone number and email id. .
3) Include a marquee that “Hurry up, 50% off for all purchase”. (5)
OR
b) Explain and compare the features of any four scripting languages. (5)
Answer:
a)

<html>
<head>
<title>
HelpLine Super Market
</title>
</head>
<body bgcolor=”cyan”>
<marquee bgcolop=”red” height=”40"> Hurry up, 50% offforall purchase</manquee>
<h1alig.n=”Center”>HELPLINE<br> SUPERMARKET </h1>
<h2 align=”left”><u><i>Trichur</i></u></h2>
<p>Our district is Trichur. It is situated in the central part of Kerala
</p>
Postal Address
<br>
HELPLINE SUPER MARKET,
<br>
Main Road,
Irinjalakuda.
<br>
Phone No.9999900000.
<br>
Email Id: info@helpline.com.
</body>
</html>

b) 1) JavaScript: Java script(developed by Brendan Eich for the Netscape browser) is a platform-independent scripting language. Means It does not require a particular browser. That is it runs on any browser hence it is mostly accepted scripting language.

2) VB Script: VB Script(developed by Microsoft) is a platform-dependent scripting language. Means it requires a particular browser(MS Internet Explorer) to work that is why it is not a widely accepted scripting language.

3) Active Server Pages (ASP)
1) ASP introduced by Microsoft
2) ASP stands for Active Server Page.
3) ASP’s are web pages that are embedded with dynamic contents, such as text.HTML tags and scripts.
4) An ASP file uses .asp extension.
5) In ASP, the script execute in the server and the effect will be sent back to the client computer.
6) Here a real time communication exists between the client and server.
7) ASP applications are very small.
8) The only server used is Microsoft Internet Information Server(IIS), hence it is platform dependant

4) Java Server Pages (JSP)
1) JSP introduced by Sun Micro System
2) JSP stands for Java Server Page.
3) An JSP file uses .jsp extension
4) It is platform independent
5) It uses Apache Tomcat web server
6) JSP binds with Servlets(Servlets are Java codes run in Server to serve-the client requests).

Plus Two Computer Science Chapter Wise Previous Questions and Answers Kerala

HSE Kerala Board Syllabus HSSLive Plus Two Computer Science Chapter Wise Previous Questions and Answers Pdf Free Download in both English Medium and Malayalam Medium are part of SCERT Kerala Plus Two Chapter Wise Previous Questions and Answers. Here HSSLive.Guru have given Higher Secondary Kerala Plus Two Computer Science Chapter Wise Previous Year Important Questions and Answers based on CBSE NCERT syllabus.

Board SCERT, Kerala
Text Book NCERT Based
Class Plus Two
Subject Computer Science
Chapter All Chapters
Category Kerala Plus Two

Kerala Plus Two Computer Science Chapter Wise Previous Year Questions and Answers

We hope the given HSE Kerala Board Syllabus HSSLive Plus Two Computer Science Chapter Wise Previous Questions and Answers Pdf Free Download in both English Medium and Malayalam Medium will help you. If you have any query regarding Higher Secondary Kerala Plus Two Computer Science Chapter Wise Previous Year Important Questions and Answers based on CBSE NCERT syllabus, drop a comment below and we will get back to you at the earliest.