paper_1

March 25, 2018 | Author: Gaourav Hiran | Category: Database Index, Microsoft Sql Server, Databases, Table (Database), Database Transaction


Comments



Description

Q.1] Which of the following Service Broker objects defines the content of the messages exchanged between applications?A.Contract B.Message Type C.Service D.Queues Q.2] Jack is database developer in DoITnow, Inc,. He needs to store the details of one of the tables into an XML file. What should he do? A.He should create a managed user-defined type B.He should create a managed stored procedure C.He should create a managed trigger D.He should use T-SQL Q.3] John is creating a Web Service in SQL Server 2005. He wants that the name of the function, he needs to host, should be Calculate . Which of the parameter of the CREATE ENDPOINT statement will John use to accomplish this? A.Webmethod B.Schema C.Path D.Ports Q.4] James, a database developer of AdventureWorks has implemented Service Broker in the database. He needs to send a message from one of the service to another. Which of the following protocol will James use for that? A.HTTP B.SOAP C.DIALOG D.TCP Q.5] NET base class libraries.QUEUE C. C.When you need to implement basic programming logic. functions.SERVICE D. Unit.7] The production database of an organization stores the details of raw material used for the production process in the Materials table.ASSEMBLY Q. Description. .MESSAGE TYPE B.When you need to create database objects. D. Which of the following database objects will John not create to implement Service Broker? A. He has been asked to implement Service Broker in the database. Q.When you need to perform data access and manipulation operations that can be done using TSQL statements.When you need to implement complicated programming logic for which you can reuse the functionality provided by the .6] In which of the following situations will you implement managed code in your database? A. B. such as procedures.John is the database developer for AdventureWorks. These details include the ProductID. or triggers. a record should be inserted into the PurchaseRequests table. It also stores the requests to be made for purchase of the raw material in the PurchaseRequests table. Create a FOR INSERT trigger on the PurchaseRequests table C. a database developer. If the QuantityOnHand reaches the ReorderLevel or below that. What should James do? A.8] The production database of an organization stores the details of raw material used for the production process in the Materials table. a record is added to the MaterialIssued table.Create a FOR INSERT trigger on the MaterialIssued table Q. In this procedure. the QuantityOnHand needs to be checked. and ReorderLevel. whenever. a product is issued for production. If the QuantityOnHand reaches the ReorderLevel or below that. According to the business requirement. a product is issued for production. the MaterialIssued table stores the details of issue of raw material for production. It also stores the requests to be made for purchase of the raw material in the PurchaseRequests table. the MaterialIssued table stores the details of issue of raw material for production.Create an AFTER INSERT trigger on the MaterialIssued table B. Next. the QuantityOnHand needs to be checked. James. However. has created a batch of statements that inserts a record in the MaterialIssued table.QuantityOnHand. he has identified that creating a procedure does not ensure that a request will be created every time a material is issued. a record should be inserted into the PurchaseRequests table. has created a stored procedure that needs to be executed whenever a new record is inserted in the MaterialIssued table. whenever. it checks the QuantityOnHand for the product that is issued and then . In addition. a record is added to the MaterialIssued table. In addition. James. At the same time. At the same time. a database developer. Unit. QuantityOnHand. These details include the ProductID. Description. the QuantityOnHand is checked for the product that is issued and a record is inserted in the PurchaseRequests table.Create a FOR INSERT trigger on the PurchaseRequests table D. According to the business requirement. and ReorderLevel. You have identified that for some of the students records are not saved in all the tables.9] A university uses the StudentsRegistration application to store and manage the student details. What should you do to solve this problem in an efficient way? A. the details are stored in four different tables. What should James do to solve this problem in an efficient way? A. if required.Create a transaction that contains all the statements given in the batch D.inserts a record in the PurchaseRequests table. the users enter the details of that student in a form.Create an AFTER trigger for each statement to execute the next statement C.Create a function that contains all the statements given in the batch .Create a procedure that contains all the statements given in the batch B. You have created a batch of statements to perform data manipulation operations in all the tables that store the student details. When the form is submitted.Create a transaction that contains all the statements given in the batch D. he has identified that at times a purchase request is not created even if the QuantityOnHand reaches below the ReorderLevel. However. When a new student takes admission.Create a procedure that contains all the statements given in the batch B. Create an AFTER trigger that contains all the statements given in the batch C.Create a function that contains all the statements given in the batch Q. Identify the error and provide the solution.trgInsert Q. A.Q.trgInsert D. the following statement was executed to delete the trigger: DROP TRIGGER trgInsert The above statement generates an error. DROP TRIGGER HumanResources.Employee table. DELETE TRIGGER trgInsert B.11] Two AFTER triggers have been created for the DELETE operation on the Employee table as follows: CREATE TRIGGER trgDelete1 ON HumanResources. DELETE TRIGGER Employee.trgInsert C. So. This trigger is no longer required.Employee AFTER DELETE AS PRINT 'This is the first trigger' .10] A trgInsert trigger was created on HumanResources. DROP TRIGGER Employee. sp_settriggerorder 'trgDelete2'. sp_settriggerorder 'HumanResources. 'FIRST'. 'DELETE' C. 'SECOND'. 'FIRST'. 'DELETE' B. the following statement was executed: sp_settriggerorder 'trgDelete2'. 'DELETE' Q. 'FIRST'. sp_settriggerorder 'trgDelete1'. For this. This procedure displays the Employee Id.CREATE TRIGGER trgDelete2 ON HumanResources. the above statement results in an error. sp_settriggerorder 'HumanResources. Identify the error and provide the solution. A. and .trgDelete1'. 'DELETE' However.Employee AFTER DELETE AS PRINT 'This is the second trigger' trgDelete1 is the first one to be created.12] You have created a stored procedure named prcDisplayEmpDetails in the AdventureWorks database. You want to change the execution order of the above two triggers so that trgDelete1 is executed after the trgDelete2 trigger.trgDelete2'. 'DELETE' D. 'SECOND'. What will you do to implement this in the existing stored procedure? A. manager id and title of all the employees. login id. you are also required to display the Manager id and title of the employees along with the existing employee details. D. Alter the prcDisplayEmpDetails stored procedure to display the employee id. Delete the prcDisplayEmpDetails stored procedure and create a new one.Login Id of all the employees. B.13] You have created the function. Create another procedure displaying the manager id and title of all the employees and call this procedure from the prcDisplayEmpDetails stored procedure. Now. C.EmployeeDepartmentHistory WHERE EmployeeID = @EmployeeID ) . Create another procedure displaying the employee id. Q. login id. manager id and title of all the employees. fx_Employee that accepts an employee id as a parameter and returns the details of the department and shift for that employee? CREATE FUNCTION fx_Employee( @EmployeeID int ) RETURNS table AS RETURN ( SELECT * FROM HumanResources. CREATE PROCEDURE prcEmpDetails @EmployeeID int AS BEGIN SELECT EmployeeID FROM HumanResources.Employee WHERE EmployeeID = @EmployeeID END . CREATE PROCEDURE prcEmpDetails @ManagerID int AS BEGIN SELECT EmployeeID FROM HumanResources. SELECT * FROM fx_Employee(1) D.14] You need to display a report containing the employee ids of all the employees who work with a specific manager. EXECUTE FUNCTION fx_Employee(1) C.How will you execute the above function to display the details of the employee having 1 as EmployeeID? A. SELECT fx_Employee(1) Q. EXECUTE fx_Employee(1) B. How will you implement this? A.Employee WHERE ManagerID = @ManagerID END B. CREATE PROCEDURE prcEmpDetails @ManagerID AS BEGIN SELECT EmployeeID FROM HumanResources.15] After creating a full-text index on the Description column of the Production. Identify and determine which of the following statement will display the desired output? .Employee END D.ProductDescription WHERE FREETEXT (Description.Employee WHERE ManagerID = @EmployeeID END Q.ProductDescription table. bike) However. the following query was executed to search for the products containing the word 'bike' in their description: SELECT Description FROM Production. CREATE PROCEDURE prcEmpDetails AS BEGIN SELECT EmployeeID FROM HumanResources. the above statement generates an error.C. SELECT Description FROM Production. 'bike') B. department id.ProductDescription WHERE FREETEXT (Description_bike) D.A.ProductDescription WHERE FREETEXT (Description) = 'bike' Q.EmployeeID.EmployeeDepartmentHistory d . Title FROM HumanResources.16] A view displaying the employee id. SELECT Description FROM Production.ProductDescription WHERE FREETEXT (Description. SELECT Description FROM ProductDescription WHERE FREETEXT (Description.Employee e JOIN HumanResources. LoginID. DepartmentID. SELECT Description FROM Production. login id and title of all the employees has been defined as follows: CREATE VIEW vwEmpDep AS SELECT e. 'bike') C. There is a syntax error in the above UPDATE statement.model database C. Q. UPDATE vwEmpDep SET DepartmentID = 7.ON e.17] Which of the following database does not contains any user data or user metadata? A.EmployeeID = d. You cannot update the data in the table through views.EmployeeID The following update statement when executed generates an error. B.msdb database D. DepartmentID of the Employee cannot be updated. Title = 'Engineering Manager' WHERE EmployeeID = 2 Identify the cause of error in the above statement? A.master database B. You cannot modify the data in two or more underlying tables through a view. C. D.Resources database . Contract B.Message Type C.Database Engine B.Queues Q.Reporting Services C.Integration Services .18] Which of the following Service Broker objects specifies the type of messages that will be exchanged during a conversation? A.19] Which of the following services allows you to gather data from various disparate sources and collate at a single location? A.Analysis Services D.Service D.Q. DDL C.Q.By implementing CLR Integration C.By implementing Service Broker D.By implementing High Availability Q.DCL B. a database developer needs to provide access to the data using Web services.DML D.21] Sam.20] Which of the following types of commands are used to allow the users access to use database resources? A.By implementing HTTP Endpoints B.22] Which index organizes data logically but does not store data physically? . Which of the following feature will you implement in the database to achieve this? A.DQL Q. 24] .Both. are False Q. Statement A and Statement B. Statement B: Data is physically sorted in a clustered index. are True B.A. Which of the following option is true with respect to above statements? A.Statement A is False and Statement B is True D.Both.Statement A is True and Statement B is False C. Statement A and Statement B. CLUSTERED C.23] Consider the following statements: Statement A: Clustered indexes should be built on an attribute whose values are unique and do not change often. NONCLUSTERED B. UNIQUE D. MULTI COLUMN Q. EmpID The Department table has a primary key defined on the Department ID column. Suggest the best solution for faster data retrieval. Statement A and Statement B. The first name of each employee and their designation are required to create a report.Both.Statement A is True and Statement B is False. Create a non clustered index on EmpID field of the Department table and the Employee table. D.EmpID=Department. Which of the following option is true with respect to above statements? A.Consider the following statements: Statement A: The data of a view can be modified even if the modification affects more than one underlying table.Both. A. B.Statement A is False and Statement B is True. designation FROM Employee JOIN Department ON Employee. . Q. C. However. are True. Statement B: The user of a view cannot change a column that is the result of a calculation. are False. it takes a long time to execute the following query: SELECT firstname. Statement A and Statement B.25] The Employee table of an organisation contains a large amount of data. Create a clustered index on EmpID field of the Department table and the Employee table. D. Which of the following syntax should you use? A. C. You need to design the indexes for the tables while optimizing the performance of the indexes. in alphabetical order of last name and first name. FirstName) B. Create a clustered index on EmpID field of the Employee table and a non clustered index on EmpID field of the Department table. CREATE INDEX IX_EmployeeFirstName ON dbo. On analyzing the past transactions.26] You are the database developer for Lucerne Publishing. is required on a routing basis. An employee list.B. you have noticed that the Employee table is often joined with the Salary table on the EmployeeID column.27] .Employee (SSN) C. Individual records in the Employee table are selected by social security number (SSN). Q.Employee [First Name] CREATE INDEX IX_EmployeeLastName ON dbo.Employee (EmployeeID) Q.CREATE CLUSTERED INDEX IX_EmployeeEmployeeID ON dbo.Employee (LastName. You are designing a human resources database that contains tables as Employee and Salary.CREATE CLUSTERED INDEX IX_EmployeeName ON dbo. Create a non clustered index on EmpID field of the Employee table and clustered index on EmpID field of the Department table.Employee [Last Name] D. CREATE CLUSTERED INDEX IX_EmployeeSSN ON dbo. Deleted table B. C. business rules and data integrity. the security of data.the security of data and the business rules.Inserted table Q.28] Which magic table is used to store the updated rows.Syscomments table C. how many magic tables are created? A. the business rules.Two . D. B.29] When a trigger is fired in response to the INSERT statement. A.Sysobjects table D. Q.One B.Triggers can be used to ensure and enforce _________________. whenever an update trigger is fired? A. Security Management B.Three D.Four Q. stored procedure C.Set of T-SQL statements B. A.31] Which of the following feature of CLR provides the ability of an application to interact with another application written in a different programming language? A.C.30] A trigger is a _____________.Language Interoperability D.Platform Independence . transaction Q.Standard Type System C. function D. Replication D.Both.Full-text search B.Q.Service Broker C.. refer to two magic tables. Statement A and Statement B. .32] John needs to look for similar words or phrases in the database.33] Consider the following statements: Statement A: Triggers fired in response to the DML statements. Inserted and Deleted. Which of the following feature of SQL Server 2005 will John use to accomplish it? A. Statement B: The magic tables are physical tables with structure different from the table on which the trigger is defined. Which of the following option is true with respect to the above statements? A.Notification Services Q. are True. SQL Server scans for the sessions that are waiting for a lock request in order to detect the deadlock situation. Which of the following option is true with respect to the above statements? A.Statement A is False and Statement B is True. are False.Both. C.Statement A is True and Statement B is False.B.Statement A is False and Statement B is True. Statement A and Statement B. Statement A and Statement B. Statement A and Statement B.Both. are True B.35] . D. are False.34] Consider the following Statements: Statement A: By default. C. Q.Both. D.Statement A is True and Statement B is False. Q. Statement B: SQL Server provides the SET DEADLOCK_PRIORITY command to customize deadlocking. Statement A and Statement B. Statement A and Statement B. B. are True.36] You are developing an application to manage the records of the Employees table.Consider the following statements: Statement A: The Shared(S) Lock mode is used for the operations that change or update the data. are False. which has a column named temp_emp. D. then the data is remove it and a message is displayed as 'You have removed it successfully'.Create Trigger trgDeletetemp_emp ON Employees AFTER UPDATE . Which method will you incorporate in your application to accomplish this requirement? A. Which of the following option is true with respect to above statements? A. Statement B: The Exclusive(X) Lock mode ensures that multiple updates can not be made to the same resources at the same time.Both. Q. C.Statement A is True and Statement B is False.Both.Statement A is False and Statement B is True. When the data in this column is no longer required. Create Trigger trgAltertemp_emp ON Employees AFTER DROP AS Print { You have removed it successfully} C.AS Print You have removed it successfully B.Create Trigger trgDeletetemp_emp ON Employees AFTER DELETE AS Print You have removed it successfully Q.37] Consider the following statement: CREATE TRIGGER trgDeleteProject ON Project FOR DELETE . Create Trigger trgDeletetemp_emp ON Employees AFTER Alter AS Print 'You have removed it successfully' D. D.Project_ID = d. you have created the Audit table in which you insert a row whenever the table is created or dropped. the table is dropped. What is the best way to do this? A.AS DELETE ProjectManager FROM ProjectManager t JOIN Deleted d ON t.The query will result in an error. For this. B. Inc.A trigger named trgDeleteProject is created on the ProjectManager table and all the corresponding records in the ProjectManager table are deleted whenever a row is deleted from the ProjectManager table.A trigger named trgDeleteProject is created on the Project table and all the corresponding records in the Project table are deleted whenever a row is deleted from the ProjectManager table. Create an INSERT trigger that will insert rows in the Audit table whenever the table is created and dropped.A trigger named trgDeleteProject is created on the Project table and all the corresponding records in the ProjectManager table are deleted whenever a row is deleted from the Projects table. Q. Before the end of execution of that procedure. C.38] You are a database developer in Inpro. You have created a procedure in which you are creating a a table to store some values that need to be processed during the execution of the procedure. You want to monitor when the table is created and dropped. .Project_ID What will be the output of this query? A. .iCurrentStrength FROM Position WHERE cPositionCode = @Pcd B.@Description char(20) OUTPUT. if the declaration of the parameters is as follows: CREATE PROCEDURE prcGetPos @Pcd char(4). Q.Create an DELETE trigger that will insert rows in the Audit table whenever the table is created and dropped.39] You are developing an application for RedSky Inc. The application should display the formatted report of the status of positions available in the company. D. .B.Create an INSERT trigger that will insert rows in the Audit table whenever the table is created and a DELETE trigger whenever the table is dropped.SELECT @Description = vDescription. You are required to create a procedure named prcGetPos that will return the position description and the position requirement for a specific code passed as Pcode. @RD int OUTPUT AS A. C. SELECT vDescription=@Description. @RD = iBudgetedStrength . The Position table has iBudgetStrength column containing the details of budgeted strength for the position and iCurrentStrength column containing the current strength of the manpower for the required position. Create an DDL trigger that will insert rows in the Audit table whenever the table is created and dropped. which is in the process of expansion. Which of the following option is the correct way to assign value to the parameters. sp_helpdb prcDisplayEmployee .iBudgetedStrength . He has executed the following queries: sp_helptext prcDisplayEmployee select * from prcDisplayEmployee However.iCurrentStrength FROM Position WHERE cPositionCode = @Pcd Q.sp_helpdb prcDisplayEmployee exec prcDisplayEmployee B.SELECT @Description as vDescription. RD = iBudgetedStrength . @RD as iBudgetedStrength .40] Smith is working as a database programmer in Horizon Corporation.iCurrentStrength FROM Position WHERE cPositionCode = Pcd D.iCurrentStrength=@RD FROM Position WHERE cPositionCode = @Pcd C. the queries doesnot display the output.SELECT Description = vDescription. He has been assigned a task to create a query that will give the output of the procedure named prcDisplayEmployee if the procedure exists. Which of the following query should be used by him to accomplish the task? A. sp_helptext prcDisplayEmployee show prcDisplayEmployee .sp_helptext prcDisplayEmployee exec prcDisplayEmployee D.output prcDisplayEmployee C.
Copyright © 2024 DOKUMEN.SITE Inc.