SmartExpert

(118)

$30/per page/Negotiable

About SmartExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Business & Finance See all
Accounting,Business & Finance,Economics,English,HR Management,Math Hide all
Teaching Since: Apr 2017
Last Sign in: 3 Weeks Ago, 3 Days Ago
Questions Answered: 7559
Tutorials Posted: 7341

Education

  • BS,MBA, PHD
    Adelphi University/Devry
    Apr-2000 - Mar-2005

Experience

  • HOD ,Professor
    Adelphi University
    Sep-2007 - Apr-2017

Category > Programming Posted 24 Feb 2023 My Price 15.00

Introduction to Relational Database Management Systems Unit 3 Challenges

CIS 111 SOPHIA-STRAYER Introduction to Relational Database Management Systems Unit 3 Challenges-sobtell.com

Click link for Answers All Correct

 

 

Unit 3

Which of the following statements represents a correctly structured transaction?

·        a.)

BEGIN;
insert into album (artist_id, title, album_id) values (1, 'My Album', 348);
insert into playlist (playlist_id, name) values (30, 'New Age Playlist'), (31, 'Oldies'), (32, 'Road Trip');
UPDATE album
SET title = 'Out of Exile [Disc 1]'
WHERE album_id = 11;
COMMIT;

·        b.)

BEGIN
insert into album (artist_id, title, album_id) values (1, 'My Album', 348)
insert into playlist (playlist_id, name) values (30, 'New Age Playlist'), (31, 'Oldies'), (32, 'Road Trip')
UPDATE album
SET title = 'Out of Exile [Disc 1]'
WHERE album_id = 11
COMMIT

·        c.)

BEGIN
insert into album (artist_id, title, album_id) values (1, 'My Album', 348);
insert into playlist (playlist_id, name) values (30, 'New Age Playlist'), (31, 'Oldies'), (32, 'Road Trip');
UPDATE album
SET title = 'Out of Exile [Disc 1]'
WHERE album_id = 11;
COMMIT;

·        d.)

BEGIN;
COMMIT;
insert into album (artist_id, title, album_id) values (1, 'My Album', 348);
insert into playlist (playlist_id, name) values (30, 'New Age Playlist'), (31, 'Oldies'), (32, 'Road Trip');
UPDATE album
SET title = 'Out of Exile [Disc 1]'
WHERE album_id = 11;

 

Which of the following statements represents a correctly structured transaction?

·        a.)

BEGIN;
COMMIT;
UPDATE customer
SET company='Telus', support_rep_id=6
WHERE customer_id = 9;
UPDATE customer
SET phone='9991112222', email='daanpeeters@gmail.com'
WHERE first_name = 'Daan' AND last_name='Peeters';
UPDATE employee
SET reports_to = 1, title = 'IT Manager'
WHERE last_name = 'King' AND first_name = 'Robert';

·        b.)

BEGIN
UPDATE customer
SET company='Telus', support_rep_id=6
WHERE customer_id = 9;
UPDATE customer
SET phone='9991112222', email='daanpeeters@gmail.com'
WHERE first_name = 'Daan' AND last_name='Peeters';
UPDATE employee
SET reports_to = 1, title = 'IT Manager'
WHERE last_name = 'King' AND first_name = 'Robert';
COMMIT;

·        c.)

BEGIN;
UPDATE customer
SET company='Telus', support_rep_id=6
WHERE customer_id = 9;
UPDATE customer
SET phone='9991112222', email='daanpeeters@gmail.com'
WHERE first_name = 'Daan' AND last_name='Peeters';
UPDATE employee
SET reports_to = 1, title = 'IT Manager'
WHERE last_name = 'King' AND first_name = 'Robert';
COMMIT;

·        d.)

BEGIN
UPDATE customer
SET company='Telus', support_rep_id=6
WHERE customer_id = 9
UPDATE customer
SET phone='9991112222', email='daanpeeters@gmail.com'
WHERE first_name = 'Daan' AND last_name='Peeters'
UPDATE employee
SET reports_to = 1, title = 'IT Manager'
WHERE last_name = 'King' AND first_name = 'Robert'
COMMIT

 

Which of the following statements represents a correctly structured transaction?

·        a.)

BEGIN
insert into album (album_id, title, artist_id) values (400, 'New Album', 5);
insert into playlist (playlist_id, name) values (40, 'Top 40'), (41, 'Top 40'), (42, 'Top 40');
insert into album (artist_id, title, album_id) values (1, 'My Album', 348);
COMMIT;

