0% found this document useful (0 votes)
50 views

RPSC Programmer MCQ 2

Uploaded by

Vikas Singhal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views

RPSC Programmer MCQ 2

Uploaded by

Vikas Singhal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

RPSC Programmer, ACP एवं सभी IT Vacancies के Exam Oriented

Quality Content & DAILY PYQs MCQs QUIZ के लिए Join करे
Telegram Channel
https://t.me/ComputerMap29
https://t.me/ComputerMap29

👆लिंक पर क्लिक करें तरु न्त


(1) If a system can enforce referencial integrity, then this ensures that

(A) a foreign key in a record always refers to another record which contains nulls

(B) a foreign key in a record always refers to another record which does not contain nulls

(C) a record is always referred to from another record

(D) a record can never contain a null value for a foreign key.

(E) a non-null foreign key attribute always refers to another record✅

(2) Table and view names are unique in the database. To make this easier,

(A) Table names are only viewable by the person who created them.

(B) Tables are stored on each user’s own disk space.

(C) The DBA can make creating tables with certain strings in the name password protected.

(D) Table names have their creator’s user name prepended to the table name.✅

(E) A table created with the same name as another table is automatically renamed to make it unique.

(3) During Rollforward, which of the folling is not true

(A) Transactions which are in the log but not yet committed are restarted where they left off.

(B) Committed transactions in the log are reapplied.

(C) Committed transactions are reapplied in the same order as they appear in the log.

(D) Transactions which are reapplied are reapplied to the image as it was since the last checkpoint.

(E) Only once the rollforward has been completed can new transactions be performed.

(4) Which of the following is not used to support recovery and consistency in a database system?

(A) Access logging

(B) A dump

(C) Two phase commit

(D) Checkpointing

(E) A journal
(5) A database can be left in an inconsistent state due to

(A) Deadlock

(B) A transaction fails and its changes are applied to the

Database.

(C) Roll-forward after a failure.

(D) Transactions being aborted.

(E) Inaccurate data is entered into the database.

(6) Locking was introduced into databases so that

(A) Keys can be provided to maintain security.

(B) Reading and writing is possible.

(C) All simultaneous transactions are prevented.

(D) Passwords can be provided to maintain security

(E) Consistency can be enforced.

(7) Relation C is a projection of relation A. Which of the following statements must be true in all
cases where relation C is different from relation A?

(A) The cardinality of C is greater than the cardinality of A

(B) The cardinality of C is less than the cardinality of A

(C) The arity of C is greater than the arity of A

(D) The arity of C is less than the arity of A

(E) None of the above

(8) Relation C is the join of relation A and relation B on condition p. Which of the following
statements must be true in all cases?

(A) The cardinality of C is greater than the cardinality of A

(B) The cardinality of C is less than the cardinality of A

(C) The arity of C is greater than the arity of A

(D) The arity of C is less than the arity of A

(E) None of the above

(9) In transaction, cascade rollback

(A) Can occur in systems which use deferred writeback

(B) Can occur in systems which use immediate writeback

(C) Occurs in systems which use the “waterfall” transaction management system

(D) Is a result of simultaneous transaction commits.

(E) None of the above


(10) Given a relation country(name, continent, population) which of the following is a valid SQL
statement?

(A) SELECT continent, population FROM country GROUP BY continent

(B) SELECT continent, SUM(population) FROM country GROUP BY continent

(C) SELECT name, population FROM country GROUP BY continent

(D) SELECT name, SUM(population) FROM country GROUP BY continent

(E) None of the above OR more than one of the above

(11) Which of the following best describes the relation between ISO SQL and ORACLE’s SQL*PLUS?

(A) ORACLE SQL*PLUS is faster than ISO SQL

(B) ORACLE SQL*PLUS may be installed on a wider range of platforms

(C) ORACLE SQL*PLUS is an attempt to implement a superset of ISO SQL

(D) ORACLE SQL*PLUS is the industry standard definition of ISO SQL

