Levels Tought:
Elementary,Middle School,High School,College,University,PHD
Teaching Since: | Apr 2017 |
Last Sign in: | 4 Weeks Ago, 6 Days Ago |
Questions Answered: | 7559 |
Tutorials Posted: | 7341 |
BS,MBA, PHD
Adelphi University/Devry
Apr-2000 - Mar-2005
HOD ,Professor
Adelphi University
Sep-2007 - Apr-2017
CIS 111 SOPHIA-STRAYER Introduction to Relational Database Management Systems Unit 3 Milestone-sobtell.com
Click link for Answers All Correct
Â
1
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
Â
https://postgres.sophia.org/
Which of the following operators will attempt to use a hash or b-tree index?
•         Â
&&
•         Â
@>
•         Â
>>Â
•         Â
=
2
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
Â
https://postgres.sophia.org/
Which of the following statements would create a role named regular_user with no added features?
•         Â
CREATE ROLE regular_user;
•         Â
CREATE ROLE regular_user CREATEROLE;
•         Â
CREATE ROLE regular_user INHERIT;
•         Â
CREATE ROLE regular_user NOINHERIT;
3
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
https://postgres.sophia.org/
Which of the following scenarios reflects the durability property?
•         Â
1. A user attempts to do a product transfer between companies.
2. The quantity of the product is moved from the first company.
3. Only once the product is verified to have been deducted, the quantity is moved to the second company.
4. Verification is done and identifies that the total amounts before and after the transactions are not maintained.
5. The transaction is reverted.
•         Â
1. In the library database, there are 50 books available.
2. Billy has checked and there are 50 books.
3. Sam has checked and there are 50 books.
4. Billy has taken out 5 books.
5. The library system informs Sam of the update and Sam now checks that there are 45 books.
6. Sam checks out 10 books.
7. There are now 35 books in the library database.
•         Â
1. Tiffany has updated a customer's address while on the phone with them.
2. The server restarted after Tiffany clicked on save.
3. When the server comes back up, Tiffany was able to verify that the address was updated.
•         Â
1. In the flower database, there are 50 flowers available.
2. Reese has checked and there are 50 flowers.
3. Reese has attempted to take out 5 flowers.
4. Which trying to take them out, there was an error in trying to dispense.
5. While checking, there are still 50 flowers available in the system.
4
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
Â
https://postgres.sophia.org/
Which is an advantage of both the command line and the GUI?
•         Â
We can encode the backup file to another format.
•         Â
We can restore a remote database.
•         Â
We can use any parameters without limitation.
•         Â
We can backup multiple databases at once.
5
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
Â
https://postgres.sophia.org/
Which of the following statements would restore only the table 'customer' from the mydatabase database from backup.sql?
•         Â
psql -t customer mydatabase < backup.sql
•         Â
psql -a customer mydatabase < backup.sql
•         Â
psql -t customer < backup.sql
•         Â
psql mydatabase customer < backup.sql
6
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
https://postgres.sophia.org/
Which of the following criterion is specific to the isolation property?
•         Â
All SQL requests of a transaction must be completed; if not, the transaction must be aborted.
•         Â
Data used in one transaction cannot be used in another transaction until the first transaction is completed.
•         Â
When a transaction is completed, the database must be in a consistent state.
•         Â
Once transaction changes are done and saved, they cannot be lost.
7
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
Â
https://postgres.sophia.org/
Using which type of process between the user input and dynamically created statements can help reduce the number of SQL injection attacks?
•         Â
Coding
•         Â
Posting
•         Â
Filtering
•         Â
Construction
8
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
Â
https://postgres.sophia.org/
Which of the following statements will grant update permissions on the customer table to all users?
•         Â
GRANT UPDATE ON 'customer' TO 'public';
•         Â
GRANT UPDATE ON customer TO public;
•         Â
GRANT UPDATE ON customer TO ALL;
•         Â
GRANT UPDATE ON public to customer;
9
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
https://postgres.sophia.org/
Which of the following scenarios reflects the atomicity property?
•         Â
1. Tiffany has updated a customer's address while on the phone with them.
2. The server restarted after Tiffany clicked on save.
3. When the server came back up, Tiffany was able to verify that the address was updated.
•         Â
1. A user attempts to do a product transfer between companies.
2. The quantity of the product is moved from the first company.
3. The quantity is moved to the second company without verifying that it has been deducted from the first company.
4. The transaction is accepted.
•         Â
1. In the flower database, there are 50 flowers available.
2. Reese has checked and there are 50 flowers.
3. Reese has attempted to take out 5 flowers.
4. While trying to take them out, there was an error in trying to dispense.
5. While checking, there are still 50 flowers available in the system.
•         Â
1. In the library database, there are 50 books available.
2. Billy has checked and there are 50 books.
3. Sam has checked and there are 50 books.
4. Billy has taken out 5 books.
5. The library system informs Sam of the update and Sam now checks that there are 45 books.
6. Sam checks out 10 books.
7. There are now 35 books in the library database.
10
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
Â
https://postgres.sophia.org/
Which of the following sequences of statements would ensure that Jennifer has the privileges of the roles of finance and executive?
•         Â
CREATE ROLE executive NOINHERIT;
CREATE ROLE finance NOINHERIT;
GRANT executive to jennifer;
GRANT executive to finance;
•         Â
CREATE ROLE executive INHERIT;
CREATE ROLE finance INHERIT;
GRANT finance to jennifer;
GRANT executive to jennifer;
•         Â
CREATE ROLE executive NOINHERIT;
CREATE ROLE finance INHERIT;
GRANT finance to jennifer;
GRANT executive to finance;
•         Â
CREATE ROLE executive NOINHERIT;
CREATE ROLE finance NOINHERIT;
GRANT finance to jennifer;
GRANT executive to finance;
11
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
Â
https://postgres.sophia.org/
Which of the following statements represents a correctly structured transaction?
•         Â
BEGIN;
COMMIT;
UPDATE customer
SET postal_code = '33433'
WHERE customer_id = 22;
UPDATE customer
SET postal_code = '10789'
WHERE city = 'Berlin';
UPDATE customer
SET company = 'Humor Inc.'
WHERE city = 'Prague';
•         Â
BEGIN;
UPDATE customer
SET postal_code = '33433'
WHERE customer_id = 22;
UPDATE customer
SET postal_code = '10789'
WHERE city = 'Berlin';
UPDATE customer
SET company = 'Humor Inc.'
WHERE city = 'Prague';
COMMIT;
•         Â
UPDATE customer
SET postal_code = '33433'
WHERE customer_id = 22;
UPDATE customer
SET postal_code = '10789'
WHERE city = 'Berlin';
UPDATE customer
SET company = 'Humor Inc.'
WHERE city = 'Prague';
COMMIT;
•         Â
BEGIN
UPDATE customer
SET postal_code = '33433'
WHERE customer_id = 22
UPDATE customer
SET postal_code = '10789'
WHERE city = 'Berlin'
UPDATE customer
SET company = 'Humor Inc.'
WHERE city = 'Prague'
COMMIT
12
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
Â
https://postgres.sophia.org/
Which type of backup would require no more than 2 backup sets?
•         Â
Full backup and nightly backup
•         Â
Incremental and full backup
•         Â
Differential and incremental backup
•         Â
Differential and full backup
13
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
https://postgres.sophia.org/
Which of the following scenarios reflect the consistency property?
•         Â
1. Jeff checks his user profile and sees his email address is set to jeff@gmail.com.
2. Jeff changes his email to set it to jeff@outlook.com but does not click on save yet.
3. A customer rep checks into Jeff's account and sees jeff@gmail.com.
4. Jeff clicks on save.
5. Another customer rep checks Jeff's account and sees jeff@outlook.com.
•         Â
1. User 1 has $500 in their online account.
2. User 2 has $300 in their online account.
3. User 1 sends user 2 $100.
4. User 1 has $400 in their account.
5. User 2 has $300 in their account.
6. The transaction is reverted.
•         Â
1. A fairly large transaction is run to import new customers.
2. The import is saved to the logs.
3. The import starts to then save to the disk.
4. The disk fails midway through the update.
5. A new disk replaces the failed disk.
6. The backup is applied and the saving of the data is run from the logs.
•         Â
1. A vendor has 5 orders available.
2. A customer attempts to purchase all 5.
3. The system deducts it from the vendor and adds it to the customer.
4. The vendor now has 0 orders available.
5. The customer has 0 orders purchased.
5. The transaction is saved.
14
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
https://postgres.sophia.org/
Which of the following statements would create a user login role named testuser1 with the password set as testpassword1 that is valid until 2042-01-01?
•         Â
CREATE ROLE 'testuser1'
LOGIN
PASSWORD 'testpassword1'
EXPIRES '2042-01-01'
•         Â
CREATE ROLE testuser1
LOGIN
VALID UNTIL '2042-01-01'
PASSWORD 'testpassword1'
•         Â
CREATE ROLE testuser1
LOGIN
PASSWORD 'testpassword1'
VALID UNTIL '2042-01-01'
•         Â
CREATE USER testuser1
LOGIN
PASSWORD testpassword1
VALID UNTIL 2042-01-01
15
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
https://postgres.sophia.org/
Which of the following scenarios reflects the isolation property?
•         Â
1. User 1 has $500 in their online account.
2. User 2 has $300 in their online account.
3. User 1 sends user 2 $100.
4. User 1 has $400 in their account.
5. User 2 has $300 in their account.
6. The transaction is reverted.
•         Â
1. The product quantity starts at 200.
2. Transaction 1 runs to read the quantity of the product to be updated.
3. Transaction 2 runs in parallel to read the quantity of the product to be updated.
4. Transaction 1 updates the product quantity to reduce it by 100.
5. Transaction 2 updates the product quantity to reduce it by 5.
6. The product quantity ends at 195.
•         Â
1. A fairly large update to the products table.
2. The update is saved to the logs.
3. The update starts to then save to the disk.
4. The system fails midway through.
5. When the system starts back up, the committed transactions that haven't been written to disk are written.
•         Â
1. Transaction 1 reads a product's cost which is set at $100.
2. Transaction 1 updates the product to set the price to $90.
3. Transaction 2 reads the same product's cost and sees $100.
4. Transaction 1 commits the cost.
5. Transaction 3 reads the same product's cost and sees $90.
16
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
Â
https://postgres.sophia.org/
Which of the following permissions are automatically granted to a user?
•         Â
All permissions need to be granted to the user or role.
•         Â
Access to any piece that touches the underlying system
•         Â
Permission to change items in the database
•         Â
Access to enabling extensions
17
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
https://postgres.sophia.org/
Â
Consider the following scenario:
1. Update
ROLLBACK
2. Insert
3. Insert
COMMIT
4. Delete
5. Update
COMMIT
In this scenario, which statements would be saved to the database, assuming these are all in a single transaction?
•         Â
1, 2, 3, 4, 5
•         Â
2, 3, 4, 5
•         Â
4, 5
•         Â
2, 3
18
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
Â
https://postgres.sophia.org/
Which of the following statements would clean the database objects in a data dump of the mydatabase to backup.sql, prior to outputting the commands to create them?
•         Â
pg_dump mydatabase > backup.sql
•         Â
pg_dump -c mydatabase > backup.sql
•         Â
pg_dump -a mydatabase > backup.sql
•         Â
pg_dump -b mydatabase > backup.sql
19
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
Â
https://postgres.sophia.org/
In which of the following cases would it make the most sense to use a b-tree index?
•         Â
SELECT *
FROM customer
WHERE fax LIKE '+55%';
•         Â
SELECT *
FROM album
WHERE artist_id < 5;
•         Â
SELECT *
FROM employee
WHERE address LIKE '%i%';
•         Â
SELECT *
FROM customer
WHERE customer_id > 10 AND customer_id < 20;
20
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
Â
https://postgres.sophia.org/
Which of the following DROP INDEX statements would give a notice if the index does not exist but not an error?
•         Â
DROP INDEX myindex RESTRICT;
•         Â
DROP INDEX IF EXISTS myindex;
•         Â
DROP INDEX CONCURRENTLY myindex;
•         Â
DROP INDEX myindex;
21
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
Â
https://postgres.sophia.org/
In which of the following cases would it make the most sense to use a hash index?
•         Â
SELECT *
FROM customer
WHERE email LIKE '%gmail%';
•         Â
SELECT *
FROM employee
WHERE employee_id > 2;
•         Â
SELECT *
FROM invoice
WHERE invoice_id > 10 AND invoice_id < 200;
•         Â
SELECT *
FROM track
WHERE album_id = 10;
Â
1
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
Â
https://postgres.sophia.org/
Which of the following operators will attempt to use a GiST index?
•         Â
<=
•         Â
<<Â
•         Â
<Â
•         Â
>Â
2
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
Â
https://postgres.sophia.org/
Which of the following statements represents a correctly structured transaction?
•         Â
UPDATE track
set media_type_id = 1
where album_id = 3;
DELETE FROM playlist
WHERE playlist_id = 1;
INSERT INTO genre (genre_id, name)
VALUES (30, 'Funk' ),(31,'Classical'),(32,'Pop Rock');
COMMIT;
•         Â
BEGIN
UPDATE track
set media_type_id = 1
where album_id = 3
DELETE FROM playlist
WHERE playlist_id = 1
INSERT INTO genre (genre_id, name)
VALUES (30, 'Funk' ),(31,'Classical'),(32,'Pop Rock')
COMMIT
•         Â
BEGIN;
UPDATE track
set media_type_id = 1
where album_id = 3;
DELETE FROM playlist
WHERE playlist_id = 1;
INSERT INTO genre (genre_id, name)
VALUES (30, 'Funk' ),(31,'Classical'),(32,'Pop Rock');
COMMIT;
•         Â
BEGIN;
COMMIT;
UPDATE track
set media_type_id = 1
where album_id = 3;
DELETE FROM playlist
WHERE playlist_id = 1;
INSERT INTO genre (genre_id, name)
VALUES (30, 'Funk' ),(31,'Classical'),(32,'Pop Rock');
3
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
https://postgres.sophia.org/
Which of the following scenarios reflect the consistency property?
•         Â
1. In the flower database, there are 50 flowers available
2. Reese has checked and there are 50 flowers.
3. Reese has attempted to take out 5 flowers.
4. Which trying to take them out, there was an error in trying to dispense.
5. While checking, there are still 50 flowers available in the system.
•         Â
1. A user attempts to do a product transfer between companies.
2. The quantity of the product is moved from the first company.
3. Only once the product is verified to have been deducted, the quantity is moved to the second company.
4. Verification is done and identifies that the total amounts before and after the transactions are not maintained.
5. The transaction is reverted.
•         Â
1. In the library database, there are 50 books available
2. Billy has checked and there are 50 books.
3. Sam has checked and there are 50 books.
4. Billy has taken out 5 books.
5. The library system informs Sam of the update and Sam now checks that there are 45 books.
6. Sam checks out 10 books.
7. There are now 35 books in the library database.
•         Â
1. Tiffany has updated a customer's address while on the phone with them.
2. The server restarted after Tiffany clicked on save.
3. When the server comes back up, Tiffany was able to verify that the address was updated.
4
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
https://postgres.sophia.org/
Which of the following scenarios reflects the atomicity property?
•         Â
1. Jeff checks his user profile and sees his email address is set to jeff@gmail.com.
2. Jeff changes his email to set it to jeff@outlook.com but does not click on save yet.
3. A customer rep checks into Jeff's account and sees jeff@gmail.com.
4. Jeff clicks on save.
5. Another customer rep checks Jeff's account and sees jeff@outlook.com.
•         Â
1. User 1 has $800 in their online account.
2. User 2 has $600 in their online account.
3. User 1 sends user 2 $100.
4. User 1 has $700 in their account.
5. User 2 has $600 in their account.
6. The transaction is saved.
•         Â
1. A vendor has 5 orders available.
2. A customer attempts to purchase all 5.
3. The system deducts it from the vendor and adds it to the customer.
4. The vendor now has 0 orders available.
5. The customer has 5 orders purchased.
6. The transaction is saved.
•         Â
1. A fairly large transaction is run to import new customers.
2. The import is saved to the logs.
3. The import starts to then save to the disk.
4. The disk fails midway through the update.
5. A new disk replaces the failed disk.
6. The backup is applied and the saving of the data is run from the logs.
5
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
https://postgres.sophia.org/
Which of the following scenarios reflects the durability property?
•         Â
1. Jeff checks his user profile and sees his email address is set to jeff@gmail.com.
2. Jeff changes his email to set it to jeff@outlook.com but does not click on save yet.
3. A customer rep checks into Jeff's account and sees jeff@gmail.com.
4. Jeff clicks on save.
5. Another customer rep checks Jeff's account and sees jeff@outlook.com.
•         Â
1. A fairly large transaction is run to import new customers.
2. The import is saved to the logs.
3. The import starts to then save to the disk.
4. The disk fails midway through the update before being committed.
5. A new disk replaces the failed disk.
6. The backup is applied and the saving of the data is run from the logs.
•         Â
1. User 1 has $500 in their online account.
2. User 2 has $300 in their online account.
3. User 1 sends user 2 $100.
4. User 1 has $400 in their account.
5. User 2 has $300 in their account.
6. The transaction is reverted.
•         Â
1. A vendor has 5 orders available.
2. A customer attempts to purchase all 5.
3. The system deducts it from the vendor and adds it to the customer.
4. The vendor now has 0 orders available.
5. The customer has 5 orders purchased.
6. The transaction is saved.
6
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
https://postgres.sophia.org/
Which of the following statements would create a role named database_admin which gives them the ability to create databases?
•         Â
CREATE ROLE database_admin INHERIT;
•         Â
CREATE ROLE database_admin NOINHERIT;
•         Â
CREATE ROLE database_admin CREATEROLE;
•         Â
CREATE ROLE database_admin CREATEDB;
7
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
Â
https://postgres.sophia.org/
Which type of backup would result in the largest storage space?
•         Â
Nightly backup
•         Â
Full backup
•         Â
Incremental backup
•         Â
Differential backup
8
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
Â
https://postgres.sophia.org/
Which of the following statements would only restore the schema, but not the data, of the database mydatabase from backup.sql?
•         Â
pg_restore mydatabase < backup.sql
•         Â
pg_restore -s mydatabase < backup.sql
•         Â
pg_restore -a mydatabase < backup.sql
•         Â
pg_restore -d mydatabase < backup.sql
9
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
Â
https://postgres.sophia.org/
In which of the following cases would it make the most sense to use a hash index?
•         Â
SELECT *
FROM employee
WHERE address LIKE '%i%';
•         Â
SELECT *
FROM customer
WHERE customer_id > 10 AND customer_id < 20;
•         Â
SELECT *
FROM album
WHERE artist_id < 5;
•         Â
SELECT *
FROM track
WHERE media_type_id = 1;
10
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
https://postgres.sophia.org/
Which of the following properties are specific to the durability property?
•         Â
In the event of system failure, no transactions that were done can be undone.
•         Â
Data used in one transaction cannot be used in another transaction until the first transaction is completed.
•         Â
A transaction should be treated as a single logical unit of work that is indivisible.
•         Â
If any of the transaction parts violates an integrity constraint, the entire transaction must be aborted.
11
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
Â
https://postgres.sophia.org/
Which type of attack is often used to get passwords or other information using iterative trial and error?
•         Â
Conditional
•         Â
Row set
•         Â
Schematic
•         Â
Brute force
12
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
Â
https://postgres.sophia.org/
In which of the following cases would it make the most sense to use a b-tree index?
•         Â
SELECT *
FROM invoice
WHERE invoice_id > 10 AND invoice_id < 200;
•         Â
SELECT *
FROM employee
WHERE title LIKE '%IT%';
•         Â
SELECT *
FROM customer
WHERE email LIKE '%gmail%';
•         Â
SELECT *
FROM customer
WHERE fax LIKE '%7070';
13
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
Â
https://postgres.sophia.org/
Which of the following statements would dump ONLY the table customer from the mydatabase database to backup.sql?
•         Â
pg_dump -a customer mydatabase > backup.sql
•         Â
pg_dump mydatabase customer > backup.sql
•         Â
pg_dump -t customer > backup.sql
•         Â
pg_dump -t customer mydatabase > backup.sql
14
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
Â
https://postgres.sophia.org/
Which is an advantage of both the command line and the GUI?
•         Â
We can use any parameters without limitation.
•         Â
We can back up a remote server.
•         Â
We can backup the data, schema, or both at the same time.
•         Â
We can compress the backup script.
15
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
https://postgres.sophia.org/
Consider the following scenario:
Â
1. Update
2. Insert
3. Insert
4. Delete
5. Update
ROLLBACK
COMMIT
In this scenario, which statements would be saved to the database, assuming these are all in a single transaction?
•         Â
1, 2, 3, 4, 5
•         Â
5
•         Â
none
•         Â
1
16
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
Â
https://postgres.sophia.org/
Which of the following DROP INDEX statement parameters are set by default?
•         Â
DROP INDEX IF EXISTS myindex;
•         Â
DROP INDEX myindex CASCADE;
•         Â
DROP INDEX CONCURRENTLY myindex;
•         Â
DROP INDEX myindex RESTRICT;
17
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
Â
https://postgres.sophia.org/
Which of the following statements will grant insert permissions on the track table to all users?
•         Â
GRANT INSERT ON track TO ALL;
•         Â
GRANT INSERT ON track TO public;
•         Â
GRANT INSERT ON 'track' TO 'public';
•         Â
GRANT INSERT ON public to track;
18
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
Â
https://postgres.sophia.org/
Which of the following permissions are not automatically granted to a superuser?
•         Â
Permission to change items in the database
•         Â
Access to operating system user accounts
•         Â
Access to any piece that touches the underlying system
•         Â
Access to enabling extensions
19
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
https://postgres.sophia.org/
Which of the following statements would create a user login role named temporary_user with the password set as changeme that is valid until 2025-05-01?
•         Â
CREATE ROLE temporary_user
LOGIN
PASSWORD changeme
VALID UNTIL 2025-05-01
•         Â
CREATE ROLE temporary_user
LOGIN
VALID UNTIL '2025-05-01'
PASSWORD 'changeme'
•         Â
CREATE ROLE temporary_user
LOGIN
PASSWORD 'changeme'
EXPIRES '2025-05-01'
•         Â
CREATE ROLE temporary_user
LOGIN
PASSWORD 'changeme'
VALID UNTIL '2025-05-01'
20
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
Â
https://postgres.sophia.org/
Which of the following sequences of statements would ensure that Jimmy has the privileges of the roles of health_department and manager?
•         Â
CREATE ROLE manager INHERIT;
CREATE ROLE health_department INHERIT;
GRANT health_department to jimmy;
GRANT manager to jimmy;
•         Â
CREATE ROLE manager NOINHERIT;
CREATE ROLE health_department NOINHERIT;
GRANT health_department to jimmy;
GRANT manager to health_department;
•         Â
CREATE ROLE manager NOINHERIT;
CREATE ROLE health_department NOINHERIT;
GRANT manager to jimmy;
GRANT manager to health_department;
•         Â
CREATE ROLE manager NOINHERIT;
CREATE ROLE health_department INHERIT;
GRANT health_department to jimmy;
GRANT manager to health_department;
21
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
https://postgres.sophia.org/
Which of the following scenarios reflects the isolation property?
•         Â
1. Jeff checks his user profile and sees his email address is set to jeff@gmail.com.
2. Jeff changes his email to set it to jeff@outlook.com but does not click on save yet.
3. A customer rep checks into Jeff's account and sees jeff@gmail.com.
4. Jeff clicks on save.
5. Another customer rep checks Jeff's account and sees jeff@outlook.com.
•         Â
1. A fairly large transaction is run to import new customers.
2. The import is saved to the logs.
3. The import starts to then save to the disk.
4. The disk fails midway through the update.
5. A new disk replaces the failed disk.
6. The backup is applied and the saving of the data is run from the logs.
•         Â
1. User 1 has $500 in their online account.
2. User 2 has $300 in their online account.
3. User 1 sends user 2 $100.
4. User 1 has $400 in their account.
5. User 2 has $300 in their account.
6. The transaction is reverted.
•         Â
1. A vendor has 5 orders available.
2. A customer attempts to purchase all 5.
3. The system deducts it from the vendor and adds it to the customer.
4. The vendor now has 0 orders available.
5. The customer has 5 orders purchased.
6. The transaction is saved.
Â
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
https://postgres.sophia.org/
Which of the following scenarios reflects the atomicity property?
•         Â
1. User 1 has $500 in their online account.
2. User 2 has $300 in their online account.
3. User 1 sends user 2 $100.
4. User 1 has $400 in their account.
5. User 2 has $300 in their account.
6. The transaction is reverted.
•         Â
1. A fairly large update to the products table.
2. The update is saved to the logs.
3. The update starts to then save to the disk.
4. The system fails midway through.
5. When the system starts back up, the committed transactions that haven't been written to disk are written.
•         Â
1. The product quantity starts at 200.
2. Transaction 1 runs to read the quantity of the product to be updated.
3. Transaction 2 runs in parallel to read the quantity of the product to be updated.
4. Transaction 1 updates the product quantity to reduce it by 100.
5. Transaction 2 updates the product quantity to reduce it by 5.
6. The product quantity ends at 195.
•         Â
1. Transaction 1 reads a product's cost which is set at $100.
2. Transaction 1 updates the product to set the price to $90.
3. Transaction 2 reads the same product's cost and sees $100.
4. Transaction 1 commits the cost.
5. Transaction 3 reads the same product's cost and sees $90.
Â
Which of the following statements would only dump the data definitions and not the data of the mydatabase to backup.sql?
•         Â
pg_dump mydatabase > backup.sql
•         Â
pg_dump -d mydatabase > backup.sql
•         Â
pg_dump -s mydatabase > backup.sql
•         Â
pg_dump -a mydatabase > backup.sql
Â
Which of the following statements would create a role named database_admin which gives them the ability to create databases?
•         Â
CREATE ROLE database_admin NOINHERIT;
•         Â
CREATE ROLE database_admin CREATEROLE;
•         Â
CREATE ROLE database_admin CREATEDB;
•         Â
CREATE ROLE database_admin INHERIT;
Â
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
Â
https://postgres.sophia.org/
In which of the following cases would it make the most sense to use a hash index?
•         Â
SELECT *
FROM album
WHERE email LIKE '%t%';
•         Â
SELECT *
FROM artist
WHERE artist_id < 10;
•         Â
SELECT *
FROM track
WHERE track_id > 1 AND track_id < 15;
•         Â
SELECT *
FROM playlist
WHERE playlist_id = 4;
Â
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
Â
https://postgres.sophia.org/
Which type of backup would result in the fastest restoration?
•         Â
Differential backup
•         Â
Nightly backup
•         Â
Incremental backup
•         Â
Full backup
Â
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
Â
https://postgres.sophia.org/
Which of the following statements represents a correctly structured transaction?
•         Â
BEGIN
UPDATE track
set name = 'A New Road'
where track_id = 5;
insert into artist (artist_id, name) values (900, 'Special Artist' );
insert into genre (genre_id, name) values (30, 'Funk' );
COMMIT;
•         Â
BEGIN;
COMMIT;
UPDATE track
set name = 'A New Road'
where track_id = 5;
insert into artist (artist_id, name) values (900, 'Special Artist' );
insert into genre (genre_id, name) values (30, 'Funk' );
•         Â
BEGIN
UPDATE track
set name = 'A New Road'
where track_id = 5
insert into artist (artist_id, name) values (900, 'Special Artist' )
insert into genre (genre_id, name) values (30, 'Funk' )
COMMIT
•         Â
BEGIN;
UPDATE track
set name = 'A New Road'
where track_id = 5;
insert into artist (artist_id, name) values (900, 'Special Artist' );
insert into genre (genre_id, name) values (30, 'Funk' );
COMMIT;
Â
Â
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
Â
https://postgres.sophia.org/
Which is an advantage of both the command line and the GUI?
•         Â
We can backup from one database and immediately send the result to restore another database.
•         Â
We can continue to restore a database even if there are errors in the file.
•         Â
We can back up a remote server.
•         Â
We can restore a remote database.
Â
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
https://postgres.sophia.org/
Which of the following scenarios reflects the atomicity property?
•         Â
1. In the library database, there are 50 books available.
2. Billy has checked and there are 50 books.
3. Sam has checked and there are 50 books.
4. Billy has taken out 5 books.
5. The library system informs Sam of the update and Sam now checks that there are 45 books.
6. Sam checks out 10 books.
7. There are now 35 books in the library database.
•         Â
1. In the flower database, there are 50 flowers available.
2. Reese has checked and there are 50 flowers.
3. Reese has attempted to take out 5 flowers.
4. While trying to take them out, there was an error in trying to dispense.
5. While checking, there are still 50 flowers available in the system.
•         Â
1. Tiffany has updated a customer's address while on the phone with them.
2. The server restarted after Tiffany clicked on save.
3. When the server came back up, Tiffany was able to verify that the address was updated.
•         Â
1. A user attempts to do a product transfer between companies.
2. The quantity of the product is moved from the first company.
3. The quantity is moved to the second company without verifying that it has been deducted from the first company.
4. The transaction is accepted.
Â
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
Â
https://postgres.sophia.org/
What is unique about a superuser compared to a user?
•         Â
A superuser is the same as a regular user but with all permissions granted.
•         Â
A superuser can bypass all permission checks.
•         Â
A superuser has administrative privileges that users can't have.
•         Â
A superuser has their permissions checked but passes all tests.
Â
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
Â
https://postgres.sophia.org/
Which of the following statements will grant update, delete and insert permissions on the employee table to all users?
•         Â
GRANT UPDATE, INSERT, DELETE ON employee TO ALL;
•         Â
GRANT UPDATE and INSERT AND DELETE ON employee TO ALL;
•         Â
GRANT UPDATE, INSERT, DELETE ON ALL to employee;
•         Â
GRANT UPDATE, INSERT, DELETE ON 'employee' TO 'ALL';
Â
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
https://postgres.sophia.org/
Consider the following scenario:
Â
1. Update
ROLLBACK
2. Insert
3. Insert
4. Delete
ROLLBACK
5. Update
COMMIT
In this scenario, which statements would be saved to the database, assuming these are all in a single transaction?
•         Â
5
•         Â
1, 2, 3, 4, 5
•         Â
2, 3, 4, 5
•         Â
None
Â
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
https://postgres.sophia.org/
Which of the following statements would create a user login role named master_user with the password set as k489dJs9l that is valid until 2032-12-31?
•         Â
CREATE ROLE master_user
LOGIN
WITH PASSWORD 'k489dJs9l'
EXPIRES '2032-12-31'
•         Â
CREATE ROLE master_user
LOGIN
Â
VALID UNTIL '2032-12-31'
PASSWORD 'k489dJs9l'
•         Â
CREATE ROLE master_user
LOGIN
PASSWORD 'k489dJs9l'
VALID UNTIL '2032-12-31'
•         Â
CREATE ROLE master_user
LOGIN
PASSWORD k489dJs9l
VALID UNTIL 2032-12-31
Â
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
Â
https://postgres.sophia.org/
Which type of application that acts as an interface to the database is used to perform most SQL injections?
•         Â
Image
•         Â
Text
•         Â
System
•         Â
Web
Â
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
Â
https://postgres.sophia.org/
Which of the following statements would create a role named database_test which gives them the ability login as a user?
•         Â
CREATE ROLE database_test LOGIN;
•         Â
CREATE ROLE database_test INHERIT;
•         Â
CREATE ROLE database_test CREATEROLE;
•         Â
CREATE ROLE database_test NOINHERIT;
Â
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
https://postgres.sophia.org/
Which of the following scenarios reflect the consistency property?
•         Â
1. The product quantity starts at 200.
2. Transaction 1 runs to read the quantity of the product to be updated.
3. Transaction 2 runs in parallel to read the quantity of the product to be updated.
4. Transaction 1 updates the product quantity to reduce it by 100.
5. Transaction 2 updates the product quantity to reduce it by 5.
6. The product quantity ends at 95.
•         Â
1. User 1 has $50 in their online account.
2. User 2 has $60 in their online account.
3. User 1 sends user 2 $10.
4. User 1 has $40 in their account.
5. User 2 has $60 in their account.
6. The transaction is saved.
•         Â
1. A fairly large update to the products table.
2. The update is saved to the logs.
3. The update starts to then save to the disk.
4. The system fails midway through.
5. When the system starts back up, the committed transactions that haven't been written to disk are written.
•         Â
1. Transaction 1 reads a product's cost which is set at $100.
2. Transaction 1 updates the product to set the price to $90.
3. Transaction 2 reads the same product's cost and sees $100.
4. Transaction 1 commits the cost.
5. Transaction 3 reads the same product's cost and sees $90.
Â
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
Â
https://postgres.sophia.org/
In which of the following cases would it make the most sense to use a b-tree index?
•         Â
SELECT *
FROM invoice
WHERE invoice_id > 10 AND invoice_id < 200;
•         Â
SELECT *
FROM customer
WHERE fax LIKE '%7070';
•         Â
SELECT *
FROM employee
WHERE title LIKE '%IT%';
•         Â
SELECT *
FROM customer
WHERE email LIKE '%gmail%';
Â
In each milestone, you may want or need to use the database and query tool to answer some of the questions. We suggest you open the tool in another browser tab while you are working on this assessment.
Â
https://postgres.sophia.org/
Which of the following sequences of statements would ensure that Jimmy has the privileges of the roles of health_department and manager?
•         Â
CREATE ROLE manager NOINHERIT;
CREATE ROLE health_department NOINHERIT;
GRANT manager to jimmy;
GRANT manager to health_department;
•         Â
CREATE ROLE manager INHERIT;
CREATE ROLE health_department INHERIT;
GRANT health_department to jimmy;
GRANT manager to jimmy;
•         Â
CREATE ROLE manager NOINHERIT;
CREATE ROLE health_department INHERIT;
GRANT health_department to jimmy;
GRANT manager to health_department;
•         Â
CREATE ROLE manager NOINHERIT;
CREATE ROLE health_department NOINHERIT;
GRANT health_department to jimmy;
GRANT manager to health_department;
Â
CIS----------- 11-----------1 S-----------OPH-----------IA------------STR-----------AYE-----------R I-----------ntr-----------odu-----------cti-----------on -----------to -----------Rel-----------ati-----------ona-----------l D-----------ata-----------bas-----------e M-----------ana-----------gem-----------ent----------- Sy-----------ste-----------ms -----------Uni-----------t 3----------- Mi-----------les-----------ton-----------e-s-----------obt-----------ell-----------.co-----------m -----------Cli-----------ck -----------lin-----------k f-----------or -----------Ans-----------wer-----------s A-----------ll -----------Cor-----------rec-----------t-----------