·        b.)

BEGIN
insert into album (album_id, title, artist_id) values (400, 'New Album', 5)
insert into playlist (playlist_id, name) values (40, 'Top 40'), (41, 'Top 40'), (42, 'Top 40')
insert into album (artist_id, title, album_id) values (1, 'My Album', 348)
COMMIT

·        c.)

BEGIN;
insert into album (album_id, title, artist_id) values (400, 'New Album', 5);
insert into playlist (playlist_id, name) values (40, 'Top 40'), (41, 'Top 40'), (42, 'Top 40');
insert into album (artist_id, title, album_id) values (1, 'My Album', 348);
COMMIT;

·        d.)

BEGIN;
COMMIT;
insert into album (album_id, title, artist_id) values (400, 'New Album', 5);
insert into playlist (playlist_id, name) values (40, 'Top 40'), (41, 'Top 40'), (42, 'Top 40');
insert into album (artist_id, title, album_id) values (1, 'My Album', 348);
COMMIT;

 

Which of the following criteria specifically describes the atomicity property?

·        a.)

A transaction should be treated as a single logical unit of work that is indivisible.

·        b.)

If any of the transaction parts violates an integrity constraint, the entire transaction must be aborted.

·        c.)

Data used in one transaction cannot be used in another transaction until the first transaction is completed.

·        d.)

In the event of system failure, no transactions that were done should be undone.

 

Which of the following criteria specifically describes the atomicity property?

·        a.)

Once transaction changes are done and saved, they cannot be lost.

·        b.)

When a transaction is completed, the database must be in a consistent state.

·        c.)

Data used in one transaction cannot be used in another transaction until the first transaction is completed.

·        d.)

All SQL requests of a transaction must be completed; if not, the transaction must be aborted.

Which of the following criteria is specific to the consistency property?

·        a.)

Data used in one transaction cannot be used in another transaction until the first transaction is completed.

·        b.)

Once transaction changes are done and saved, they cannot be lost.

·        c.)

When a transaction is completed, the database must be in a consistent state.

·        d.)

All SQL requests of a transaction must be completed; if not, the transaction must be aborted.

Which of the following scenarios reflect the atomicity property?

·        a.)

1. The product quantity starts at 200.
2. Transaction 1 runs to read the quantity of the product to be updated.
3. Transaction 2 attempts to read the quantity of the same product.
4. Transaction 2 has to wait until transaction 1 is complete.
5. Transaction 1 updates the product quantity to reduce it by 100.
6. Transaction 2 is now able to read the quantity to be updated.
7. Transaction 2 updates the product quantity to reduce it by 5.
8. The product quantity ends at 95.

·        b.)

1. A transaction has two SQL requests.
2. Both successfully complete.
3. The data is then committed.

·        c.)

1. A transaction has completed executing.
2. The changes are saved to volatile memory.
3. The changes are then saved to non-volatile memory.

·        d.)

1. The newsletter column can only accept Y or N as options.
2. The user attempts to enter in Maybe.
3. The transaction is denied.

Which of the following scenarios reflect the atomicity property?

·        a.)

1. A transaction has five SQL requests.
2. The first two successfully completed.
3. The third one failed.
4. The entire transaction is rolled back.

·        b.)

1. A user attempts to remove a product from the product table.
2. The product has been purchased by other individuals and exists in the order table.
3. The transaction is denied due to a foreign key constraint.

·        c.)

1. A transaction updates a chunk of data in a database and commits it.
2. During the commit of the transaction, the system fails.
3. Once the database is brought back online, the data is updated and written.

·        d.)

1. Multiple transactions are being executed separately but in parallel.
2. All transactions are carried out and executed as if they were one transaction.
3. No transaction will affect another transaction.

 

Which of the following scenarios reflect the atomicity property?

·        a.)

1. A user attempts to add an order to the database.
2. They successfully add the customer, then add the order table.
3. However, when trying to add the products to the order, the products no longer had any stock.
4. The entire order has to be canceled.

·        b.)

1. An HR employee updates Jeff's salary by increasing it by 2.5%.
2. The general manager updates Sally's salary by increasing it by 5%.
3. The HR employee hasn't finished the transaction yet and gets on a call.
4. The general manager updates Jeff's salary by increasing it by 5%.
5. The HR employee's database session timed out.
6. The database reverts Jeff's salary to what it was prior to the HR employee updating it and applies the 5% increase by the general manager.

