exam questions

Exam 70-762 All Questions

View all questions & answers for the 70-762 exam

Exam 70-762 topic 1 question 25 discussion

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

DRAG DROP -
Note: This question is part of a series of questions that use the same scenario. For your convenience, the scenario is repeated in each question. Each question presents a different goal and answer choices, but the text of the scenario is exactly the same in each question in this series.
You have a database named DB1 that contains the following tables: Customer, CustomerToAccountBridge, and CustomerDetails. The three tables are part of the
Sales schema. The database also contains a schema named Website. You create the Customer table by running the following Transact-SQL statement:

The value of the CustomerStatus column is equal to one for active customers. The value of the Account1Status and Account2Status columns are equal to one for active accounts. The following table displays selected columns and rows from the Customer table.

You plan to create a view named Website.Customer and a view named Sales.FemaleCustomers.
Website.Customer must meet the following requirements:
1. Allow users access to the CustomerName and CustomerNumber columns for active customers.
2. Allow changes to the columns that the view references. Modified data must be visible through the view.
3. Prevent the view from being published as part of Microsoft SQL Server replication.
Sales.Female.Customers must meet the following requirements:
1. Allow users access to the CustomerName, Address, City, State and PostalCode columns.
2. Prevent changes to the columns that the view references.
3. Only allow updates through the views that adhere to the view filter.
You have the following stored procedures: spDeleteCustAcctRelationship and spUpdateCustomerSummary. The spUpdateCustomerSummary stored procedure was created by running the following Transacr-SQL statement:

You run the spUpdateCustomerSummary stored procedure to make changes to customer account summaries. Other stored procedures call the spDeleteCustAcctRelationship to delete records from the CustomerToAccountBridge table.
You need to create Sales.FemaleCustomers.
How should you complete the view definition? To answer, drag the appropriate Transact-SQL segments to the correct locations. Each Transact_SQL segment may be used once, more than once or not at all. You may need to drag the split bar between panes or scroll to view content.
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:
Box 1:WITH SCHEMABINDING:
SCHEMABINDING binds the viewto the schema of the underlying table or tables. When SCHEMABINDING is specified, the base table or tables cannot be modified in a way that would affect the view definition.

Box 2:Box 2: WITH CHECK OPTION -
CHECK OPTION forces all data modification statements executed against the view to follow the criteria set within select_statement. When a row is modified through a view, the WITH CHECK OPTION makes sure the data remains visible through the view after the modification is committed.
Note:Sales.Female.Customers must meet the following requirements:
1. Allow users access to the CustomerName, Address, City, State and PostalCode columns.
2. Prevent changes to the columns that the view references.
3. Only allow updates through the views that adhere to the view filter.
References:
https://msdn.microsoft.com/en-us/library/ms187956.aspx

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
JohnFan
Highly Voted 5 years, 3 months ago
CREATE VIEW Sales.FemaleCustomer With SCHEMABINGDING AS SELECT s.CustomerNumber, s.Address, s.City, s.State, s.PostalCode FROM Sales.Customers as s WHERE s.Gender = 1 With CHECK OPTION
upvoted 28 times
...
amar111
Highly Voted 5 years, 1 month ago
Answer is correct . though the view name is wrongly mentioned
upvoted 11 times
...
arun597
Most Recent 4 years, 5 months ago
24 and 25 both are same questions right ?
upvoted 1 times
...
stm22
4 years, 11 months ago
requirement: Prevent changes to the columns that the view references schema_binding is correct for Box 1
upvoted 4 times
Andy7622
4 years, 5 months ago
In answer area view called Website.Customer not Sales. FemailCustomer
upvoted 1 times
...
...
eric0117
5 years, 5 months ago
The view created should be Female.Customer, or the correct answer for Box1 should be WITH ENCRYPTION
upvoted 5 times
Twigit
5 years, 4 months ago
I agree it should be Sales.FemaleCustomers. Just above the answer area it says "You need to create Sales.FemaleCustomers."
upvoted 3 times
JohnFan
5 years, 3 months ago
VIEW_METADATA Alters how an application that accesses the VIEW sees the metadata. Typically, the metadata is based on the base tables, but VIEW_METADATA returns the definition from the VIEW object. This can be useful when trying to use a view like a table in an application.
upvoted 2 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 ...