Databases and SQL for Data Science Exam Review
Q1. Which of the following statements are correct about databases:
Q2. Which of the following statements about a database is/are correct?
Databases and SQL for Data Science Exam
Review
Q1. Which of the following statements are correct about databases:
A database is a repository of data
There are different types of databases - Relational, Hierarchical, No SQL, etc.
A database can be populated with data and be queried
All of the above - ANSW All of the above
Q2. Which of the following statements about a database is/are correct?
A database is a logically coherent collection of data with some inherent meaning
Data can only be added and queried from a database but not modified
Only SQL can be used to query data in a database
All of the above - ANSW A database is a logically coherent collection of data with some
inherent meaning
Q3. Select the correct statement below about database services or database instances:
Database services are logical abstractions for managing workloads in a database
An instance of the cloud database operates as a service that handles all application
requests to work with the data in any of the databases managed by that instance
The database service instance is the target of the connection requests from applications
All of the above - ANSW All of the above
Q4. The 5 basic SQL commands are...
CREATE, SELECT, INSERT, UPDATE, DELETE
SELECT, COPY, PASTE, INSERT, ALTER
CREATE, INSERT, RETRIEVE, MODIFY, DELETE
None of the above - ANSW CREATE, SELECT, INSERT, UPDATE, DELETE
Q5. A database stores data in tabular form only. True or False? - ANSW False
Q6. What is the function of a WHERE clause in an UPDATE statement?
A WHERE clause enables you to specify a new table to receive the updates.
A WHERE clause is never used with an UPDATE statement.
A WHERE clause enables you to specify which rows will be updated.
A WHERE clause enables you to list the column and data to be updated. - ANSW A
WHERE clause enables you to list the column and data to be updated.
, Q7. Which of the following statements would you use to add a new instructor to the
Instructor table.
ADD INTO Instructor(ins_id, lastname, firstname, city, country)
VALUES(4, 'Doe', 'John', 'Sydney', 'AU');
INSERT INTO Instructor(ins_id, lastname, firstname, city, country)
WITH VALUES(4, 'Doe', 'John', 'Sydney', 'AU');
UPDATE Instructor(ins_id, lastname, firstname, city, country)
WITH VALUES(4, 'Doe', 'John', 'Sydney', 'AU');
SELECT Instructor(ins_id, lastname, firstname, city, country)
FROM VALUES(4, 'Doe', 'John', 'Sydney', 'AU'); - ANSW INSERT INTO
Instructor(ins_id, lastname, firstname, city, country)
WITH VALUES(4, 'Doe', 'John', 'Sydney', 'AU');
Q8. You are working on a Film database, with a FilmLocations table. You want to
retrieve a list of films that were released in 2019. You run the following query but find
that all the films in the FilmLocations table are listed:
Nothing, the query is correct.
A WHERE clause to limit the results to films released in 2019.
A DISTINCT clause to specify a distinct year.
A LIMIT clause to limit the results to films released in 2019. - ANSW A WHERE clause
to limit the results to films released in 2019.
Q1. The primary key of a relational table uniquely identifies each row in a table. True or
False? - ANSW True
Q2. The INSERT statement cannot be used to insert multiple rows in a single
statement. (T/F) - ANSW F
Q3. The SELECT statement is called a Query, and the output we get from executing the
query is called a ResultSet. - ANSW True
Q4. The CREATE TABLE statement is a....
DML statement
DDL statement
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller smartchoices. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $11.89. You're not tied to anything after your purchase.