·        c.)

1. There are 50 desks available for purchase in the product table.
2. In one transaction, the customer purchases 10 desks.
3. In the same transaction, the customer purchases 10 desks.
4. The validation check runs and sees there are 40 desks left.
5. The entire transaction is reverted.

·        d.)

1. Transaction 1 updates customer 1's address.
2. Transaction 1 updates customer 2's address.
3. Transaction 1 commits the changes.
4. The changes are queued in the disk cover waiting to be committed to disk.
5. The system fails, and the changes are not written to memory.
6. Once the database is started up again, the recovery management component saves the changes to memory.

Which of the following scenarios reflects the consistency property at work?

·        a.)

1. A transaction has two SQL requests.
2. Both successfully complete.
3. The data is then reverted.

·        b.)

1. The newsletter column can only accept Y or N as options.
2. The user attempts to enter in Maybe.
3. The transaction is rolled back.

·        c.)

1. A transaction has two SQL requests.
2. The first request successfully completes, but the second request times out.
3. The data is then committed.

·        d.)

1. The newsletter column can only accept Y or N as options.
2. The user enters in Maybe.
3. The transaction is saved.

Which of the following scenarios reflects the consistency property at work?

·        a.)

1. A transaction has five SQL requests.
2. The first two successfully completed.
3. The third one failed.
4. The entire transaction is committed.

·        b.)

1. Multiple transactions are being executed separately but in parallel.
2. All transactions are carried out and executed as if they were one transaction.
3. No transaction will affect another transaction.

·        c.)

1. A user attempts to remove a product from the product table.
2. The product has been purchased by another individual and exists in the order table.
3. The transaction is denied due to a foreign key constraint.

·        d.)

1. A transaction updates a chunk of data in a database and commits it.
2. During the commit of the transaction, the system fails.
3. Once the database is brought back online, the data is updated and written.

Which of the following scenarios DOES NOT reflect the consistency property at work?

·        a.)

1. A user attempts to add an order into the database.
2. They successfully add the customer, then add the order table.
3. However, when trying to add the products to the order, the products no longer had any stock.
4. The entire order has to be canceled.

·        b.)

1. An HR employee updates Jeff's salary by increasing it by 2.5%.
2. The general manager updates Sally's salary by increasing it by 5%.
3. The HR employee hasn't finished the transaction yet and gets on a call.
4. The general manager updates Jeff's salary by increasing it by 5%.
5. The HR employee's database session times out.
6. The database reverts Jeff's salary to what it was prior to the HR employee updating it and applies the 5% increase by the general manager.

·        c.)

1. There are 50 desks available for purchase in the product table.
2. In one transaction, the customer purchases 10 desks.
3. In the same transaction, the customer purchases 50 desks.
4. The validation check runs and sees there are 40 desks left.
5. The entire transaction is reverted.

·        d.)

1. Transaction 1 updates customer 1's address.
2. Transaction 1 updates customer 2's address.
3. Transaction 1 commits the changes.
4. The changes are queued in the disk cover waiting to be committed to the disk.
5. The system fails and the changes are not written to memory.
6. Once the database is started up again, the recovery management component saves the changes to memory.

Which of the following scenarios reflect the isolation property?

·        a.)

1. A transaction has completed executing.
2. The changes are saved to volatile memory.
3. The changes are then saved to non-volatile memory.

·        b.)

1. A transaction has two SQL requests.
2. Both successfully complete.
3. The data is then committed.

·        c.)

1. The product quantity starts at 200.
2. Transaction 1 runs to read the quantity of the product to be updated.
3. Transaction 2 attempts to read the quantity of the same product.
4. Transaction 2 has to wait until transaction 1 is complete.
5. Transaction 1 updates the product quantity to reduce it by 100.
6. Transaction 2 is now able to read the quantity to be updated.
7. Transaction 2 updates the product quantity to reduce it by 5.
8. The product quantity ends at 95.

·        d.)

1. The new letter column can only accept Y or N as options.
2. The user attempts to enter in Maybe.
3. The transaction is denied.

Which of the following scenarios reflect the isolation property?

·        a.)

1. A user attempts to add an order into the database.
2. They successfully add the customer, then add the order table.
3. However, when trying to add the products to the order, the products no longer had any stock.
4. The entire order has to be canceled.

·        b.)

