Skip to main content

SOPHIA MILESTONE 3- UNIT 3 CONCEPTS WITH RATIONALE

Page 1

1/1/22, 3:42 AM

Sophia :: Welcome

Score 14/21

You passed this Milestone 14 questions were answered correctly. 7 questions were answered incorrectly. 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/ In the following scenario, which of the following statements would be saved to the database assuming these are all in a single transaction? 1. Update ROLLBACK 2. Insert 3. Insert 4. Delete ROLLBACK 5. Update COMMIT

UNIT 3 — MILESTONE 3

None

5

2, 3, 4, 5

1, 2, 3, 4, 5

https://app.sophia.org/spcc/introduction-to-relational-databases/milestone_take_feedbacks/12141789

1/17


1/1/22, 3:42 AM

Sophia :: Welcome

RATIONALE In a transaction, if a ROLLBACK statement is run, all statements up to the prior COMMIT or ROLLBACK will be reverted. If a COMMIT statement is run, all statements up to the prior ROLLBACK or COMMIT will be saved.

CONCEPT COMMIT and ROLLBACK to Manage Changes 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 clean the data prior to restoring the database mydatabase from backup.sql?

psql -a mydatabase < backup.sql

psql -c mydatabase < backup.sql

psql mydatabase < backup.sql

psql -d mydatabase < backup.sql

RATIONALE Common mistakes when restoring a database using the command line include, using the wrong file redirect operator, using the incorrect syntax, not using the right order of statements, or not including the command line options.

CONCEPT Restore from Backup 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 atomicity property? https://app.sophia.org/spcc/introduction-to-relational-databases/milestone_take_feedbacks/12141789

2/17


1/1/22, 3:42 AM

Sophia :: Welcome

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. 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. 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.

RATIONALE Atomicity requires that all SQL requests in a transaction should be fully completed and if not, the entire transaction should be aborted. The transaction should be viewed as a single logical unit of work that is indivisible.

CONCEPT Atomicity 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/ Most SQL injections are performed through this type of application that acts as an interface to the database.

https://app.sophia.org/spcc/introduction-to-relational-databases/milestone_take_feedbacks/12141789

3/17


Turn static files into dynamic content formats.

Create a flipbook
SOPHIA MILESTONE 3- UNIT 3 CONCEPTS WITH RATIONALE by digitaldownload87 - Issuu