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

SQL CH 01

This document discusses client/server database systems and SQL. It provides an introduction to these topics and includes questions and answers about database servers, DBMS, SQL statements and queries, database objects like tables and keys, and how to manipulate and query data.

Uploaded by

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

SQL CH 01

This document discusses client/server database systems and SQL. It provides an introduction to these topics and includes questions and answers about database servers, DBMS, SQL statements and queries, database objects like tables and keys, and how to manipulate and query data.

Uploaded by

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

Chapter 01: An Introduction to relation

databases and SQL


Q1. What is role of the database server on client/server database system?
A. PCs, MACs or workstations on the system
B. Applications installed on workstations that uses database information
C. cabling, communication lines, and other components that connect all
workstations
D. None of the above
Answer: B
Q2. What is the role of DBMS in client/server system?
A. Hosts custom application that uses data from databases
B. Manages the databases that are stored on the server
C. Provides API to access data on the server
D. All of the above
Answer: B
Q3. In a client/server system, the application software is run on __________.
A. Client
B. Server
C. Both client and server
D. Enterprise server
Answer: A
Q4. The application software on the client uses data that's stored on the database
using ____________.
Which one best fits the blank space?
A. a data access API
B. SQL queries
C. a database management system
D. Network
Answer: A
Q5. SQL stands for __________________.
A. Standard Query Language
B. Special Query Language
C. Structured Query Language
D. Structured Query Learning
Answer: C
Q6. Which one is true about SQL?
A. A programming language allows to build data-driven applications
B. A language that allows any application communicate with any DBMS
C. A standard language that is understood by any standard application
D. All of the above
Answer: A
Q7. Which one is referred to back-end processing in a client/server database system
implementation?
A. The processing that's done by the DBMS
B. The processing that's done by the client software
C. The processing that's done by both the DBMS and the client software
D. The processing that is done by neither the DBMS nor the client software
Answer: A
Q8. Which one is referred to as front end in a client/server system?
A. The client
B. The server
C. The communication between the client and the server
D. None of the above
Answer: A
Q9. In a client/server system, all of the processing is done on the clients.
A. True
B. False
Answer: B [In a client/server system, the processing done by an application is typically
divided between the client and the server. Ref.: Page 8]
Q10. Which one is not true about application servers?
A. provide user interface to users
B. store business components that do part of the processing of the application
C. process database requests from the user interface running on the client
D. If the client request involves accessing data in a database, the application
server formulates the appropriate query and passes it on to the database server.
Q11. In a client/server system, which one provides user interface?
A. The client
B. The Application Server
C. The database server
D. DBMS
Answer: A
Q12. What is ADO.Net?
A. AN application framework from Microsoft to build distributed applications on top
of. Net platform
B. Microsoft’s data access API that can communicate directly with the SQL Server
C. An API to access remote systems over internet
D. A component for building web application
Answer: B
Q13. In web-based systems, which one is responsible for sending client request to the
web server over internet?
A. Web service
B. Network operating system
C. Web browser
D. Application server component
Answer: C
Q14. In relational database, data is stored in one or more _____________.
A. Files
B. Data pages
C. Tables
D. Records
Answer: C
Q15. What does a column in a relational table represent?
A. A collection of entries

2
B. One instance of an entity
C. An attribute of an entity
D. A single value
Answer: C
Q16. What does a single row in a table represent?
A. A collection of entries
B. One instance of an entity
C. An attribute of an entity
D. A single value
Answer: B
Q17. What is a primary key?
A. One or more columns that establishes link between tables
B. One or more columns that uniquely identify each row in a table
C. A constraint that enforces a value to be present in a column
D. A column whose value is automatically generated by the system
Answer: B
Q18. Non-primary key column that does not contain duplicates is defined as ________.
A. Index
B. Foreign key
C. Nullibility
D. Unique key
Answer: D
Q20. What is an index?
A. It uniquely identifies each row in a table
B. It enforces enterprise rules on the value of a column
C. It provides an efficient way of accessing rows in an table based on one or more
columns
D. It establishes relationship between tables
Answer: C
Q21. An index is automatically created for a tables primary key.
A. True
B. False
Q22. Relationships exist between ____________.
A. Between the primary keys in two tables
B. Between the foreign keys in two tables
C. Between the primary key in one table and the foreign key in another table
D. All of the above
Q23. If a table has a one-to-one relationship with another table, the data in two tables
can be stored in one table.
A. True
B. False
Answer:, A [Ref. : Page 30]
Q24. Many-to-many relationships can be implemented in SQL Server.
A. True
B. False
Answer: B
[no RDBMS can implement many-to-many relationship]
Q25. How is many-to-many implemented?