1. Transaction 1 updates customer 1's address.
2. Transaction 1 updates customer 2's address.
3. Transaction 1 commits the changes.
4. The changes are queued in the disk cover waiting to be committed to the disk.
5. The system fails and the changes are not written to memory.
6. Once the database is started up again, the recovery management component saves the changes to memory.

·        c.)

1. There are 50 desks available for purchase in the product table.
2. In one transaction, the customer purchases 10 desks.
3. In the same transaction, the customer purchases 10 desks.
4. The validation check runs and sees there are 40 desks left.
5. The entire transaction is reverted.

·        d.)

1. An HR employee updates Jeff's salary by increasing it by 2.5%.
2. The general manager updates Sally's salary by increasing it by 5%.
3. The HR employee hasn't finished the transaction yet and gets on a call.
4. The general manager updates Jeff's salary by increasing it by 5%.
5. The HR employee's database session timed out.
6. The database reverts Jeff's salary to what it was prior to the HR employee updating it and applies the 5% increase by the general manager.

Which of the following scenarios reflect the isolation property?

·        a.)

1. Multiple transactions are being executed separately but in parallel.
2. All transactions are carried out and executed as if they were one transaction.
3. No transaction will affect another transaction.

·        b.)

1. A user attempts to remove a product from the product table.
2. The product has been purchased by other individuals and exists in the order table.
3. The transaction is denied due to a foreign key constraint.

·        c.)

1. A transaction updates a chunk of data in a database and commits it.
2. During the commit of the transaction, the system fails.
3. Once the database is brought back online, the data is updated and written.

·        d.)

1. A transaction has five SQL requests.
2. The first two successfully completed.
3. The third one failed.
4. The entire transaction is rolled back.

Which of the following scenarios reflect the durability property?

·        a.)

1. A user attempts to add an order into the database.
2. They successfully add the customer, then add the order table.
3. However, when trying to add the products to the order, the products no longer had any stock.
4. The entire order has to be canceled.

·        b.)

1. Transaction 1 updates customer 1's address.
2. Transaction 1 updates customer 2's address.
3. Transaction 1 commits the changes.
4. The changes are queued in the disk cover waiting to be committed to the disk.
5. The system fails and the changes are not written to memory.
6. Once the database is started up again, the recovery management component saves the changes to memory.

·        c.)

1. There are 50 desks available for purchase in the product table.
2. In one transaction the customer purchases 10 desks.
3. In the same transaction the customer purchases 10 desks.
4. The validation check runs and sees there are 40 desks left.
5. The entire transaction is reverted.

·        d.)

1. An HR employee updates Jeff's salary by increasing it by 2.5%.
2. The general manager updates Sally's salary by increasing it by 5%.
3. The HR employee hasn't finished the transaction yet and had gotten on a call.
4. The general manager updates Jeff's salary by increasing it by 5%.
5. The HR employee's database session timed out.
6. The database reverts Jeff's salary to what it was prior to the HR employee updating it and applies the 5% increase by the general manager.

Which of the following scenarios reflect the durability property?

·        a.)

1. A transaction has five SQL requests.
2. The first two successfully completed.
3. The third one failed.
4. The entire transaction is rolled back.

·        b.)

1. A transaction updates a chunk of data in a database and commits it.
2. During the commit of the transaction, the system fails.
3. Once the database is brought back online, the data is updated and written.

·        c.)

1. A user attempts to remove a product from the product table.
2. The product has been purchased by other individuals and exists in the order table.
3. The transaction is denied due to a foreign key constraint.

·        d.)

1. Multiple transactions are being executed separately but in parallel.
2. All transactions are carried out and executed as if they were one transaction.
3. No transaction will affect another transaction.

 

Which of the following scenarios reflect the durability property?

·        a.)

1. A transaction has two SQL requests.
2. Both successfully complete.
3. The data is then committed.

·        b.)

1. The new letter column can only accept Y or N as options.
2. The user attempts to enter in Maybe.
3. The transaction is denied.

·        c.)

1. The product quantity starts at 200.
2. Transaction 1 runs to read the quantity of the product to be updated.
3. Transaction 2 attempts to read the quantity of the same product.
4. Transaction 2 has to wait until transaction 1 is complete.
5. Transaction 1 updates the product quantity to reduce it by 100.
6. Transaction 2 is now able to read the quantity to be updated.
7. Transaction 2 updates the product quantity to reduce it by 5.
8. The product quantity ends at 95.

