0% found this document useful (0 votes)
2K views

SQL Questions & Answers

This document contains 35 multiple choice questions about SQL and database management systems. It covers topics such as the definition of DBMS, characteristics of relational database management systems, SQL queries and functions, and database design principles. The questions are in quiz format with a single correct answer provided for each.

Uploaded by

Tsehayou Sieley
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views

SQL Questions & Answers

This document contains 35 multiple choice questions about SQL and database management systems. It covers topics such as the definition of DBMS, characteristics of relational database management systems, SQL queries and functions, and database design principles. The questions are in quiz format with a single correct answer provided for each.

Uploaded by

Tsehayou Sieley
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

SQL Server Objective type Questions and Answers List

1. What does the abbreviation DBMS stand for?


A. Digital Base Mapping System.
B. Data Borrowing and Movement Software.
C. Database Management System.
D. Database Manipulation Software.
Ans: C
2. The advantages of Standard Query Language (SQL) include which of the following in relation
to GIS databases?
A. It is good at handling geographical concepts.
B. It is widely used.
C. It is simple and easy to understand.
D. It uses a pseudo-English style of questioning.
Ans: A

3. Which of the following are characteristics of an RDBMS?


A. Keys may be unique or have multiple occurrences in the database.
B. It cannot use SQL.
C. Queries are possible on individual or groups of tables.
D. Tables are linked by common data known as keys.
E. Data are organized in a series of two-dimensional tables each of which contains records for
one entity.
Ans: D

4. What is a ‘tuple’?
A. A row or record in a database table.
B. Another name for the key linking different tables in a database.
C. An attribute attached to a record.
D. Another name for a table in an RDBMS.
Ans: A

5. Which of the following are issues to be considered by users of large corporate GIS databases?
A. The need for multiple copies of the same data and subsequent merging after separate updates.
B. The need to manage long transactions.
C. The need for manual transfer of records to paper.
D. The need for multiple views or different windows into the same databases.
E. The need for concurrent access and multi-user update.
Ans: D

6. Which of the following are features of the object-oriented approach to databases?


A. The need to split objects into their component parts.
B. The ability to represent the world in a non-geometric way.
C. The ability to develop more realistic models of the real world.
D. The ability to develop databases using natural language approaches.
E. The ability to develop database models based on location rather than state and behaviour.
Ans: C

7. Redundancy is minimised with a computer based database approach.


A. True
B. False
Ans: A

8. The relational database model is based on concepts proposed in the 1960s and 1970s.
A. True
B. False
Ans: A

9. A row in a database can also be called a domain.


A. True
B. False
Ans: B

10. A first step in database creation should be needs analysis.


A. True
B. False
Ans: A

11. In entity attribute modelling a many to many relationship is represented by M:M.


A. True
B. False
Ans: B

12.In a networked web based GIS all communications must go through an internet map server.
A. True
B. False
Ans: B

13.In an OO database approach ‘object = attributes + behaviour’.


A. True
B. False
Ans: B

14. In an OO database objects may inherit some or all of the characteristics of other objects.
A. True
B. False
Ans: A
15. You can add a row using SQL in a database with which of the following?
A. ADD
B. CREATE
C. INSERT
D. MAKE
Ans: c

16. The command to remove rows from a table ‘CUSTOMER’ is:


A. REMOVE FROM CUSTOMER …
B. DROP FROM CUSTOMER …
C. DELETE FROM CUSTOMER WHERE …
D. UPDATE FROM CUSTOMER …
Ans: c

17. The SQL WHERE clause:


A. limits the column data that are returned.
B. limits the row data are returned.
C. Both A and B are correct.
D. Neither A nor B are correct.
Ans: B

18. 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 above.
Ans: D

19. The wildcard in a WHERE clause is useful when?


A. An exact match is necessary in a SELECT statement.
B. An exact match is not possible in a SELECT statement.
C. An exact match is necessary in a CREATE statement.
D. An exact match is not possible in a CREATE statement.
Ans: B

20. A view is which of the following?


A. A virtual table that can be accessed via SQL commands
B. A virtual table that cannot be accessed via SQL commands
C. A base table that can be accessed via SQL commands
D. A base table that cannot be accessed via SQL commands
Ans: A

21. The command to eliminate a table from a database is:


A. REMOVE TABLE CUSTOMER;
B. DROP TABLE CUSTOMER;
C. DELETE TABLE CUSTOMER;
D. UPDATE TABLE CUSTOMER;
Ans: B

22. SQL data definition commands make up a(n) ________ .


A. DDL
B. DML
C. HTML
D. XML
Ans: A

23. Which of the following is valid SQL for an Index?


A. CREATE INDEX ID;
B. CHANGE INDEX ID;
C. ADD INDEX ID;
D. REMOVE INDEX ID;
Ans: A

24. The SQL keyword(s) ________ is used with wildcards.


A. LIKE only
B. IN only
C. NOT IN only
D. IN and NOT IN
Ans: A

25. Which of the following is the correct order of keywords for SQL SELECT statements?
A. SELECT, FROM, WHERE
B. FROM, WHERE, SELECT
C. WHERE, FROM,SELECT
D. SELECT,WHERE,FROM
Ans: A

26. The result of a SQL SELECT statement is a(n) ________ .

A. report
B. form
C. file
D. table
Ans: D

27. The HAVING clause does which of the following?


A. Acts like a WHERE clause but is used for groups rather than rows.
B. Acts like a WHERE clause but is used for rows rather than columns.
C. Acts like a WHERE clause but is used for columns rather than groups.
D. Acts EXACTLY like a WHERE clause.
Ans: A