(E) ORACLE SQL*PLUS is a commercial product, ISO SQL is freeware.

(12) When a transaction aborts

(A) all users must be notified

(B) all changes it has made are immediately available to other transactions

(C) the modifications of all transactions currently running are also aborted

(D) it can abort transactions which have already committed

(E) it releases all of its locks

(13) Which one of the following requires some hardware assistance to be implemented in an efficient
manner?

(A) Differential files

(B) Shadow-paging

(C) Log-files with deferred updates

(D) Log-files with immediate updates

(E) None of the above

(14) Which one of the following algorithms is best suited for long-lived transactions with relatively
few roll-backs?

(A) Differential files

(B) Shadow-paging

(C) Log-files with deferred updates

(D) Log-files with immediate updates

(E) None of the above


(15) Which one of the following techniques is sometimes used to solve integrity problems in a
concurrent transaction scenario?

(A) First-come first-served

(B) First-fit

(C) Greedy algorithms

(D) Strassens’s algorithm

(E) Two-phase locking

(16) Which one of the following problems can occur due to introducing locks in a concurrent
transaction scenario?

(A) Information overwrite

(B) Loss of information

(C) Deadlock

(D) Lack of integrity

(E) None of the above

(17) Which one of the following is not a method of implementing transactions at the physical level?

(A) Differential files

(B) Shadow-paging

(C) Log-files with deferred updates

(D) Log-files with immediate updates

(E) Branch and bound

(18) A timetable database is required for a University Department. Each taught event is part of a
module, each event will have exactly one member of staff associated and several individual
students. Each event takes place in a single weekly time slot. Each time slot has a day of the week
and a time of day associated.

Which of the following is the best approach to implementing the attends relation using a relational
database system?

(A) A repeating field attends is included as part of the event table

(B) A repeating field attends is included as part of the student table

(C) A secondary attends key is added to the event table

(D) A table attends contains an event/student pair for every instance of a student attending an
event

(E) None of the above


(19) A timetable database is required for a University Department. Each taught event is part of a
module, each event will have exactly one member of staff associated and several individual
students. Each event takes place in a single weekly time slot. Each time slot has a day of the week
and a time of day associated.

Each of the weekly time slots is exactly one hour long, however we wish to represent the fact that
some events take more than one hour. Which of the following does not represent a possible solution.

(A) A many-to-many relation between Events and Time-Slots is established

(B) A one-to-many relation between Events and Time-Slots is established

(C) Each event has an attribute “start” which refers to Time-Slots and “duration” which gives the
length of the event in minutes

(D) Each event has an attribute “start” which refers to Time-Slots and “duration” which gives the
number of slots spanned

(E) Each event has two attributes “first” and “last” each of which refer to Time-Slots

(20) Most of the following are API calls defined in a particular database curson system. Select the
least plausible call.

(A) SQLExecute: Executes a statement

(B) SQLConnect: Connects to a specific driver by data source name, User ID, and password

(C) SQLBindCol: Binds an application variable to a column

(D) SQLBindRow: Binds an application variable to a row

(E) SQLRowCount: Returns the number of rows affected by the insert update or delete request.

(21) Which of the following best describes the relationship between C and SQL?

(A) SQL can be executed from within C programmes by means of JDBC

(B) C is compatible with the specialist database language SQL

(C) SQL is incompatible with programming language C

(D) There exist mechanisms by which C statements can be embedded in SQL program

(E) There exist mechanisms by which SQL statements can be embedded in C

(22) Which of the following best describes the costs of the operations insert, delete and seek on a
table where records are stored in primary key order? Deleted records may be “flagged”.

(A) insert and delete are cheap, seek is expensive

(B) insert and delete are expensive, seek is cheap

(C) insert is expensive, delete and seek are cheap.

(D) insert, delete and seek are all cheap

(E) insert, delete and seek are all expensive


(23) Which of the following best describes the internal level of the ANSI/SPARC three level
architecture?

(A) The internal level is concerned with the data as seen by individuals internal to the enterprise.