·        d.)

1. A transaction has completed executing.
2. The changes are saved to volatile memory.
3. The changes are then saved to non-volatile memory.

Consider the following scenario:

1. Update
2. Insert
ROLLBACK
3. Insert
4. Delete
COMMIT

In this scenario, which statements would be saved to the database, assuming these are all in a single transaction?

·        a.)

4

·        b.)

1, 2, 3, 4

·        c.)

3, 4

·        d.)

none

 

Consider the following scenario:

1. Update
COMMIT
2. Insert
3. Insert
ROLLBACK
4. Delete
5. Update
COMMIT

In this scenario, which statements would be saved to the database, assuming these are all in a single transaction?

·        a.)

2, 3

·        b.)

4, 5

·        c.)

1, 4, 5

·        d.)

1

Consider the following scenario:

ROLLBACK
1. Update
2. Insert
COMMIT
3. Insert
4. Delete
5. Update
ROLLBACK

In this scenario, which statements would be saved to the database, assuming these are all in a single transaction?

·        a.)

none

·        b.)

3, 4, 5

·        c.)

2

·        d.)

1, 2

 

Which of the following statements would create a user login role named southwest with the password set as 11111?

·        a.)

CREATE ROLE southwest
LOGIN
PASSWORD '11111'

·        b.)

CREATE ROLE southwest
LOGIN
PASSWORD 11111

·        c.)

CREATE ROLE 'southwest'
LOGIN
PASSWORD 11111

·        d.)

CREATE ROLE 'southwest'
LOGIN
PASSWORD '11111'

Which of the following statements would create a user login role named developer with the password set as 'devops1'?

·        a.)

CREATE ROLE developer
LOGIN
PASSWORD 'devops1'

·        b.)

CREATE ROLE 'developer'
LOGIN
PASSWORD 'devops1'

·        c.)

CREATE ROLE 'developer'
LOGIN
PASSWORD devops1

·        d.)

CREATE ROLE developer
LOGIN
PASSWORD devops1

Which of the following statements would create a user login role named davida with the password set as 'j3SoFH3'?

·        a.)

CREATE ROLE 'davida'
LOGIN
PASSWORD j3SoFH3

·        b.)

CREATE ROLE davida
LOGIN
PASSWORD j3SoFH3

·        c.)

CREATE ROLE 'davida'
LOGIN
PASSWORD 'j3SoFH3'

·        d.)

CREATE ROLE davida
LOGIN
PASSWORD 'j3SoFH3'

Which of the following statements would create a role named marketing which prevents the ability to inherit privileges from other group roles that it is a member of?

·        a.)

CREATE ROLE marketing;

·        b.)

CREATE ROLE marketing INHERIT;

·        c.)

CREATE ROLE marketing CREATEROLE;

·        d.)

CREATE ROLE marketing NOINHERIT;

Which of the following statements would create a role named sales which has the ability to inherit privileges from other group roles that it is a member of?

·        a.)

CREATE ROLE sales NOINHERIT;

·        b.)

CREATE ROLE sales CREATEROLE;

·        c.)

CREATE ROLE sales INHERIT;

·        d.)

CREATE ROLE sales;

 

Which of the following statements would create a role named technology which gives them the ability to bypass all authorization checks?

·        a.)

CREATE ROLE technology CREATEROLE;

·        b.)

CREATE ROLE technology INHERIT;

·        c.)

CREATE ROLE technology SUPERUSER;

·        d.)

CREATE ROLE technology NOINHERIT;

Which of the following sequences of statements would ensure that testuser has the privileges of the roles of technology and marketing?

·        a.)

CREATE ROLE marketing NOINHERIT;
CREATE ROLE technology INHERIT;
GRANT technology to testuser;
GRANT marketing to technology;

·        b.)

CREATE ROLE marketing INHERIT;
CREATE ROLE technology INHERIT;
GRANT technology to testuser;
GRANT marketing to technology;

·        c.)

CREATE ROLE marketing NOINHERIT;
CREATE ROLE technology NOINHERIT;
GRANT marketing to testuser;
GRANT marketing to technology;

·        d.)

CREATE ROLE marketing NOINHERIT;
CREATE ROLE technology NOINHERIT;
GRANT technology to testuser;
GRANT marketing to technology;

 

Which of the following sequences of statements would ensure that James has the privileges of the roles of manager and sales?

·        a.)

