exam questions

Exam 70-762 All Questions

View all questions & answers for the 70-762 exam

Exam 70-762 topic 1 question 1 discussion

Actual exam question from Microsoft's 70-762
Question #: 1
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 Sales that contains the following database tables: Customer, Order, and Products. The Products table and the Order table are shown in the following diagram.

The customer table includes a column that stores the data for the last order that the customer placed.
You plan to create a table named Leads. The Leads table is expected to contain approximately 20,000 records. Storage requirements for the Leads table must be minimized.
Changes to the price of any product must be less a 25 percent increase from the current price. The shipping department must be notified about order and shipping details when an order is entered into the database.
You need to implement the appropriate table objects.
Which object should you use for each table? To answer, drag the appropriate objects to the correct tables. Each object 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:
The Products table needs a primary key constraint on the ProductID field.
The Orders table needs a foreign key constraint on the productID field, with a reference to the ProductID field in the Products table.

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
alisher
Highly Voted 5 years, 5 months ago
For Orders Table After Insert trigger For Products Table Instead of trigger
upvoted 38 times
...
Andy7622
Most Recent 4 years, 5 months ago
instead of trigger isn't complete phrase. Should be Instead of Update Trigger if it applies to the price changes in Product table.
upvoted 1 times
...
Andy7622
4 years, 5 months ago
Why there's '*' in Orders table next to 'OrderId' and no '*' next ProductID in Products table? If '*' means primary key, then the answer looks correct.
upvoted 1 times
delteixeira
4 years, 5 months ago
The '*' is the primary key.
upvoted 1 times
...
...
TheDUdeu
4 years, 7 months ago
Check that I believe the answer is right but it also needs after insert for the order being placed.
upvoted 1 times
...
TheDUdeu
4 years, 7 months ago
I agree with RohitRaj2311 the shipping department needs to be notified and a primary key needs to be on productid in the product table which will take care of the constraints.
upvoted 1 times
...
SoupDJ
4 years, 8 months ago
While I understand the logic behind using an <Instead Of> trigger on the product table, price is not a column on that table - so perhaps the constraint listed in the question is just a distraction.
upvoted 1 times
...
Oooo
4 years, 9 months ago
For Orders Table After Insert trigger For Products Check constraint
upvoted 3 times
databasejamdown
4 years, 8 months ago
Check constraint is incorrect, it must be instead of trigger.
upvoted 1 times
RohitRaj2311
4 years, 8 months ago
Orders: After Insert Trigger (The shipping department must be notified about order and shipping details when an order is entered into the database.) Products table: Primary Key (If you look at Orders table, it contains ProductID which must be a foreign key constraint to Products table, so without altering ProductID column in Products table, it is not possible)
upvoted 2 times
...
Barbedx
4 years, 5 months ago
but we can use a user defined function in check constraint, and implement this check inside function.
upvoted 1 times
...
...
...
Pennywiser
4 years, 10 months ago
Orders:Foreign key constraint; Check constraint, after insert trigger, unique constraint
upvoted 1 times
...
paee45
5 years, 5 months ago
http://www.briefmenow.org/microsoft/which-object-should-you-use-for-each-table/ “Check Constraint” can’t perform such validation. Correct answer is “Instead of trigger” for the “Products” table. For Orders Table After Insert trigger For Products Table Instead of trigger
upvoted 2 times
paee45
5 years, 5 months ago
found another Question #3 about trigger objects! not sure this question says TABLE OBJECT: it should be related to constraint?
upvoted 3 times
JohnFan
5 years, 3 months ago
check constraint can only check the value being inserted, can’t refer to what it was before… surely this needs to be an instead of trigger, to validate the new data (new vs old virtual tables) and only update if valid.
upvoted 5 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 ...