[Free] 2017(Aug) EnsurePass Examcollection Microsoft 70-762 Dumps with VCE and PDF 11-20

EnsurePass
2017 Aug Microsoft Official New Released 70-762
100% Free Download! 100% Pass Guaranteed!
http://www.EnsurePass.com/70-762.html

Developing SQL Databases

Question No: 11 HOTSPOT

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 that contains the following tables: BlogCategory, BlogEntry, ProductReview, Product, and SalesPerson. The tables were created using the following Transact SQL statements:

image

You must modify the ProductReview Table to meet the following requirements:

  1. The table must reference the ProductID column in the Product table

  2. Existing records in the ProductReview table must not be validated with the Product table.

  3. Deleting records in the Product table must not be allowed if records are referenced by the ProductReview table.

  4. Changes to records in the Product table must propagate to the ProductReview table.

You also have the following database tables: Order, ProductTypes, and SalesHistory, The transact-SQL statements for these tables are not available.

You must modify the Orders table to meet the following requirements:

  1. Create new rows in the table without granting INSERT permissions to the table.

  2. Notify the sales person who places an order whether or not the order was completed.

You must add the following constraints to the SalesHistory table:

  • a constraint on the SaleID column that allows the field to be used as a record identifier

  • a constant that uses the ProductID column to reference the Product column of the ProductTypes table

  • a constraint on the CategoryID column that allows one row with a null value in the column

  • a constraint that limits the SalePrice column to values greater than four

    Finance department users must be able to retrieve data from the SalesHistory table for sales persons where the value of the SalesYTD column is above a certain threshold.

    You plan to create a memory-optimized table named SalesOrder. The table must meet the following requirements:

  • The table must hold 10 million unique sales orders.

  • The table must use checkpoints to minimize I/O operations and must not use transaction logging.

  • Data loss is acceptable.

  • Performance for queries against the SalesOrder table that use Where clauses with exact equality operations must be optimized.

    You need to create the Sales Order table

    How should you complete the table definition? To answer? select the appropriate Transact- SQL segments in the answer area.

    image

    Answer:

    image

    Explanation:

    image

    Box 1: NONCLUSTERED HASHWITH (BUCKET_COUNT = 10000000)

    Hash index is preferable over a nonclustered index when queries test the indexed columns by use of a WHERE clause with an exact equality on all index key columns. We should use a bucket count of 10 million.

    Box 2: SCHEMA_ONLY

    Durability: The value of SCHEMA_AND_DATA indicates that the table is durable, meaning that changes are persisted on disk and survive restart or failover. SCHEMA_AND_DATA is the default value.

    The value of SCHEMA_ONLY indicates that the table is non-durable. The table schema is persisted but any data updates are not persisted upon a restart or failover of the database. DURABILITY=SCHEMA_ONLY is only allowed with MEMORY_OPTIMIZED=ON.

    References:https://msdn.microsoft.com/en-us/library/mt670614.aspx

    Question No: 12 DRAG DROP

    You must create two staging database tables. The tables have the following requirements:

    image

    You need to select the correct storage mechanism for each table.

    Which storage mechanism should you use? To answer, drag the appropriate table types to the correct tables. Each table type 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.

    image

    Answer:

    image

    Question No: 13 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:

    image

    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.

    image

    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:

    image

    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.

    When a procedure calls spDeleteCustAcctRelationship, if the calling stored procedures has already started an active transaction, all the detections made by the spDeleteCustAccRelationship stored procedure must be committed by the caller; otherwise changes must be committed within the spDeleteCustAcctRelationship stored procedure.

    If any error occurs during the delete operation, only the deletes made by the soDeleteCustACCTRelationships stored procedure must be rolled back and the status must be updated.

    You need to complete the stored procedure to ensure all the requirements are met.

    How should you complete the procedure? To answer, drag the Transact-SQL segments to the correct location. 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.

    NOTE: Each correct selection is worth one point.

    image

    Answer:

    image

    Explanation:

    image

    Savepoints offer a mech
    anism to roll back portions of transactions. You create a savepoint

    using the SAVE TRANSACTION savepoint_name statement. Later, you execute a ROLLBACK TRANSACTION savepoint_name statement to roll back to the savepoint instead of rolling back to the start of the transaction.

    References:https://technet.microsoft.com/en-us/library/ms178157(v=sql.105).aspx

    Question No: 14 HOTSPOT

    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.

    image

    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.

    You need to implement a stored procedure that deletes a discontinued product from the Products table. You identify the following requirements:

    What should you do? To answer, select the appropriate Transact-SQL segments in the answer area.

    image

    Answer:

    image

    Explanation:

    image

    Using TRY…CATCH inTransact-SQL

    Errors in Transact-SQL code can be processed by using a TRY…CATCH construct.

    TRY…CATCH can use the following error function to capture error information: ERROR_MESSAGE() returns the complete text of the error message. The text includes the values supplied for any substitutable parameters such as lengths, object names, or times.

    References:https://technet.microsoft.com/en-us/library/ms179296(v=sql.105).aspx

    Question No: 15 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:

    image

    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.

    image

    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:

    image

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

    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.

    NOTE: Each correct selection is worth one point.

    image

    Answer:

    image

    Explanation:

    image

    Box 1: WITH ENCRYPTION

    Using WITH ENCRYPTION prevents the view from being published as part of SQL Server replication.

    Box 2: WITH CHECK OPTION

    CHECK OPTION forces all data modification statements executed against theview 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: Website.Customer must meet the followingrequirements:

    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 aspart of Microsoft SQL Server replication.

      Incorrect Asnwers:

      SCHEMABINDING binds the view to 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.

      VIEW_METADATA specifies that theinstance of SQL Server will return to the DB-Library, ODBC, and OLE DB APIs the metadata information about the view, instead of the base table or tables, when browse-mode metadata is being requested for a query that references the view.

      References:https://msdn.microsoft.com/en-us/library/ms187956.aspx

      Question No: 16

      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 the series. Information and details provided in a question apply only to that question.

      You are developing an application to track customer sales.

      You need to create a database object that meets the following requirements:

      • Return a value of 0 if data inserted successfully into the Customers table.

      • Return a value of 1 if data is not inserted successfully into the Customers table.

      • Support logic that is written by using managed code. What should you create?

      1. extended procedure

      2. CLR procedure

      3. user-defined procedure

      4. DML trigger

      5. DDL trigger

      6. scalar-valued function

      7. table-valued function

    Answer: B Explanation:

    DML triggers is a special type of stored procedure that automatically takes effect when a data manipulation language (DML) event takes place that affects the table or view defined in the trigger. DML events include INSERT, UPDATE, or DELETE statements.DML triggers can be used to enforce business rules and data integrity, query other tables, and include complex Transact-SQL statements.

    A CLR trigger is a type of DDL trigger. A CLR Trigger can be either an AFTER or INSTEAD OF trigger. A CLR trigger canalso be a DDL trigger. Instead of executing a Transact-SQL stored procedure, a CLR trigger executes one or more methods written in managed code thatare members of an assembly created in the .NET Framework and uploaded in SQL Server.

    References:https://msdn.microsoft.com/en-us/library/ms178110.aspx

    Question No: 17 HOTSPOT

    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.

    image

    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.

    You need to modify the database design to meet the following requirements:

    In the table below, identify the constraint that must be configured for each table. NOTE: Make only one selection in each column.

    image

    Answer:

    image

    Explanation:

    image

    A FOREIGN KEY in one table points to a PRIMARY KEY in another table. Here the foreign key constraint is put on the ProductIDin the Orders, and points to the ProductID of the Products table.

    With a check constraint on the ProductID we can ensure that the Products table contains only unique rows.

    References:http://www.w3schools.com/sql/sql_foreignkey.asp

    Question No: 18

    Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution. Determine whether the solution meets the stated goals.

    You have a database that contains a table named Employees. The table stored information about the employees of your company.

    You need to implement the following auditing rules for the Employees table:

    • Record any changes that are made to the data in the Employees table.

    • Customize the data recorded by the audit operations.

    Solution: You implement a user-defined function on the Employees table. Does the solution meet the goal?

    1. Yes

    2. No

    Answer: A Explanation:

    SQL Server 2016 provides two features that track changes to data in adatabase: change data capture and change tracking. These features enable applications to determine the DML changes (insert, update, and delete operations) that were made to user tables in a database.

    Change data is made available to change data capture consumers through table-valued functions (TVFs).

    References:https://msdn.microsoft.com/en-us/library/cc645858.aspx

    Question No: 19

    Note: This question is part of a series of questions that use the same answer choices. An answer choice may be correct for more than one question on 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 work on an OLTP database that has no memory-optimized file group defined.

    You have a table names tblTransaction that is persisted on disk and contains the information described in the following table:

    image

    Users report that the following query takes a long time to complete.

    image

    You need to create an index that:

    • improves the query performance

    • does not impact the existing index

    • minimizes storage size of the table (inclusive of index pages). What should you do?

    1. Create aclustered index on the table.

    2. Create a nonclustered index on the table.

    3. Create a nonclustered filtered index on the table.

    4. Create a clustered columnstore index on the table.

    5. Create a nonclustered columnstore index on the table.

    6. Create a hashindex on the table.

      Answer: C Explanation:

      A filtered index is an optimized nonclustered index, especially suited to cover queries that select from a well-defined subset of data. It uses a filter predicate to index a portion of rows in the table. A well-designed filtered index can improve query performance, reduce index maintenance costs, and reduce index storage costs compared with full-table indexes.

      Question No: 20 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:

      image

      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.

      image

      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:

    image

    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.

    image

    Answer:

    image

    Explanation:

    image

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

    3. Only allow updates through the views that adhere to the view filter. References:https://msdn.microsoft.com/en-us/library/ms187956.aspx

      100% Free Download!
      Download Free Demo:70-762 Demo PDF
      100% Pass Guaranteed!
      Download 2017 EnsurePass 70-762 Full Exam PDF and VCE
      Get 10% off your purchase! Copy it:TJDN-947R-9CCD [2017.07.01-2017.07.31]

      EnsurePass ExamCollection Testking
      Lowest Price Guarantee Yes No No
      Up-to-Dated Yes No No
      Real Questions Yes No No
      Explanation Yes No No
      PDF VCE Yes No No
      Free VCE Simulator Yes No No
      Instant Download Yes No No

      2017 EnsurePass IT Certification PDF and VCE

    Leave a Reply

    Your email address will not be published. Required fields are marked *