CREATE ROLE sales NOINHERIT;
CREATE ROLE manager INHERIT;
GRANT manager to james;
GRANT sales to manager;

·        b.)

CREATE ROLE sales NOINHERIT;
CREATE ROLE manager NOINHERIT;
GRANT sales to james;
GRANT sales to manager;

·        c.)

CREATE ROLE sales INHERIT;
CREATE ROLE manager INHERIT;
GRANT manager to james;
GRANT sales to manager;

·        d.)

CREATE ROLE sales NOINHERIT;
CREATE ROLE manager NOINHERIT;
GRANT manager to james;
GRANT sales to manager;

 

Which of the following sequences of statements would ensure that database_admin has the privileges of the roles of administrator and db_role?

·        a.)

CREATE ROLE db_role NOINHERIT;
CREATE ROLE administrator NOINHERIT;
GRANT db_role to database_admin;
GRANT db_role to administrator;

·        b.)

CREATE ROLE db_role NOINHERIT;
CREATE ROLE administrator INHERIT;
GRANT administrator to database_admin;
GRANT db_role to administrator;

·        c.)

CREATE ROLE db_role INHERIT;
CREATE ROLE administrator INHERIT;
GRANT administrator to database_admin;
GRANT db_role to administrator;

·        d.)

CREATE ROLE db_role NOINHERIT;
CREATE ROLE administrator NOINHERIT;
GRANT administrator to database_admin;
GRANT db_role to administrator;

 

Which of the following statements will grant update, delete, and insert permissions on the artist table to the role executive?

·        a.)

GRANT UPDATE and INSERT AND DELETE ON artist TO executive;

·        b.)

GRANT UPDATE, INSERT, DELETE ON artist TO executive;

·        c.)

GRANT UPDATE, INSERT, DELETE ON executive to artist;

·        d.)

GRANT UPDATE, INSERT, DELETE ON 'artist' TO 'executive';

 

Which of the following statements will grant full permissions on the track table to the role musician?

·        a.)

GRANT ALL ON musician to TRACK;

·        b.)

GRANT ALL ON 'track' TO 'musician';

·        c.)

GRANT FULL ON track TO musician;

·        d.)

GRANT ALL ON track TO musician;

 

Which of the following statements will grant update and insert permissions on the customer table to the role sales?

·        a.)

GRANT UPDATE, INSERT ON 'customer' TO 'sales';

·        b.)

GRANT UPDATE, INSERT ON customer TO sales;

·        c.)

GRANT UPDATE and INSERT ON customer TO sales;

·        d.)

GRANT UPDATE, INSERT ON sales to customer;

 

One of the most common approaches to detect SQL injections is to ensure that the application __________ the data that's received by the user before it sends it to the database.

·        a.)

encrypts

·        b.)

authorizes

·        c.)

encapsulates

·        d.)

validates

To protect sensitive data, you must hide it through which process?

·        a.)

Roles

·        b.)

Decryption

·        c.)

Privileges

·        d.)

Encryption

If a SQL injection is able to execute without an error that's returned from the database, it would be considered as what type of injection?

·        a.)

Natural

·        b.)

Unsuccessful

·        c.)

Successful

·        d.)

Baseline

When a user needs a powerful set of permissions, should the user be granted these specific permissions rather than provided superuser access?

·        a.)

No, this should never be done.

·        b.)

Both approaches are equally good ones.

·        c.)

Rarely, but this is sometimes acceptable.

·        d.)

Yes, this should almost always be done.

Which principle should be applied to the creation of roles and users when setting up security in a database?

·        a.)

Assign the most privileges possible to roles and users.

·        b.)

Assign the least privileges possible to roles and users.

·        c.)

Assign every role and user the same privileges.

·        d.)

Never assign superuser privileges to anyone.

Should all users be given superuser access to connect to the database?

·        a.)

It does not matter whether or not all users are given superuser access.

·        b.)

No, superuser access should be extremely limited.

·        c.)

Frequently, as there are many users who require superuser access.

·        d.)

Yes, this should almost always be done.

Which of the following types of indexes is the most common type of index?

·        a.)

Hash

·        b.)

BRIN

·        c.)

GIN

·        d.)

B-tree

Which of the following types of indexes is generally used for pattern matching operators such as LIKE 'bob%'?

·        a.)

GIN

·        b.)

Hash

·        c.)

BRIN

·        d.)

B-tree

