You are on page 1of 2

SAMPLE QUESTION PAPER 2

1. cardinality refers to total number of rows in a table whereas degree refers to the total
number of columns in a table
OR * char is a datatype which can have a fixed length string whereas varchar is a datatype
which can have a variable length string
*in char fixed number of bytes are used for every data whereas in varchar the space
not used can be reused and hence there is no wastage of space.
2. DDL stands for data definition language which is used to create, change or delete
data from a table. From the given commands, create and alter are DDL commands.
DML stands for data manipulation language which helps in inserting, retrieving, or
modifying data from a table.From the given commands, update and select are DML
commands.
3. Data redundancy refers to storage of same data multiple times. Database helps in
reducing redundancy by storing all the data at one place hence the data can be
retrieved from same place.
OR data inconsistency means when multiple mismatched copies of same data is present in
a table, for example in table student if two different students have same roll number this
condition is known as data inconsistency.
4. Artificial intelligence refers to the ability of a machine to think and act like humans.
Examples of AI are siri or alexa, sofia the robot, self driving cars of tesla.
5. Primary key is a constraint that ensures that unique values are entered in a table and
it cannot store null values whereas unique key also ensures unique values are
entered but it can store null values. Also multiple columns in a table can have unique
constraint whereas only one column in a table can have primary key.
6. NOT NULL constraint ensures that the column never has any empty values if NOT
NULL constraint is not given then MY SQL assume NULL values and hence can
have empty values in columns.
7. a) show tables;
b) desc <table name>;
c) use <database name>;
d) select * from <table name>;
8. Big data is used to describe large data sets. Characteristics of big data are:-
a) Volume- it refers to the large amount of data generated.
b) Variety- it refers to the number of types of data generated.
c) Velocity- it measures the speed of data coming in that is how fast the data is coming
in.
d) Value- as huge cost is involved in storing data, big data must be stored in a way that
it gets converted to something valuable.
e) Veracity- it refers to the accuracy of data.
OR various types of services of cloud computing are:-
a) Software as a service- in this service a complete application is offered to the
customer and the customer doesnt have to worry about installation or set up of the
application.
b) Platform as a service- in this type of service a development environment is offered
as a service on which other higher levels of service can be built.
c) Infrastructure as a service- it provides storage and computing capabilities as services
over other network.
9. a) itemcode can be used as primary key.
b) cardinality- 6
Degree- 4
c) insert into STORE values( 11007, 'scissor', 25,15);
10. Create table STUDENT (
Rollno int(5) primary key,
Name varchar(30) not null,
Adhaar varchar(12) unique,
Address varchar (50) default ' mumbai');
11. a) Select name from SPORTS where game1='c' or game2='c';
b) select name from SPORTS where game1=game2;
c) select game1,game2 from SPORTS where name like 'a%';
d) Select * from SPORTS where class=7 order by name desc;
12. a) all details of names having owner gwen, benny will be displayed.
b) name, sex of chirpy, whistler, slim, puffball will be displayed.
c) output :- cat, dog, snake
d) details of fluffy, buffy, chirpy will be displayed.

OR a) name, department, salary of sandeep, sangeeta, rakesh, shyam, shiv om, salakha will
be displayed.
b) all details of t_id 1,3,5,6,7 will be displayed.
C) all details of t_id 4,5,6,7 will be displayed.
D) details of columns t_id, name, department will be displayed.
13 a )Alter table EMPLOYEE add column address varchar(50);
b) update EMPLOYEE set first_name= 'gautam' where id= 3;
C) update EMPLOYEE set salary= salary+ 1000 where salary<5000;
d) Delete from EMPLOYEE where first_name= 'siddharth';

You might also like