3
A. By breaking down into two one-to-one relationships
B. By breaking down into two one-to-many relationships
C. By breaking down into two many-to-many relationships
D. By using check constraint
Answer: C
Q26. A table can have only one foreign key.
A. True
B. False
Answer: B
[Ref. : Page 31, a table can have more than one foreign key column]
Q27. How can you define what type of data a column can store?
A. By setting its data type
B. By defining default value
C. By allowing .null value
D. By defining check rule
Answer: A
Q28. What is an identity column in SQL Server?
A. A column that uniquely identifies each row
B. A column that can store null value
C. A column that has auto-incremented numeric value and its value is generated
by SQL server
D. A column that has a default value
Answer: D
Q28. What data type only allows value 1 or 0 that represents a True or False value?
A. Boolean
B. Tinyint
C. Bit
D. Int
Answer: C
Q29. The type and size of the information that can be stored in the column is
determined by _______________.
A. Primary key
B. Default value
C. Data type
D. NULL or NOT NULL
Answer: C
Q30. ___________________ of column defines that value is used if a value is not provided
when a row is added to the table.
A. Identity
B. Unique key
C. Data type
D. Default value
Answer: D
Q31. SQL fall into two categories. They are _________________.
A. data manipulation language (DML)
B. data definition language (DDL)
C. XQuery
D. Object Query

4
Answer: A, B
Q32. SQL progra1n1ners typically work with the DDL statements, while database
administrators (DBAs) use the DDL statements.
A. True
B. False
Answer: B
[Reverse is true, SQL progra1n1ners typically work with the DML statements, while
database administrators (DBAs) use the DDL statements. Re.: Page 23]
Q33. Which one is NOT a DDL statement?
A. CREATE statement
B. ALTER statement
C. DELETE statement
D. DROP statement
Answer: C
Q34. Which one is NOT a DML statement?
A. SELECT statement
B. INSERT statement
C. ALTER statement
D. DELETE statement
Answer: C
Q35. Which statement do you use to delete a database object?
A. ALTER statement
B. DELETE statement
C. DROP statement
D. TRUNCATE statement
Answer: C
Q36. To create a new row in a table you use ____________________ statement?
A. CREATE
B. INSERT
C. ADD
D. ALTER
Answer: B
Q37. To modify data in a table you use ____________________ statement?
A. ALTER
B. MODIFY
C. UPDATE
D. INSERT
Answer: C
Q38. The operation which combines the data from the two tables is joined together into
a single result set is called _________________.
A. Union
B. Join
C. Data set
D. Merging
Answer: B
Q39. The most common type of join is _______________.
A. Inner join
B. Outer join

5
C. Cross join
D. Self-join
Answer: A
Q40. ___________________ returns rows from both tables only if their related columns
match.
A. An inner join
B. An outer join
C. A cross join
D. A full outer join
Answer: A
Q41. _______________________ returns rows from one table in the join even if the other
table doesn't contain a matching row.
A. An inner join
B. An outer join
C. A cross join
D. A self-join
Answer: B
Q42. Which one is often referred to as query?
A. SELECT statement
B. INSERT statement
C. UPDATE statement
D. DELETE statement
Answer: A
[Ref.: Page 27]
Q43. The execution of an INSERT, UPDATE, or DELETE statement is often referred to as
________________.
A. a query
B. an action query
C. a modification query
D. a change query
Answer: B
[Ref.: Page 31]
Q44. What is a view?
A. A predefined select query that's stored in a database
B. A set of statements, not limited to only one select statement, stored as an object
C. A special type of procedure that can return a value or a table
D. a special type of procedure that's executed when rows are inserted, updated, or
deleted from a table or when the definition of a database is changed
Answer: A
Q45. What is a user-defined function?
A. A predefined select query that's stored in a database
B. A set of statements, not limited to only one select statement, stored as an object
C. A special type of procedure that can return a value or a table
D. a special type of procedure that's executed when rows are inserted, updated, or
deleted from a table or when the definition of a database is changed
Answer: C
Q46. What is a trigger?
A. A predefined select query that's stored in a database

6
B. A set of statements, not limited to only one select statement, stored as an object
C. A special type of procedure that can return a value or a table
D. a special type of procedure that's executed when rows are inserted, updated, or
deleted from a table or when the definition of a database is changed
Answer: D

You might also like