(B) The internal level is concerned with the how stored fields are represented and which indices
exist.

(C) The internal level is concerned with the layout of records and their locations within disk blocks.

(D) The internal level is concerned with the users’ view of the data .

(E) The internal level provides a conceptual view of the data structure.

(24) Which of the following is the most important advantage of an “enterprise-wide” relational
database management system compared against an ad-hoc arrangement?

(A) Access to data will be faster.

(B) Confidentiality is assured.

(C) Disk space is used more efficiently.

(D) Inconsistencies are avoided.

(E) Network traffic is reduced

(25) Which of the following is not usually part of the responsibilities of a database administrator?

(A) Approving structural changes to the database

(B) Designing data entry screens

(C) Ensuring that an adequate back-up regime is in place

(D) Issuing accounts to users

(E) Monitoring the performance of the system

(A) Dirty Read (B) Uncommitted Dependency

(C) Inconsistent Analysis

(D) Lost Update (E) Deadlock


Answer [C]
(A) There is a British competitor in every event.
(B) Pierre does not compete in any event
(C) Sven has been entered in two events
(D) Pat is competing in the jumping event

(E) Hilary has entered only the running event


(A) 01

(B) 02

(C) 03

(D) 04

(E) None of the above


(30) A publishing company produces academic books on various subjects. Books are written by
authors who specialise in one or more particular subject. The company employs a number of editors
who do not have particular specialisations but who take sole responsibilty for for editing one or more
publications. A publication covers a single subject area but may be written by one or more author –
the contribution of each author is recorded as a percentage for the purposes of calculating royalties.

The following ER diagram is intended to represent the above specification:

Indicate the relation which has an incorrect cardinality shown:

(A) specialises in

(B) makes

(C) is about

(D) to

(E) None of the above

EX: From the specification, [Editors] take sole responsibilty for for editing one or more
publications..... Thus an editor can edit more than one publication (one to many), but each
publication has only a single 1 editor. Thus the relationship for ‘edits’ should be one to many, not
many to many.
(31) A publishing company produces academic books on various subjects. Books are written by
authors who specialise in one or more particular subject. The company employs a number of editors
who do not have particular specialisations but who take sole responsibilty for for editing one or more
publications. A publication covers a single subject area but may be written by one or more author –
the contribution of each author is recorded as a percentage for the purposes of calculating royalties.

The following ER diagram is intended to represent the above specification:

The specification is to be changed so that an author can develop a publication covering more than
one subject area and that the schema must be able to store the percentage of the compents
concerned with each of the subjects. Select an appropriate change to the ER diagram:

(A) publication-subject becomes many to many

(B) author-subject becomes many to many

(C) author-publication becomes many to many

(D) more than one of the above

(E) none of the above

EX: What we really want is a parameterised many-to-many relationship between subject and
publication. To draw this in the ER Diagram, we would have to create a new entity type between
subject and publication (lets call it “share”). There would be a one-to-many relationship between
publication and share, and a many-to-one between share and subject
Answer [E]

EX : To draw a presedence graph, you first draw three circles, one for each G transaction. Next, you go
through the schedule, drawing a line from Transaction A to Transaction B whenever,

Breads an attribute which A has written to at a previous time

B write an attribute which A has written to at a previous time

B writes an attribute which A has read from at a previous time

Well done

Answer [B]

RPSC Programmer, ACP एवं सभी IT Vacancies के Exam


Oriented Quality Content & DAILY PYQs MCQs QUIZ के
लिए Join करे Telegram Channel

https://t.me/ComputerMap29
https://t.me/ComputerMap29
https://t.me/ComputerMap29

👆 लिंक पर क्लिक करें


Answer [B]
EX: An Event occurs at a single timeslot, but many events can occur at the same time (with seperate
students and staff). The 1:N relationship of “Is-at” supports this. According to the specification,
‘each event will have exactly one member of staff”, “teaches’ is N.1 meaning that one event can only
be involved with a single staff member, so the specification is met.

You might also like