28. To remove duplicate rows from the results of an SQL SELECT statement, the ________
qualifier specified must be included.
A. ONLY
B. UNIQUE
C. DISTINCT
D. SINGLE
Ans: c

29. The benefits of a standard relational language include which of the following?
A. Reduced training costs
B. Increased dependence on a single vendor
C. Applications are not needed.
D. All of the above.
Ans: A

30. Which of the following do you need to consider when you make a table in SQL?
A. Data types
B. Primary keys
C. Default values
D. All of the above.
Ans: D

31. SQL query and modification commands make up a(n) ________ .


A. DDL
B. DML
C. HTML
D. XML
Ans: B

32. Which one of the following sorts rows in SQL?


A. SORT BY
B. ALIGN BY
C. ORDER BY
D. GROUP BY
Ans: c

33. To sort the results of a query use:


A. SORT BY.
B. GROUP BY.
C. ORDER BY.
D. None of the above is correct.
Ans: c
34. SQL can be used to:
A. create database structures only.
B. query database data only.
C. modify database data only.
D. All of the above can be done by SQL.
Ans: D

35. The SQL statement that queries or reads data from a table is ________ .
A. SELECT
B. READ
C. QUERY
D. None of the above is correct.
Ans: A

Output generated by boolean expression not unknown is

A. Unknown
B. True
C. False
D. Null

MCQ: Aggregate functions are said to take a set or multiset of values as input and return

A. Single value
B. Multiple sets
C. Multiple attributes
D. Multiple values

MCQ: An aggregate function of SQL that demands input to be a collection of numbers is known
to be

A. Avg
B. Sum
C. Both A and B
D. Min/Max

MCQ: Clause when is used in a query, demands elimination of duplicate tuples, is called

A. Select Clause
B. Where Distinct Clause
C. Select distinct Clause
D. From Distinct Clause

MCQ: Built-in aggregate functions introduced by SQL can be classified into

A. 2 types
B. 3 types
C. 4 types
D. 5 types

What does the abbreviation DBMS stand for?


A. Digital Base Mapping System.
B. Data Borrowing and Movement Software.
C. Database Management System.
D. Database Manipulation Software.
Ans: C
The advantages of Standard Query Language (SQL) include which of the following in relation to
GIS databases?
A. It is good at handling geographical concepts.
B. It is widely used.
C. It is simple and easy to understand.
D. It uses a pseudo-English style of questioning.
Ans: A
Which of the following are characteristics of an RDBMS?
A. Keys may be unique or have multiple occurrences in the database.
B. It cannot use SQL.
C. Queries are possible on individual or groups of tables.
D. Tables are linked by common data known as keys.
E. Data are organized in a series of two-dimensional tables each of which contains records for
one entity.
Ans: D

What is a 'tuple'?
A. A row or record in a database table.
B. Another name for the key linking different tables in a database.
C. An attribute attached to a record.
D. Another name for a table in an RDBMS.
Ans: A
Which of the following are issues to be considered by users of large corporate GIS databases?
A. The need for multiple copies of the same data and subsequent merging after separate updates.
B. The need to manage long transactions.
C. The need for manual transfer of records to paper.
D. The need for multiple views or different windows into the same databases.
E. The need for concurrent access and multi-user update.
Ans: D
Which of the following are features of the object-oriented approach to databases?
A. The need to split objects into their component parts.
B. The ability to represent the world in a non-geometric way.
C. The ability to develop more realistic models of the real world.
D. The ability to develop databases using natural language approaches.
E. The ability to develop database models based on location rather than state and behaviour
Ans: C
Redundancy is minimised with a computer based database approach.
A. True
B. False

Ans: A

The relational database model is based on concepts proposed in the 1960s and 1970s.
A. True
B. False
Ans: A

A row in a database can also be called a domain.


A. True
B. False
Ans: A
A first step in database creation should be needs analysis.
A. True
B. False
Ans: A
In a networked web based GIS all communications must go through an internet map server.
A. True
B. False
Ans: B
In an OO database approach 'object = attributes + behaviour'.
A. True
B. False

Ans: B
In an OO database objects may inherit some or all of the characteristics of other objects.
A. True
B. False
Ans: A
Which of the following statements is/are true for SQL server?
A. SQL Server has Logical Architecture and Physical Architecture
B. Both a and c
C. SQL Server is compatible with the structured query language and has rich for XML
D. SQL Server is a DBMS, a complete database.
Answer: B
What is the difference between the WHERE and HAVING SQL clauses?
A. The WHERE and the HAVING clauses are identical
The HAVING SQL clause condition(s) is applied to all rows in the result set before the
B. WHERE clause is applied (if parent). The WHERE clause is used only with SELECT SQL
statements and specifies a search condition for an aggregate or a group.
C. HAVING clause is applied (if parent). The HAVING clause is used only with SELECT SQL
statements and specifies a search condition for an aggregate or a group
Answer: C
When SQL server is installed, which of the following database are created by default?
A. Master
B. Model
C. Both a and b
D. Root

Answer: C
Which of the following statements is/are false for Extended events in sql server 2008?
A. Enhanced event handling system in SQL Server
B. Both b and c below
C. Used for problem identification or problem trouble shooting
D. An architecture that is not very scalable, highly configurable
Answer: D

______ provides option for entering SQL queries as execution time, rather than at the development
stage.
A) PL/SQL
B) SQL*Plus
C) SQL
D) Dynamic SQL
Ans: D
What are the different events in Triggers?
A) Define, Create
B) Drop, Comment
C) Insert, Update, Delete
D) Select, Commit
Ans: C

You might also like