exam questions

Exam 70-761 All Questions

View all questions & answers for the 70-761 exam

Exam 70-761 topic 1 question 37 discussion

Actual exam question from Microsoft's 70-761
Question #: 37
Topic #: 1
[All 70-761 Questions]

Note: This question is part of a series of questions that use the same or similar answer choices. An answer choice may be correct for more than one question in the series. Each question is independent of the other questions in this series. Information and details provided in a question apply only to that question.
You have a database that is denormalized. Users make frequent changes to data in a primary table.
You need to ensure that users cannot change the tables directly, and that changes made to the primary table also update any related tables.
What should you implement?

  • A. the COALESCE function
  • B. a view
  • C. a table-valued function
  • D. the TRY_PARSE function
  • E. a stored procedure
  • F. the ISNULL function
  • G. a scalar function
  • H. the TRY_CONVERT function
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️
Using an Indexed View would allow you to keep your base data in properly normalized tables and maintain data-integrity while giving you the denormalized "view" of that data.
References:
http://stackoverflow.com/questions/4789091/updating-redundant-denormalized-data-automatically-in-sql-server

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
eduardogtc
Highly Voted 4 years, 8 months ago
I think the correct answer should be store procedure because it satisfies the 2 requirements: 1) The users can't change the table directly 2) It also updates the related tables With a view, you can only update one table per time.
upvoted 6 times
...
Robintang0924
Highly Voted 5 years, 3 months ago
There is no correct answer listed. To maintain a set of denormalized tables, normally we need an instead of trigger on primary table to interpret every insert/update/delete operations on this table and make sure it will map to get reflected to related redundant columns in other tables. I.e. an after trigger on table is necessary and should be an answer/solution to this question. Kindly note: For the solution mentioned in the stackoverflow link, an indexed view is just used to bridge the gap for querying when there are denormalized tables but it won't help when there are insert/update/delete happens on primary table. Unless we go step further and create an instead of trigger on that indexed view and encapsulate every details of underlying table from Application logic for not only select but also I/U/D operations. Even in that case the answer should be View and Trigger other than just a view which is not a complete solution.
upvoted 5 times
tz_123
4 years, 10 months ago
Thanks for digging deeper.
upvoted 2 times
...
kiri2020
4 years, 7 months ago
No, not 'After' trigger, should be 'Instead Of' trigger
upvoted 1 times
...
...
Vermonster
Most Recent 4 years, 4 months ago
Stored procedure if you want to update multiple tables while obscuring the database schema to the user. Only option since triggers aren't listed.
upvoted 1 times
...
kimalto452
4 years, 4 months ago
basic work for store procedure/trigger...
upvoted 1 times
...
MOAMMI
4 years, 5 months ago
I think view is correct, because you can modify the insert into multiple base tables through an instead of trigger.
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago