Board Question




Q1.

Write any two advantages of online shopping.

 

ANSWER

 

i. A customer does not have sufficient time to visit stores

ii. A product or service that is not available in the local market is available online.

 

Q2.

Differentiate between Primary key and Foreign key.

 

ANSWER

 

A primary key is a unique value that identifies a row in a table whereas a foreign key identifies a column or set of columns in one (referencing) table that refers to a column or set of columns in another (referenced) table.

 

A table can have only one primary Key but a table can have multiple foreign keys

 

Q3.

Define the following Hot spots:-

a) WIMAX

b) Wi-Fi

 

ANSWER

 

a) WIMAX: It is a wireless communications standard designed to provide mobile broadband connectivity across cities and countries through a variety of devices

 

b) Wi-Fi: It is a popular technology that allows an electronic device such as computers or mobile phones to exchange data wirelessly over a network

 

Q4.

What precautions must be taken to improve online security?

 

ANSWER

 

i. Antivirus and Antispyware programs offer real-time protection monitoring your computer for any changes by malware software.

 

ii. Use strong passwords a combination of alphanumeric and special characters could be used for creating a password that is not so easy to crack or guessed by other users.

 

iii. Secure transactions because information such as credit card details or personal information is sent over the network.

 

iv. Use encryption software to protect your data from unauthorized users.

 

Q5.

What is DBMS? Explain any two advantages of DBMS.

 

 

ANSWER

 

A database management system is a software package with computer programs that controls the creation, maintenance, and use of an integrated collection of data records, files, and other objects. It allows organizations to conveniently develop databases for various applications.

 

Advantages:

i) Data integrity: means the data is accurate and consistent in the database. It is very important as there are multiple databases in a DBMS so it helps to

produce the correct result.

 

ii) Data sharing: In a database, the users can share the data among themselves. Data can be shared for multiple purposes with the users located at different

geographical locations then remote users can also access the database simultaneously.

 

Q6.

a) The structure of a table “ITEM” is given below. Suggest suitable data type and size of each column.

Column name           Type            Size

Itemno               ____________            ______

Iname                 ____________            ______

Price                   ____________            ______

Quantity            ____________            ______

 

b) Consider the following table “ITEM”:

Table: Item

Itemno            Iname            Price            Quantity

11                       Soap                  40             80

22                       Powder            80             30

33                       Face cream     250           25

44                       Shampoo         120           100

55                       Soap box          20             50

 

Write queries to

i. Display the total amount of each item. The amount must be calculated as

the price multiplied by quantity for each item.

ii. Display the details of items whose price is less than 50.

 

ANSWER

 

a) Itemno     integer (10)

Iname           varchar(15)

Price             decimal(5,2)

Quantity      integer(3)

 

b) i. Select price * quantity from item;

 ii. Select * from item where price < 50;

 

Q7.

State the purpose of creating a Blog.

 

ANSWER

A blog is a discussion style site used by non-technical (and technical users) users for creating personal web pages. Blog is used to convey messages about events,

announcements, news, reviews, etc. Blogs are usually managed using a web browser and this requires active internet connection.

 

Q8.

Differentiate between Flat File and Relational Database.

 

ANSWER

 

Flat File: Data is stored in a single table. Usually suitable for less amount of data.

 

Relational Database: Data is stored in multiple tables and the tables are linked using a common field. Relational is suitable for medium to large amount of data.

 

Q9.

Define the following:

Table , Primary Key, Foreign Key

 

ANSWER

 

Table: A table is a collection of related data held in a table format within a database. It consists of columns, and rows.

 

Primary Key A primary key is a unique value that identifies a row in a table. For example, Student Table contains columns such as Admno, Name, DOB , Address, Phone and Admno can be considered as Primary Key.

 

Foreign Key: a foreign key is a field or a column that is used to establish a link between two tables. In simple words you can say that, a foreign key in one table used to point primary key in another table.

 

Q10.

What is DDL and DML? Give one example of each.

 

ANSWER

 

Data Definition Language (DDL)

A data definition language or data description language (DDL) is a standard for commands that define the different structures in a database. DDL statements create, modify, and remove database objects such as tables, indexes, and users.

 

Example

CREATE, ALTER, and DROP.

 

Data Manipulation Language (DML)

A data manipulation language (DML) is a language that enables users to access and manipulate data in a database. The goal is to provide efficient human interaction with the system.

For Example Insert, Update, Delete and Select

 

Q11.

(a) Write a Query to create a Table with the following structure

Table Product

 

Field            Datatype

PID             Char(4)

Pname             Varchar(20)

Description Varchar(40)

Price             Decimal

 

ANSWER

 

Create table Product

 (PID Char(4),

 Pname Varchar(20),

 Description Varchar(40),

 Price Decimal);

 

Q12.

Consider the following Vendor table and write the queries

Table Vendor

VendorID VName DateofRegistration Location

V001 Mother Dairy 20-01-2009 Delhi

V002 Havmor 01-04-2015 Gujrat

V003 Amul 12-05-2012 Kolkata

V004 Kwality Walls 15-10-2013 Mumbai

(i) Write a Query to display all records

(ii) Write a Query to add a new row with the following details

 („V005‟, „Vadilal‟, „2010-03-20‟, „Pune‟)

(iii) Write a query to modify the location of V003 from Kolkata to Gujrat

 

 

ANSWER

 

i) Select * from Vendor;

 

ii) Insert into Vendor values („V005‟, „Vadilal‟, „2010-03-20‟, „Pune‟)

 

iii) Update Vendor

 Set location= „Gujrat‟

 Where location= „Kolkata‟

 

Q13,

Ananya uses Internet for her School Project. Suggest any five security measure to ensure safety from online threats.

 

ANSWER

 

Five safety measures :

i) Use antivirus and antispyware software

ii) Use strong passwords

iii) Backup your data:

iv) Use encryption software

v) Keeping your username and password private

vi) Do not share personal information

vii) Secure transactions:

 

Q14.

Explain the following terms :

Internet, LAN, Instant Messaging, Blog, P2P Architecture

 

ANSWER

 

a. Internet : The Internet is a global system of interconnected computer networks that use the standard Internet protocol suite to serve billions of users worldwide

 

b. LAN : A local area network (LAN) is one which connects computers and devices in a limited geographical area such as home, school, computer

laboratory, office building, or closely positioned group of buildings

 

c. Instant Messaging: Instant messaging (IM) is a form of communication over the Internet that offers an instantaneous transmission of text-based messages from sender to receiver.

 

d. Blog : A blog is a discussion style site used by non-technical (and technical users) users for creating personal web pages.

 

e. P2P Architecture : Peer to Peer : Networks in which all computers have an equal status are called peer to peer networks.

 

Q15.

Write command to create a table named ‘BOOK’ with following fields:

BOOK ID Char(4)

Bname Varchar(15)

Author Varchar(20)

Price Decimal

 

a. Identify the primary key of the ‘Book’ Table, also mention the suitable reason for choosing it as a Primary Key

 

ANSWER

 

Create table BOOK

( BOOK_ID char(4),

Bname varchar(15),

Author varchar(20),

Price Decimal );

 

a. Book_id may be chosen as the Primary key because every book has a unique id that may be used to identify the book.

 

Q16.

Differentiate between char and varchar datatype

ANSWER

 

char :

1. Stores exactly the length specified by user in field definition.

2. Pads with trailing spaces for shorter strings

 

varchar:

1. It Stores up to the specified length.

2. No padding with extra spaces

Q17.

Define DDL and DML

 

ANSWER

 

DDL : A data definition language or data description language (DDL) is a standard for commands that define the different structures in a database

 

DML : A data manipulation language (DML) is a language that enables users to access and manipulate data in a database.

 

Q18.

Write the SQL commands to answer the queries based on Fabric table

FabricID     Fname     Type        Disc

F001            Shirt         Woollen 10

F002        Suit         Cotton         20

F003         Tunic         Cotton         10

F004         Jeans         Denim         5

F006         Shorts         Cotton         7

 

a. To insert the following record

(“F005”, “Kurta”, “Woollen”,5)

 

b. To display only those fabric whose disc is more than 10

 

c. To display those record whose type is ‘Woollen'

 

d. To modify the fabric shirt by increasing discount by 10

 

e. To delete the record of fabric F003 from table

 

ANSWER

 

a : insert into Fabric values (‘F005’, ‘Kurta’, ‘Woollen’,5);

 

b : select * from Fabric where Disc>10;

 

c : select * from Fabric where type = ‘Woollen’;

 

d: update fabric

set Disc =Disc + 10

 where Fname = ‘Shirt’;

 

e : delete from Fabric where FabricID =‘F003’;

 

 

Post a Comment

0 Comments