DBMS OBJECTIVE FA( POSSIBLE ANSWERS )
********************* SURE CORRECT *********************
Q) Tables Patient and doctor have M : N relationship…………with figure
Ans - (C) join_pd resides in a newly created table
Q) Which of the following statements TRUE with respect to Agile Methodologies?
(i) Ensures early ROI
(ii) Risk mitigation and Recovery through short deliveries
(iii) High Quality and Productivity can not be guaranteed due to frequent deliveries.
Ans- (C) Only (i) and (ii)
Reference : Lex -> SE -> Agile -> S/W Dev. Approach -> Page 7
Q) Which of the following statements TRUE with respect to Agile Methodologies?
(i) Changes are always welcome
(ii) Emphasizes more communication and need based documentation.
(iii) Single delivery after testing
Ans- Only (i) & (ii)
Reference : Lex -> SE -> Agile -> S/W Dev. Approach -> Page 6
Q) An online apparel store is deployed on-premise. The traffic forecast for the apparel store
application varies based on various parameters. What are the implications of the on-premise
solution?
(A) Under-utilization of on-premise servers reduces the ROI.
(B) On-premise servers maybe overloaded with the Traffic.
(C) Limited Scalability in the on-premise environment, leads to loss of business continuity
(D) All of the Above
Ans- (D) All of the above
Reference : Software Engineering
Q) An attacker tries to retrieve the data and exploit the websites by altering the Database by
inputting queries.
(A) Broken Authentication
(B) SQL Injection
(C) XML External Entities
(D) Security Misconfiguration
Ans - (B) SQL Injection
Reference : Lex -> Introduction to Cyber Security -> Secure Coding OWASP Top 10 ->
A1 Injection
Q) For a symmetric cryptography system having n=10 users, how many secret keys are
required?
Ans- (C) 45
Logic - For Symmetric Cryptography:
n*(n-1)/2 keys
For Non-Symmetric Cryptography:
2*n keys
Q) Which of the following are FALSE with respect to the DEFAULT clause….
(A) DEFAULT option can be provided only for NOT NULL attributes.
(B) A column can be given the default value by using the DEFAULT option.
(C) The data type of column and default expression need not to be same
(D) DEFAULT option can be provided to any attribute.
Ans - (A) and (C)
Q) In a relationship between two entries user and mobile ……..Crow foot notation…..
Ans- (C)
Q) An employee sends an objectionable email to his colleagues. But the later employee lies
that he didn't send this letter. This is known as
(A) Spoofing
(B) Tampering
(C) Repudiation
(D) Denial of Service
Ans- (C) Repudiation
Reference : Cyber Security
Q)
Ans-
Q)
Ans- (B) SELECT SUBSTR(TO_CHAR(dob, ‘MM/DD/CCYY’), 1, 2) DOB FROM employee
(D) SELECT TO_CHAR(dob, ‘MM’) DOB FROM employee
Q) CREATE TABLE item(
itemid VARCHAR2(6) PRIMARY KEY,
ARCHAR2(10) U
itemname V NIQUE NOT NULL,
itemdesc V ARCHAR2(20) U NIQUE
);
Which of the following statements is TRUE with respect to above command?
Ans- (D) One primary key will be created
Q) Consider a Patient table with attributes patientid(primary key), patientname, city,
dateofbirth and phone. Except patientid no columns are ….
IDX1 - patientid
IDX2 - patientname, dateofbirth
IDX3 - dateofbirth, phone
Which of the following queries will result in INDEX UNIQUE SCAN?
(A) WHERE city<> ‘Mumbai’ AND dateofbirth > ‘30-Mar-1995’
(B) WHERE patientid = ‘P1007 AND dateofbirth > ‘30-Mar-1995’
(C) WHERE patientnme = ‘Sam’ AND dateofbirth > ‘30-Mar-1995’
(D) WHERE patientname LIKE ‘R%’
Ans- (B) WHERE patientid = ‘P1007 AND dateofbirth > ‘30-Mar-1995’
Q) SoftCenter, an IT Company, is planning to use Software Tools and Framework on Cloud.
A) Google Compute Engine on GCP
B) Google App Engine on GCP
C) Citrix Xenserver
Ans - (B) Google App Engine on GCP
Explanation : Google App Engine is a PaaS and Google Compute Engine is IaaS.
Q) Out of the following what are the characteristics of Anomaly-based IDS? (Select 2 Correct
Answers)
A) It models the normal usage of network and creates a profile
B) It doesn’t detect novel attacks
C) Anything unusual happening from the profile is not assumed to be intrusion activity
D) Observes normal behavior of users to create a behavior profile.
Ans- (A) It models the normal usage of network and creates a profile
(D) Observes normal behavior of users to create a behavior profile.
Explanation/Reference : Intrusion Detection System
Q) The test team is carrying out performance testing for a web based Travel Management
System, for ………… "The system shall support access to 100 travel agents and 100000
Travelers at any time". Which of the following is the testing needed for the above
requirement?
(A) Load Testing
(B) Endurance Testing
(C) Functional Testing
(D) Regression Testing
Ans - (A) Load testing
Reference - Software Engineering -> Types of Software Testing
Q) Identify the Activities among the following that are carried out during the coding phase.
(Choose exactly 2 Appropriate options)
(A) Compilation of Source Code
(B) Documenting user manual
(C) Arriving at SRS
(D) Finding user needs
(E) Self - Testing of Implemented Code
Ans - (A) Compilation of source code
(E) Self-testing of implemented code
Reference : Software Engineering
Q) A startup is looking for an office automation solution to help its staff collaborate and work
efficiently. Which of the following fits best?
Ans: - Deploy a custom-based solution on PaaS offering from cloud
Q) Which of the following is true regarding symmetric cryptography?
(A) Symmetric cryptography uses public-private keys
(B) Requires secure exchange of keys before establishing secure communication.
(C) Symmetric key cryptography provides non-repudiation
(D) Symmetric key cryptography provides message integrity
Ans- (B) Requires secure exchange of keys before establishing secure communication.
Q) An enterprise provides human resource management services such as reskilling, mock
interviews, etc, to study premise costs. Which solution meets the requirement?
(A) Deploy the workload in the public cloud
(B) Keep all the data in an on- premise environment and push th apps to the public cloud
(C) Leverage private cloud computing services
Ans - (B) Keep all the data in an on- premise environment and push th apps to the public cloud
Reference : Cloud Computing
Q) Cloud computing describes the on-demand delivery of resources over the web. Which
among the following describes features of Cloud.
(A) Rapid Scaling
(B) Dynamic Allocation of Resources
(C) Reduced Management Overhead
(D) All of the Above
Ans - (D) All of the above
Reference : Lex -> Introduction to Cloud Technologies -> Cloud Computing and its
Capabilities
Q) A firewall is used to inspect __________ that are going in and out of the Computer
(A) User Requests
(B) Updates
(C) Connections
(D) Data Packets
Ans - (D) Data packets
Reference : Cyber Security
Q) An enterprise has identified other agencies to collaborate with, on common business
objectives. Which deployment model should be used?
(A) Community Cloud
(B) Private Cloud that exclusively operates for the requesting Agency
(C) Public Cloud
(D) Hybrid Cloud
Ans- (A) Community cloud
Reference : Lex -> Introduction to Cloud Technologies -> Cloud Deployment models
Q) Effort involved in a project which started on 15th Jan 2013- 1st Oct 2013….
Ans - 25
Q)Which of the following security controls can be used to mitigate SQL Injection
vulnerability.
(A) Construct queries using Prepared Statement.
(B) Robust input validation.
(C) Using HTTPS so that communication between client and server is encrypted.
(D) Construct Queries using String Concatenation.
Ans- (A),(B) & (C)
Reference : Lex -> Introduction to Cyber Security -> Secure Coding OWASP Top 10 ->
A1 Injection Risks Root Causes and its Mitigation -> Page 2
Q) A group of research enterprises decided to collaborate COVID-19 vaccine research,
using cloud services. Which cloud Deployment should be used?
(A) Private Cloud
(B) Public Cloud
(C) Community Cloud
(D) Hybrid Cloud
Ans - (C) Community Cloud
Reference : Lex -> Introduction to Cloud Technologies -> Cloud Deployment Models
Q) Consider the table product given below
Table Product
productid productname manufacturedate expirydate
P1001 Hairgro Shampoo 15-Jan-16 15-Jul-17
P1002 Jones Mixed Jam 25-Jan-16 25-Jul-16
P1003 Skingrow Soap 20-Apr-16 25-Oct-16
P1004 Oleano Olive soap 16-Mar-17 16-Sep-17
P1005 Sweet n Spice Sauc 25-Mar-17 20-Aug-17
Query
SELECT * FROM product WHERE ADD_MONTHS(manufacturedate, 6)>= expirydate
How many rows will be fetched when the above query is executed?
Ans- 3
Q)
companyname location ranking
TCS Delhi 2
Infosys Mysore 1
Accenture Mumbai 5
SAP labs Chennai 4
Deloitte Hyderabad 3
What will be the third row when the following query is executed?
SELECT companyname FROM company ORDER BY location DESC;
Ans- Deloitte
Q) Consider the table purchase given below
purchaseid customerid compid discount purchasedate paymentmode billamount
P101 C101 COM101 8 5-Jun-16 CASH 34951
P102 C106 COM107 10 7-Mar-16 CARD 46195
P103 C102 COM105 7 8-Jul-16 CARD 35796
P104 C103 COM106 5 8-Oct-16 CARD 34057
P105 C103 COM106 10 10-Oct-16 CASH 32265
P106 C104 COM102 6 11-Jul-16 CASH 40232
P107 C105 COM103 5 15-Jul-16 CARD 54997
P108 C106 COM105 8 7-Mar-16 CASH 35411
SELECT p1.customerid, p1.compid FROM p urchase p1 INNER JOIN purchase p2
ON TO_CHAR(p1.purchasedate, ‘MON’) = TO_CHAR(p2.purchasedate, ‘MON’)
AND p1.customerid = p2.customerid AND p
1.purchaseid <> p2.purchaseid
How many rows will be fetched when the above query is executed?
Ans- 4
Output -
CUSTOMERID COMPID
C103 COM106
C103 COM106
C106 COM105
C106 COM107
**************************** MAYBE CORRECT ******************************
Q) Which of the following describes the features of PaaS? ( Multi- correct )
(A) Shared Infrastructure => Vote 1
(B) Dedicated Infrastructure
(C) Pre-built runtime
(D) Reduced deployment overhead => Vote 1
Ans - A,C // As per priya
Explanation: PaaS provides Platform as a service i.e. it provides resources(hardware) as
well as application (runtime environment) for the users.
Q) Most employees in an organisation are only granted “Standard User” rights on their
computers. Only some employees including IT Administration are granted "Administrator
User" rights. What is the Rationale Behind this?
(A) Users must be granted the minimum level access that is required to carry out
their required routine activities
(B) Software licensing does not allow all users in an organization to have
"Administrator User" rights.
(C) The reason is adherence to Defence in Depth strategy which says users should
have the minimum level of access to a resource
(D) The minimum number of users must be granted the maximum level of access.
This ensures access violations are reduced. This approach is called Secure Default Access.
Ans - ?????
********************* INCOMPLETE QUESTION ********************
Q) The following transaction logic is executed on the trip table
BEGIN
UPDATE trip SET amount…..
………
Ans - (A) Both the update and delete are reflected in the database.
Q) …………………….
eccno and floorno is COMPOSITE PRIMARY KEY and employeeno is the FOREIGN…
……………………..
Ans- (A) INSERT INTO ecc VALUES ( ‘E75’, 2, 5894)
(D) INSERT INTO employee(employeeno) VALUES (5890)
Q) ………………………………………..
SELECT p.projectid, p.projectname, a.empid FROM project p
FULL OUTER JOIN allocation a ON p.projectid=a.projectid IS NOT…..
How many rows will be fetched when the above query is executed?
Ans- (B) 3
Q) ………………………………………..
SELECT COUNT( DISTINCT routeid ) FROM service GROUP BY acfacility;
How many rows will be fetched when the above SELECT query is executed?
Ans- (A) 5 // Don’t know
(C) 2 // which one
Q) ………………………………………..
SELECT DISTINCT qtyavailable FROM toys
WHERE price< ( SELECT MAX(price) FROM toys WHERE qtyavailable > 150)
How many rows will be fetched when the above query is executed?
Ans- (C) 2
Q) ………………………………………..
SELECT customername FROM customer c INNER JOIN………….
WHERE accounttype IN ( SELECT accounttype FROM ……….
(SELECT MAX(COUNT(accounttype)) FROM account GROUP BY ……
How many rows(s) will be fetched when the above query is executed?
Ans- (D) 2
Q) ………………………………………..
SELECT empno, empname FROM employee e1 WHERE salary >=
(SELECT AVG(salary) FROM employee e2 WHERE e1.location=e2.location AS…...
How many rows(s) will be fetched when the above query is executed?
Ans- (D) 3
Q) ………………………………………..
SELECT s1.shopid, s1.salesamount FROM shop s1, shop s2 WHERE s1.dateofsale=s2.dateofsale
How many rows(s) will be fetched when the above query is executed?
Ans- (B) 4
Q) ……………………………
INSERT INTO book VALUES(‘P1005’, ‘Passion Spent’, ‘C’)
Choose the option that correctly identifies the outcome of their statements
Ans - (C) Tom insert fails due to CHECK constraint violation whereas Dick’s insert also fails
due to CHECK…..
Q) ………………………………..
DELETE FROM employee WHERE compid IN(20, 30);
DELETE FROM computer WHERE model = ‘Edge’
Which of the following statements are TRUE when the above queries are executed
sequentially?
Ans- (B) There will be two computers of make ‘Dell’
(D) There will be two Male employees
Q) …………………………..
Maria writes the following query………
SELECT studentname, subject, marks FROM student ORDER BY subject, marks;
Which of the following STUDENTNAME appears in the third record of the output?
Ans- (C) Louise
Q) …………………..
select * from customer where gender in (‘M’, ‘F’) and dob like ‘%Mar%’;
Which of the following index will be used for the above query?
Ans- (C) No index will be used
Q)
Ans- SELECT DISTINCT p.prodid, p.name, pp.custid FROM product p LEFT JOIN purchase
pp ON p.prodid = pp.prodid
Q)
Ans - (D)
SELECT SUBSTR( studentid, 2) STUDENTID, LOWER(studentname) || ‘-’ || studentid) STUDENT
NVL(TO_CHAR(marks), ‘NA’) MARKS FROM STUDENT WHERE studentname LIKE ‘%e’
Q)
Ans- (B) FROM product p LEFT OUTER JOIN orders o ON p.productid=o.productid
GROUP BY p.productid, o.paymode
(D) SELECT DISTINCT p.productid, o.paymode, SUM(p.price) totalprice
FROM orders o RIGHT OUTER JOIN product p ON p.productid=o.productid
AND payment IS NOT NULL GROUP BY p.productid, o.paymode
Q)
Ans- (C) ALTER TABLE student DROP (country)
ALTER TABLE student ADD (cgpa NUMBER(3, 2), dept CHAR(3))
Q)
Ans- (D) SELECT ename, e.managerid FROM employee e LEFT OUTER JOIN manager m
ON e.managerid = m.mangerid WHERE e.managerid IS NOT NULL
Q)
Ans- (C) where arrivalcity=’Kolkata’ and trainname LIKE ‘%s’
Q) ……………………..
(i) Scribe
(ii) Reviewer
(iii) Author
(iv) Moderator
Ans- (C) (i)-(c); (ii)-(a); (iii)-(d); (iv)-(b)
Q)
Ans- (B) teacher( teacherid, teachername, salary )
Subject ( subjectid, subjectname )
Allocation ( teacherid, subjectid, deliverymode, fee )
Q) ……………………………………
Which will be the resulting relational schema after converting to 3NF?
Ans- (C) player ( playerno., playername, playertype )
game( gamername, gametype, duration, amount )
discount( playertype, gamername, discount )
Q)
Ans- (C)
DATE1 DATE2
26-DEC-17 26-MAR-17
Q)
Ans- (D)
BOOKNAME NOOFSTUDENTS
Networking 2
Q)
Ans-
TOYID TOYTYPE TOYCATEGORY
T101 ActionFigure B
T102 Boardgame A
T103 SportGame C
T104 Others C
T105 SoftToy A
T106 BoardGame B
Q)
Column Name Data Type and Size Constraint
modelno VARCHAR2(5) PRIMARY KEY
brand VARCHAR2(20)
manufacturedate DATE DEFAULT SYSDATE
sensor CHAR(3) CHECK(sensor………..)
price INTEGER
Ans- Either (A) AND (B) (more pressure) || (B) AND (D)
(A) INSERT INTO mobiledetail(model, price) VALUES(M1001, 10000);
(B) INSERT INTO mobiledetail VALUES (M1002, ‘Nokia’, 25-Aug-1993, ‘Yes’, 10000)
(C) INSERT INTO mobiledetail(brand, sensor, price, modelno) VALUES(‘Motog…….)
Q)
Ans-
BOOKID BOOKNAME
303 Sense and Sensibility
302 Persuasion
304 Lady Susan
301 Emma
Q)
…….. ………. ……. ……..
C901 P802 HSBC UK
C902 P803 SWD Canada
C903 P805 ICICI California
C904 P803 SWD Canada
C905 P806 RBS Netherland
C906 P807 Amron Canada
Ans- (B) DELETE FROM client WHERE clientlocation = ‘Canada AND clientname=’SWD’
(D) DELETE FROM project WHERE projectcode IN (‘P804’, ‘P801’)
Q)
Ans-
PROJECTDOMAIN AVGSAL TOTALBONUS
Insurance 40000 1300
Telecom 21667 600
Q)
Ans- (C)
STUD_NAME COURSEID
Katherine C3
Q)
Ans- (B)
CUSTOMERID CUSTOMERNAME
C703 Phillip
C702 Scott
C701 Halen
Q)
Ans- (C)
CUSTNAME CUSTTYPE
Felix PRIVILIGED
Jack REGULAR
Q) Consider a mongodb collection book given below
……………………….
db.book.update({_id : 903}, {$set: { Rating: 8……………………..
…………………..
How many documents will be retained in the collection book after executing the above query
Ans- (B) 3
Q) Consider a mongodb collection book given below
>db.boof.find();
……………………….
db.book.update({_id : 1002}, {$set: { Rating: 4……………………..
…………………..
How many documents will be retained in the collection book after executing the above query
Ans- ?????
Q) …………….
………………….
planid customerid weight target
P101 C101 70 50
P102 C102 90 70
P103 C103 110 80
P104 C106 80 50
P105 C105 90 70
Query
SELECT customerid FROM customer W HERE customername LIKE ‘%e%
UNION
SELECT planid FROM dietplan WHERE weight BETWEEN 90 AND 100
How many rows will be fetched when the above query is executed?
Ans- ???
Q) ……………………………
………………………….
SA3 B1 Seattle S2
SA4 B2 New York S4
SA5 B1 Detroit S2
SA6 B3 Boston S1
SA7 B3 Seattle S2
SA8 B4 New York S4
Query
SELECT bookname, studentname FROM student s, book b, booksale bs
WHERE b.bookid=bs.bookid AND s.studentid=bs.studentid
AND gender = ‘F’ AND bs.stidentid IN ( SELECT studentid FROM booksale
GROUP BY studentid HAVING COUNT( DISTINCT bs.bookid ) =
(SELECT MIN(COUNT(bookid)) FROM booksale GROUP BY bookid)) AND LENGTH(bookname)<12
What will be the output when the above query is executed?
(A)
BOOKNAME STUDENTNAME
Brain Teasers Maria
Science Revolution Alice
(B)
BOOKNAME STUDENTNAME
Tech World Maria
India Today Susan
(C)
BOOKNAME STUDENTNAME
Brain Teasers Maria
India Today Susan
Science Revolution Alice
(D)
BOOKNAME STUDENTNAME
Science Revolution Alice
Tech World Maria
India Today Susan
Ans- ???