Which of the following types of indexes can only handle simple equality comparisons?

·        a.)

BRIN

·        b.)

GIN

·        c.)

B-tree

·        d.)

Hash

In which of the following cases would it make the most sense to use a b-tree index?

·        a.)

SELECT * FROM album
WHERE album_id BETWEEN 2 AND 5;

·        b.)

SELECT * FROM invoice_line
WHERE quantity > 2;

·        c.)

SELECT * FROM customer
WHERE first_name like '%a%';

·        d.)

SELECT * FROM customer
WHERE phone = '+55 (11) 3033-5446';

 

In which of the following cases would it make the most sense to use a b-tree index?

·        a.)

SELECT * FROM artist
WHERE artist_id BETWEEN 20 AND 50;

·        b.)

SELECT * FROM track
WHERE genre_id > 3;

·        c.)

SELECT * FROM customer
WHERE last_name like '%ee%';

·        d.)

SELECT * FROM customer
WHERE email like '%gmail.com';

 

In which of the following cases would it make the most sense to use a b-tree index?

·        a.)

SELECT * FROM customer
WHERE email like '%@hotmail.com';

·        b.)

SELECT * FROM invoice
WHERE total > 5;

·        c.)

SELECT * FROM customer
WHERE customer_id BETWEEN 2 AND 5;

·        d.)

SELECT * FROM track
WHERE name LIKE '%Of%'

 

In which of the following cases would it make the most sense to use a hash index?

·        a.)

SELECT * FROM artist
WHERE artist_id BETWEEN 20 AND 50;

·        b.)

SELECT * FROM customer
WHERE last_name like '%ee%';

·        c.)

SELECT * FROM track
WHERE genre_id > 3;

·        d.)

SELECT * FROM album
WHERE artist_id = 3;

 

In which of the following cases would it make the most sense to use a hash index?

·        a.)

SELECT * FROM album
WHERE album_id BETWEEN 2 AND 5;

·        b.)

SELECT * FROM customer
WHERE first_name like '%a%';

·        c.)

SELECT * FROM invoice_line
WHERE quantity > 2;

·        d.)

SELECT * FROM track
WHERE genre_id = 1;

In which of the following cases would it make the most sense to use a hash index?

·        a.)

SELECT * FROM track
WHERE name LIKE '%Of%'

·        b.)

SELECT * FROM invoice
WHERE total > 5;

·        c.)

SELECT * FROM customer
WHERE customer_id BETWEEN 2 AND 5;

·        d.)

SELECT * FROM customer
WHERE support_rep_id = 2;

 

Which of the following DROP INDEX statements would create an error if the index doesn't exist?

·        a.)

DROP INDEX myindex IF EXISTS;

·        b.)

DROP myindex INDEX;

·        c.)

DROP INDEX IF EXISTS myindex;

·        d.)

DROP INDEX myindex;

 

Which of the following DROP INDEX statements would drop the index without locking on select, insert, update, and delete statements that are running at the same time on the index's table?

·        a.)

DROP INDEX CONCURRENTLY myindex;

·        b.)

DROP INDEX IF EXISTS myindex;

·        c.)

DROP INDEX myindex;

·        d.)

DROP INDEX myindex CASCADE;

 

Which of the following DROP INDEX statements would not create an error if the index doesn't exist?

·        a.)

DROP INDEX myindex;

·        b.)

DROP INDEX myindex IF EXISTS;

·        c.)

DROP INDEX IF EXISTS myindex;

·        d.)

DROP myindex INDEX;

 

Which of the following statements would generate a database backup file correctly while recreating the database in the same state that it was at the time of the dump from the mydatabase database to a file named backup.sql?

·        a.)

pg_dump mydatabase > backup.sql

·        b.)

pg_dump mydatabase < backup.sql

·        c.)

pg_dump backup.sql < mydatabase

·        d.)

pg_dump backup.sql > mydatabase

 

Which of the following statements would only dump the data and not the data definitions of the mydatabase to backup.sql?

·        a.)

pg_dump -a mydatabase > backup.sql

·        b.)

pg_dump mydatabase > backup.sql

·        c.)

pg_dump -b mydatabase > backup.sql

·        d.)

pg_dump -d mydatabase > backup.sql

 

Which of the following statements would generate a database backup file from the mydatabase database to a file named backup.sql, but include additional databases on the server as well?

·        a.)

pg_dump mydatabase > backup.sql

·        b.)

