SQL and Relational Databases 101 Quiz Answers

Get SQL and Relational Databases 101 Quiz Answers

Data is one of the most critical assets of any business. Data needs a database to store and process data quickly. SQL is a language used for a database to query data.

In this introductory course, you’ll learn the basics of the SQL language and the relational databases. You’ll start by learning about the relational model and relational model concepts and constraints. By the end of this course, you will have learned and used the five basic SQL statements, some advanced SQL syntax, and join statements.

This isn’t your typical textbook introduction. You’re not just learning through lectures. At the end of each module there are assignments, hands-on exercises, review questions, and also a final exam. Successfully completing this course earns you a certificate. So let’s get started!

Enroll on Cognitive Class

Module 1 – SQL and Relational Databases 101

Question: What is a Database?

  • A program that stores data
  • Stores data in tabular form
  • A repository of data
  • All of the above

Question: Advantages of the relational model include:

  • Provides logical and physical data independence
  • Data is stored in simple data structures
  • It is the most used data model
  • All of the above

Question: In an Entity-Relationship diagram, the Entity Name maps to the Table name, the attributes map to the …

  • Table rows and columns
  • Table columns
  • Table rows
  • None of the above

Module 2 – Relational Model Constraints and Data Objects

Question: Which of the following statements is true?

  • A table can have a primary key and a foreign key
  • A Foreign Key is a set of columns referring to a primary key of another table
  • A primary key uniquely identifies each row in a table
  • All of the above

Question: Which Relational Constraint prevents duplicate values in a table?

  • Entity Integrity constraint
  • Null constraint
  • Check constraint
  • All of the above

Question: The Semantic Integrity Constraint defines the relationships between tables. (T/F)

  • True
  • False

Module 3 – Data Definition Language (DDL) and Data Manipulation Language (DML)

Question: The Primary Key of a relational table uniquely identifies each _____ in a table.

  • column
  • row
  • Both of the above
  • Neither of the above

Question: The INSERT statement cannot be used to insert multiple rows in a single statement. (T/F)

  • True
  • False

Question: The SELECT statement is called a Query, and the output we get from executing the query is called a Result Set.

  • True
  • False

Module 4 – Advanced DDL and DML

Question: You want to select an author’s name from a table, but you only remember the author’s last name starts with the letter B, which string pattern can you use?

  • SELECT lastname from author where lastname like ‘B$’
  • SELECT lastname from author where lastname like ‘B%’
  • SELECT lastname from author where lastname like ‘B#’
  • None of the above

Question: In a SELECT statement, which SQL clause controls how the result set is displayed?

  • ORDER BY clause
  • ORDER IN clause
  • ORDER WITH clause

Question: Which SELECT statement eliminates duplicates in the result set?

  • SELECT country from author ORDER BY 1
  • SELECT distinct(country) from author
  • SELECT unique(country) from author
  • None of the above

Module 5 – Working with multiple tables

Question: An INNER JOIN returns only the rows that match. (T/F)

  • True
  • False

Question: A LEFT OUTER JOIN displays all the rows from the right table, and combines matching rows from the left table. (T/F)

  • True
  • False

Question: When using an OUTER JOIN, you must explicitly state that you want either a LEFT JOIN or a RIGHT JOIN. (T/F)

  • True
  • False

Final Exam

Question: The 5 basic SQL commands are…

  • CREATE, SELECT, INSERT, UPDATE, DELETE
  • CREATE, ALTER, INSERT, UPDATE, DELETE
  • CREATE, SELECT, INSERT, MODIFY, DELETE
  • All of the above

Question: The blueprint of any database system is the …

  • Data model
  • Information model
  • Both of the above

Question: Attributes help clarify relationship diagrams (T/F)

  • True
  • False

Question: A table containing one or more foreign keys is called a Parent table. (T/F)

  • True
  • False

Question: The Referential Integrity Constraint ensures the validity of the data using a combination of Primary Keys and Foreign Keys.

  • True
  • False

Question: What are the basic categories of the SQL language based on functionality?

  • Data Manipulation Language
  • Data Definition Language
  • Both of the above
  • Neither of the above

Question: The CREATE TABLE statement is a….

  • DDL statement
  • DML statement
  • Both of the above

Question: When using the UPDATE statement, if you do not specify the WHERE clause, all the rows in the table are updated.

  • True
  • False

Question: You want to select a list of books whose number of pages is between 100 and 200 . Select the correct query from the following options.

  • SELECT title, pages from book where pages BETWEEN 100 AND 200
  • SELECT title, pages from book where pages RANGE 100 AND 200
  • SELECT title, pages from book where pages less than or equal to 100 AND pages greater than or equal to 200
  • A or B
  • All the options above are correct

Question: What is the default sorting mode of the ORDER BY clause?

  • Ascending
  • Descending
  • Randomly selected order
  • None of the above
  • All of the above

Question: Which of the following can be used in a SELECT statement to restrict a result set?

  • HAVING
  • GROUP BY
  • DISTINCT
  • All of the above

Question: The HAVING clause works only with the GROUP BY clause. (T/F)

  • True
  • False

Question: Which of the following are valid types of OUTER JOIN?

  • LEFT OUTER JOIN
  • RIGHT OUTER JOIN
  • FULL OUTER JOIN
  • A and B only
  • All of the above

Question: A FULL JOIN returns only the rows that match. (T/F)

  • True
  • False

Question: To combine tables in relational databases , we use:

  • Table names
  • Matching values/Primary key
  • Tables cannot be combined
  • None of the above options are correct

Question: >> True or False: Semantic integrity ensures that data entered into a row reflects an allowable value for that row.

  • True
  • False

Question: Which of the following statements are correct about databases :

  • A database represents some aspect of the real world
  • A database is a logically coherent collection of data with some inherent meaning
  • A database is designed, built and populated with data for a specific purpose
  • All the above options are correct

Question: Which of the following statements are correct about primary keys

  • The value of the Primary Key must be unique for each instance of the entity.
  • There can be no missing values( ie. Not Null) for Primary Keys.
  • The Primary Key is immutable.i.e., once created the value of the Primary Key cannot be changed.
  • All the above options are correct

Question: The ____________ keyword is used to eliminate duplicate tuples from the result set of an SQL query.

  • COMMON
  • DISTINCT
  • ALL
  • EXISTS

Question: Select the correct statements about the join operator

  • PrimaryKey- ForeignKey is the common join operator
  • Is used to combine more than one table
  • You have to know the relationship between the tables
  • None of the statements are correct

Conclusion:

We hope you know the correct answers to SQL and Relational Databases 101 If Queslers helped you to find out the correct answers then make sure to bookmark our site for more Course Quiz Answers.

If the options are not the same then make sure to let us know by leaving it in the comments below.

Course Review:

In our experience, we suggest you enroll in this and gain some new skills from Professionals completely free and we assure you will be worth it.

This course is available on Cognitive Class for free, if you are stuck anywhere between quiz or graded assessment quiz, just visit Queslers to get all Quiz Answers and Coding Solutions.

More Courses Quiz Answers >>

Building Cloud Native and Multicloud Applications Quiz Answers

Accelerating Deep Learning with GPUs Quiz Answers

Blockchain Essentials Cognitive Class Quiz Answers

Deep Learning Fundamentals Cognitive Class Quiz Answers

Hadoop 101 Cognitive Class Answers

Machine Learning With R Cognitive Class Answers

Machine Learning with Python Cognitive Class Answers

Leave a Reply

Your email address will not be published. Required fields are marked *