Database MCQ Set 1
1. Which of the following is not a NoSQL database ?
a) SQL Server
b) MongoDB
c) Cassandra
d) None of the mentioned
Answer
Answer: a [Reason:] Microsoft SQL Server is a relational database management system developed by Microsoft.
2. Point out the correct statement :
a) Documents can contain many different key-value pairs, or key-array pairs, or even nested documents
b) MongoDB has official drivers for a variety of popular programming languages and development environments
c) When compared to relational databases, NoSQL databases are more scalable and provide superior performance
d) All of the mentioned
Answer
Answer: [Reason:] There are also a large number of unofficial or community-supported drivers for other programming languages and frameworks.
3. Which of the following is a NoSQL Database Type ?
a) SQL
b) Document databases
c) JSON
d) All of the mentioned
Answer
Answer: b [Reason:] Document databases pair each key with a complex data structure known as a document.
4. Which of the following is a wide-column store ?
a) Cassandra
b) Riak
c) MongoDB
d) Redis
Answer
Answer: a [Reason:] Wide-column stores such as Cassandra and HBase are optimized for queries over large datasets, and store columns of data together, instead of rows.
5. Point out the wrong statement :
a) Non Relational databases require that schemas be defined before you can add data
b) NoSQL databases are built to allow the insertion of data without a predefined schema
c) NewSQL databases are built to allow the insertion of data without a predefined schema
d) All of the mentioned
Answer
Answer: a [Reason:] There’s also no way, using a relational database, to effectively address data that’s completely unstructured or unknown in advance.
6. “Sharding” a database across many server instances can be achieved with :
a) LAN
b) SAN
c) MAN
d) All of the mentioned
Answer
Answer: b [Reason:] “Sharding” a database across many server instances can be achieved with SQL databases, but usually is accomplished through SANs and other complex arrangements for making hardware act as a single server.
7. Most NoSQL databases support automatic ____, meaning that you get high availability and disaster recovery
a) processing
b) scalability
c) replication
d) All of the mentioned
Answer
Answer: c [Reason:] The storage environment is essentially virtualized from the developer’s perspective.
8. Which of the following are the simplest NoSQL databases ?
a) Key-value
b) Wide-column
c) Document
d) All of the mentioned
Answer
Answer: a [Reason:] Every single item in the database is stored as an attribute name (or “key”), together with its value in Key-value stores.
9. ________ stores are used to store information about networks, such as social connections.
a) Key-value
b) Wide-column
c) Document
d) Graph
Answer
Answer: d [Reason:] Graph stores include Neo4J and HyperGraphDB.
10. NoSQL databases is used mainly for handling large volumes of ________ data.
a) unstructured
b) structured
c) semi-structured
d) all of the mentioned
Answer
Answer: a [Reason:] MongoDB is an a typical choice for unstructured data storage.
Database MCQ Set 2
1. An approach to website design with the emphasis on converting visitors to outcomes required by the owner is referred to as:
a) Web usability
b) Persuasion
c) Web accessibility
d) None of the mentioned
Answer
Answer: b [Reason:] In computing, graphical user interface is a type of user interface that allows users to interact with electronic devices.
2. A method of modelling and describing user tasks for an interactive application is referred to as:
a) Customer journey
b) Primary persona
c) Use case
d) Web design persona
Answer
Answer: c [Reason:] The actions in GUI are usually performed through direct manipulation of the graphical elements.
3. Information architecture influences:
a) Answer choice
b) Site structure
c) Labeling
d) Navigation design
Answer
Answer: b [Reason:] The actions in GUI are usually performed through direct manipulation of the graphical elements.
4. Also known as schematics, a way of illustrating the layout of an individual webpage is a:
a) Wireframe
b) Sitemap
c) Card sorting
d) Blueprint
Answer
Answer: a [Reason:] An application programming interface specifies how some software components should interact with each other.
5. A graphical or text depiction of the relationship between different groups of content on a website is referred to as a:
a) Wireframe
b) Blueprint
c) Sitemap
d) Card sorting
Answer
Answer: c [Reason:] An application programming interface specifies how some software components should interact with each other.
6. Blueprints are intended to:
a) Prototype of the screen layout showing navigation and main design elements
b) Show the grouping of pages and user journeys
c) Indicate the structure of a site during site design and as a user feature
d) Prototype typical customer journeys or clickstreams through a website
Answer
Answer: c [Reason:] A blueprint is a reproduction of a technical drawing, documenting an architecture or an engineering design, using a contact print process .
7. Storyboards are intended to:
a) Indicate the structure of a site during site design and as a user feature
b) Prototype of the screen layout showing navigation and main design elements
c) Integrate consistently available components on the webpage (e.g. navigation, search boxes)
d) Prototype typical customer journeys or click streams through a website
Answer
Answer: d [Reason:] An application programming interface specifies how some software components should interact with each other.
8. Which of the following occupies boot record of hard and floppy disks and activated during computer startup?
a) Worm
b) Boot sector virus
c) Macro virus
d) Virus
Answer
Answer: b [Reason:] A blueprint is a reproduction of a technical drawing, documenting an architecture or an engineering design, using a contact print process .
9. A graphical or text depiction of the relationship between different groups of content on a website is a:
a) Page template
b) Wireframe
c) Site map
d) Cascading style sheet (CSS)
Answer
Answer: c [Reason:] In computing, graphical user interface is a type of user interface that allows users to interact with electronic devices.
10. Which of the following is a description of information organization schemes?
a) Minimising the number of clicks needed to access relevant content
b) Providing an overall design to a site consistent with the positioning of the products and services
c) The menu options chosen to group and categorize information
d) Providing specific content and services appropriate to different audience members
Answer
Answer: c [Reason:] In computing, graphical user interface is a type of user interface that allows users to interact with electronic devices.
Database MCQ Set 3
1. Which of the following is not a property of transactions?
a) Atomicity
b) Concurrency
c) Isolation
d) Durability
Answer
Answer: d [Reason:] ACID properties are the properties of transactions.
2. SNAPSHOT is used for (DBA)
a) Synonym
b) Tablespace
c) System server
d) Dynamic data replication
Answer
Answer: d [Reason:] Snapshot gets the instance of the database at that time.
3. Isolation of the transactions is ensured by
a) Transaction management
b) Application programmer
c) Concurrency control
d) Recovery management
Answer
Answer: c [Reason:] ACID properties are the properties of transactions.
4. Constraint checking can be disabled in existing ___ and _______ constraints so that any data you modify or add to the table is not checked against the constraint.
a) CHECK, FOREIGN KEY
b) DELETE, FOREIGN KEY
c) CHECK, PRIMARY KEY
d) PRIMARY KEY, FOREIGN KEY
Answer
Answer: a [Reason:] Check and foreign constraints are used to constraint the table data.
5. Problems occurs if we don’t implement proper locking strategy
a) Dirty reads
b) Phantom reads
c) Lost updates
d) Unrepeatable reads
Answer
Answer: d [Reason:] In a concurrent execution of these transactions, it is intuitively clear that they conflict, but this is a conflict not captured by our simple model. This situation is referred to as the phantom phenomenon, because a conflict may exist on “phantom” data.
6. Which of the following fixed database roles can add or remove user IDs?
a) db_accessadmin
b) db_securityadmin
c) db_setupadmin
d) db_sysadmin
Answer
Answer: a [Reason:] The database can be accessed by assigning the roles.
7. By default sql server has _____ isolation level
a) READ COMMITTED
b) READ UNCOMMITTED
c) SERIALIZABLE
d) REPEATABLE READ
Answer
Answer: a [Reason:] Read committed is used to commit the default read operation.
8. Which of the following statements is/are not true for SQL profiler?
a) Enables you to monitor events
b) Check if rows are being inserted properly
c) Check the performance of a stored procedure
d) ALL of the mentioned
Answer
Answer: c [Reason:] Read committed is used to commit the default read operation.
9. Which of the following is the original purpose of SQL?
a) To specify the syntax and semantics of SQL data definition language
b) To specify the syntax and semantics of SQL manipulation language
c) To define the data structures
d) All of the mentioned
Answer
Answer: d [Reason:] Read committed is used to commit the default read operation.
10. SQL can be used to:
a) Create database structures only
b) Query database data only
c) Modify database data only
d) All of the mentioned
Answer
Answer: d [Reason:] In a concurrent execution of these transactions, it is intuitively clear that they conflict, but this is a conflict not captured by our simple model. This situation is referred to as the phantom phenomenon, because a conflict may exist on “phantom” data.
Database MCQ Set 4
1.
SELECT dept_name, ID, avg (salary) FROM instructor GROUP BY dept_name; This statement IS erroneous because
a) Avg(salary) should not be selected
b) Dept_id should not be used in group by clause
c) Misplaced group by clause
d) Group by clause is not valid in this query
Answer
Answer: b [Reason:] Any attribute that is not present in the group by clause must appear only inside an aggregate function if it appears in the select clause, otherwise the query is treated as erroneous.
2. SQL applies predicates in the _______ clause after groups have been formed, so aggregate functions may be used.
a) Group by
b) With
c) Where
d) Having
Answer
Answer: b [Reason:] The with clause provides away of defining a temporary relation whose definition is available only to the query in which the with clause occurs.
3. Aggregate functions can be used in the select list or the_______clause of a select statement or subquery. They cannot be used in a ______ clause.
a) Where, having
b) Having, where
c) Group by, having
d) Group by, where
Answer
Answer: b [Reason:] To include aggregate functions having clause must be included after where.
4. The ________ keyword is used to access attributes of preceding tables or subqueries in the from clause.
a) In
b) Lateral
c) Having
d) With
Answer
Answer: b [Reason:]
Eg : SELECT name, salary, avg salary FROM instructor I1, lateral (SELECT avg(salary) AS avg salary FROM instructor I2 WHERE I2.dept name= I1.dept name);
Without the lateral clause, the subquery cannot access the correlation variable
I1 from the outer query.
5. Which of the following creates temporary relation for the query on which it is defined ?
a) With
b) From
c) Where
d) Select
Answer
Answer: a [Reason:] The with clause provides away of defining a temporary relation whose definition is available only to the query in which the with clause occurs.
6.
WITH max_budget (VALUE) AS (SELECT MAX(budget) FROM department) SELECT budget FROM department, max_budget WHERE department.budget = MAX budget.value;
In the query given above which one of the following is a temporary relation ?
a) Budget
b) Department
c) Value
d) Max_budget
Answer
Answer: d [Reason:] With clause creates a temporary relation.
7. Subqueries cannot:
a) Use group by or group functions
b) Retrieve data from a table different from the one in the outer query
c) Join tables
d) Appear in select, update, delete, insert statements.
Answer
Answer: c [Reason:] None.
8. Which of the following is not a aggregate function ?
a) Avg
b) Sum
c) With
d) Min
Answer
Answer: c [Reason:] With is used to create temporary relation and its not a aggregate function.
9. The EXISTS keyword will be true if:
a) Any row in the subquery meets the condition only
b) All rows in the subquery fail the condition only
c) Both of these two conditions are met
d) Neither of these two conditions is met
Answer
Answer: a [Reason:] EXISTS keyword checks for existance of condition.
10. How can you find rows that do not match some specified condition?
a) EXISTS
b) Double use of NOT EXISTS
c) NOT EXISTS
d) None of the mentioned
Answer
Answer: b [Reason:] None.
Database MCQ Set 5
1. Which is refers to a stalemate situation due to which no further progress is possible as computer await response of each other:
a) Concurrency
b) Deadlock
c) Backup
d) Recovery
Answer
Answer: b [Reason:] Deadlock will stop further processing.
2. Which is a duplicate copy of a file program that is stored on a different storage media than the original location:
a) Concurrency
b) Deadlock
c) Backup
d) Recovery
Answer
Answer: c [Reason:] Backup is required to take all the data.
3. Which is duplication of computer operations and routine backups to combat any unforeseen problems:
a) Concurrency
b) Deadlock
c) Backup
d) Recovery
Answer
Answer: d [Reason:] Recovery means to take the backup data while there is a crash.
4. Optimization that is basically related to the rewriter module is termed as____
a) Semantic query optimization
b) Global query optimization
c) All of the Mentioned
d) None of the Mentioned
Answer
Answer: a [Reason:] SQL-99 is the most recent version of standard SQL prescribed by the ANSI.
5. Optimization basically related to the Rewrite module is termed as_______
a) Semantic query optimization
b) Global query optimization
c) All of the Mentioned
d) None of the Mentioned
Answer
Answer: a [Reason:] SQL-99 is the most recent version of standard SQL prescribed by the ANSI.
6. Database security helps organizations to protect data from _____
a) Internal users
b) External users
c) Non-external users
d) Non internal users
Answer
Answer: b [Reason:] External users are the people who do not involve in the processing of the database.
7. Copying files to secondary or specific devices is known as ______
a) Retrieve
b) Backup
c) Recovery
d) Deadlock
Answer
Answer: b [Reason:] Backup is required to take all the data.
8. How many types of recovery control techniques:
a) 2
b) 3
c) 4
d) 5
Answer
Answer: a [Reason:] Recovery means to take the backup data while there is a crash.
9. Which are types of recovery control techniques:
a) Deferred update
b) Immediate update
c) All of the Mentioned
d) None of the Mentioned
Answer
Answer: c [Reason:] Recovery means to take the backup data while there is a crash.
10. Which server can joins the indexes when only multiple indexes combined can cover the query:
a) SQL
b) DBMS
c) RDBMS
d) All of the mentioned
Answer
Answer: a [Reason:] Indexing reduces the difficulty in searching the data.