pg_dump mydatabase < backup.sql

·        c.)

pg_dumpall > backup.sql

·        d.)

pg_dumpall < backup.sql

 

Which command will restore plain SQL script files that have been created by pg_dump?

·        a.)

restore_pg

·        b.)

sql

·        c.)

psql

·        d.)

pg_restore

When using the command pg_restore, which option can be passed in to only create the schema, but not restore the data into the database?

·        a.)

-s

·        b.)

-c

·        c.)

-f

·        d.)

-d

Which command will restore databases that are in a non-text format created from the pg_dump or pg_dumpall tools?

·        a.)

sql

·        b.)

psql

·        c.)

pg_restore

·        d.)

restore_pg

Which is an advantage of only the command line to backup and restore the database?

·        a.)

We can backup the data, schema, or both at the same time.

·        b.)

We can restore a remote database.

·        c.)

We can execute backups and restore without knowing the exact syntax.

·        d.)

We can encode the backup file to another format.

What is an advantage of only the GUI to backup and restore the database?

·        a.)

We can backup a remote server.

·        b.)

We can run the backups in batch.

·        c.)

We can choose different interfaces based on the database to use.

·        d.)

We can backup multiple databases at once.

Which is an advantage of only the command line to backup and restore the database?

·        a.)

We can continue to restore a database even if there are errors in the file.

·        b.)

We can choose different interfaces based on the database to use.

·        c.)

We can stop restoring the database if there is an error.

·        d.)

We can backup from one database and immediately send the result to restore another database.

 

What type of a backup would create a full copy of your entire data set?

·        a.)

Differential backup

·        b.)

Full backup

·        c.)

Nightly backup

·        d.)

Incremental backup

Which type of backup would backup data since its previous full backup, even if other backups have been created?

·        a.)

Full backup

·        b.)

Incremental backup

·        c.)

Differential backup

·        d.)

Nightly backup

Which type of backup would backup data only since the previous backup?

·        a.)

Full backup

·        b.)

Nightly backup

·        c.)

Differential backup

·        d.)

Incremental backup

 

 

Answers

(118)
Status NEW Posted 24 Feb 2023 02:02 AM My Price 15.00

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----------- Ch-----------all-----------eng-----------es------------sob-----------tel-----------l.c-----------om ----------- Cl-----------ick----------- li-----------nk -----------for----------- An-----------swe-----------rs -----------All----------- Co-----------rre-----------ct-----------

Attachments

file 1677207287-Unit 3 Challenges Introduction to Relational Database Management Systems.doc preview (4870 words )
24-----------/01-----------A b-----------jbj----------- .P-----------hhw----------- 6-----------666-----------6tY-----------YYL-----------YYY-----------YY)-----------))Y-----------. )-----------Y))-----------G-0----------- A)-----------YY)-----------YYY-----------YYc-----------)YY-----------YYY-----------YYY-----------YYY-----------YYY-----------YY -----------X -----------DCI-----------S 1-----------11 -----------SOP-----------HIA------------ST-----------RAY-----------ER -----------Int-----------rod-----------uct-----------ion----------- to----------- Re-----------lat-----------ion-----------al -----------Dat-----------aba-----------se -----------Man-----------age-----------men-----------t S-----------yst-----------ems----------- Un-----------it -----------3 C-----------hal-----------len-----------ges------------so-----------bte-----------ll.-----------com----------- Cl-----------ick----------- li-----------nk -----------for----------- An-----------swe-----------rs -----------All----------- Co-----------rre-----------ct ----------- U-----------nit----------- 3 -----------Whi-----------ch -----------of -----------the----------- fo-----------llo-----------win-----------g s-----------tat-----------eme-----------nts----------- re-----------pre-----------sen-----------ts -----------a c-----------orr-----------ect-----------ly -----------str-----------uct-----------ure-----------d t-----------ran-----------sac-----------tio-----------n a-----------.) -----------BEG-----------INi-----------nse-----------rt -----------int-----------o a-----------lbu-----------m (-----------art-----------ist-----------_id-----------, t-----------itl-----------e, -----------alb-----------um_-----------id)----------- va-----------lue-----------s (-----------1, -----------My -----------Alb-----------um,----------- 34-----------8)i-----------nse-----------rt -----------int-----------o p-----------lay-----------lis-----------t (-----------pla-----------yli-----------st_-----------id,----------- na-----------me)-----------
Not Rated(0)