Which of the following does not violate the referential integrity of a database?
ID: 3579797 • Letter: W
Question
Which of the following does not violate the referential integrity of a database?
inserting a new row into a table with a foreign key that doesn’t match a primary key in the related table
updating a foreign key with a value that doesn’t match a primary key in the related table
updating a primary key in a primary key table without also updating the foreign keys for the related rows in all related tables
deleting a row in a foreign key table without deleting the related row in the related primary key table
You are constructing a standard CATCH statement to return error information from within stored procedures. You must return the text of the error and enough information to locate where the error occurred.What are 4 valid error functions you can return?
ERROR_MESSAGE, ERROR_NUMBER, ERROR_SEVERITY, ERROR_STATE
ERROR_MESSAGE, ERROR_NUMBER, ERROR_LEVEL, ERROR_STATE
ERROR_NUMBER, ERROR_SEVERITY, ERROR_STATE, ERROR_LEVEL
ERROR_MESSAGE, ERROR_SEVERITY, ERROR_STATE, ERROR_LEVEL
Your company uses a stored procedure named webAnalysis to analyze Web site usage information and store the results in several databases. The procedure returns 1 if the analysis succeeds and 0 if there was a problem. You are creating a query that performs a group of daily maintenance tasks, including the webAnalysis procedure. You must roll back any changes made by the procedure if the analysis doesn’t succeed, without affecting the execution of any of the other tasks performed by the query.Which set of statements should you use?
DECLARE @success int;
EXEC @success = webAnalysis;
IF @success = 0
ROLLBACK TRAN;
ELSE
COMMIT;
BEGIN TRAN;
DECLARE @success int;
EXEC @success = webAnalysis;
IF @success = 0
ROLLBACK TRAN;
ELSE
COMMIT;
BEGIN TRAN;
DECLARE @success int;
EXEC @success = webAnalysis;
IF @success = 0
ROLLBACK TRAN;
BEGIN TRAN;
DECLARE @success int;
EXEC @success = webAnalysis;
COMMIT;
IF @success = 0
ROLLBACK TRAN;
inserting a new row into a table with a foreign key that doesn’t match a primary key in the related table
updating a foreign key with a value that doesn’t match a primary key in the related table
updating a primary key in a primary key table without also updating the foreign keys for the related rows in all related tables
deleting a row in a foreign key table without deleting the related row in the related primary key table
Explanation / Answer
Answer: Not sure about last answer
1.deleting a row in a foreign key table without deleting the related row in the related primary keytable
2,These are the 4 valid error functions you can return
ERROR_MESSAGE, ERROR_NUMBER, ERROR_SEVERITY, ERROR_STATE
3. the procedure if the analysis doesn’t succeed, without affecting the execution of any of the other tasks performed by the query
DECLARE @success int;
EXEC @success = webAnalysis;
IF @success = 0
ROLLBACK TRAN;
ELSE
COMMIT;
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.