semAmt2.xls

  • Upload
    sanju1t

  • View
    214

  • Download
    0

Embed Size (px)

Citation preview

  • 8/14/2019 semAmt2.xls

    1/70

    1 You are creating a Windows-based application that takes age from the user.The application should convert the age from character data type to integer datatype. Which of the following functions you need to use to accomplish thedesired task?

    2 The _______ model is based on a real world perception that comprises acollection of objects or entities and the relationships among these.

    3 The ABC University used to offer a course in Visual Basic. However, due toless demand of the subject, the university dropped the course from its ITcurriculum. This resulted in modification of the complete IT curriculum. Identifythe type of entity that the Visual Basic course is.

    4 A computer institute offers courses on various programming languages forstudents. The students can select any number of offered courses. Which typeof relationship exists between the students and offered courses?

    5 Sam is accessing a table that contains details of all the employees of hisorganization. He needs to retrieve the details of those employees who have

    more than $10000 salary per month. He has decided to use the PRODUCTrelational operator to accomplish this task. However, his manager has informedhim that the use of this relational operator will not give the desired result.

    Analyze the situation and provide the operator that Sam should use.

    6 Smith works as a Manager in TechnoWorld, Inc. He manages and evaluatesthe performance of his team. Identify the entities and relationship in the givenscenario.

    7 Identify the type of relationship in the following sentence: Software engineerscan work on various programming languages.

    8 There are _______ types of relationships that exist between entities.9 Peter is working as a Senior Software Engineer in NewSol, Inc. His Employee

    ID is N0065. He joined the organization on 19 Aug, 2008. Identify the attributesof the entity instance.

    10 Peter has been given a task to simplify a database structure. He has torepresent the data and the relationships among them in the form of rows andcolumns. He has decided to use the Network model for completing this task.

    However, his manager has informed him that the use of this model will notgenerate the desired result. Analyze the situation and provide the correct modelthat Peter should use.

    11 Sam is working on two tables, Employee Details and Department Details. TheEmployee Details table contains employee ID, employee name, department ID,and designation of all employees. The Department Details table contains

    department ID and department names. Sam has to retrieve the name of thedepartment that has the maximum number of employees working. Whichoperator should Sam select for the given scenario?

    12 Subtypes are connected to the supertype by a relationship known as

    _________.13 __________ is a scientific method of breaking down complex table structures

    into simple table structures by using certain rules.14 When each cell of the table contains precisely one value, the table is said to be

    in the ______ normal form.

  • 8/14/2019 semAmt2.xls

    2/70

    15 Jim works as a database administrator in TechnoSol, Inc. He has a table thatcontains details of employees and location of the meetings they have attendedin the last one year. Jim has to normalize the table. The table columns consistthe details of Employee ID, Department ID, meeting date, and location of themeeting. On analyzing the table he found that meeting date and location of themeeting columns consist of more than one value in each cell. Jim has decided

    to normalize the table by using second normal form. However, his manager hasinformed him that using second normal form for the given scenario will not becorrect. Analyze the situation and provide the normal form that Jim should use.

    16 A table lists the details of all the students studying in an institute. Identify thedeterminant among the four columns of the given table. Click the Exhibit buttonto view the table.

    17 Which of the following sentences is CORRECT about second normal form?

    18 A table is said to be in _____ normal form when it is in second normal form andevery non-key attribute is functionally dependent only on the primary key.

    19 Which of the following processes can increase disk space utilization?20 Stella is working on a table that contains the details of students who have

    appeared for different course exams. She has to normalize the table. The

    primary key of the given table is Roll Number + Exam Code. On analyzing,Stella found that any modification in Student Name column will lead tomodification in the whole table and Student Name + Exam Code can also bechosen as the primary key. To avoid this redundancy, which normal form

    should Stella select? Click the Exhibit button to view the table.

    21 Jim is working on an ER diagram. He has been instructed by his manager tomap the given ER diagram to its corresponding tables. On analyzing the wholeER diagram, he is planning to create a table called Account Details. However,his colleague has advice him that creating only one table will not give the

    desired result. Analyze the given ER diagram and provide the tables that Jimshould create.Click the Exhibit button to view the figure.

    22 The _________ operator builds a relation from tuples appearing in either orboth of the specified relations.

    23 The ________ model represents all data in a database as simple tables in therow-column format.

    24 Replacing optional attributes with subentities is called __________.25 Which of the following sentences is NOT correct about normalization?

  • 8/14/2019 semAmt2.xls

    3/70

  • 8/14/2019 semAmt2.xls

    4/70

    35 Joe is working on a Linux system. He has to chat with Angela. He first wants tocheck whether Angela is online and ready to receive messages. For this, hetypes the following command at the shell prompt and presses the Enter key:whoHowever, the preceding command displays the list of currently logged on

    users. This list does not indicate whether the user is ready to receivemessages. Identify the correct command that Joe should use to accomplish therequired task?

    36 Which of the following options is NOT an example of Mail User Agent (MUA)?

    37 Which of the following statements is a function of Mail User Agent (MUA)?

    38 Jack is working on his Linux system. His boss has sent him a mail that lists the

    tasks to be performed by Jack. Jack has to access his inbox to read the newmails received on his Linux system. Identify the correct sequence of steps thatJack needs to follow to read the new mails.

    39 Julia is logged on to the Linux system. She has to access her Inbox to read

    mails. She invoked the pine MUA and pressed the S key to display the list offolders. Analyze whether Julia has pressed the correct key to display the list offolders. If not, provide the correct solution.

    40 Which of the following options do you need to press on the main menu of pine

    to configure the pine options?41 You have sent a mail by using the pine utility of Linux. Now, you need to verify

    whether the mail has been sent or not. How will you perform this task?

    42 You have sent an E-mail to your friend by using the pine utility of Linux. Afteryou have sent the mail, its copy is saved automatically in the sent-mail folder.

    Now, you need to verify this by checking the content of the sent-mail folder.Which of the following sequence of steps do you follow to perform this task?

  • 8/14/2019 semAmt2.xls

    5/70

    43 You have a Linux system. You have to send an E-mail to your friend. For this,you performed the followed steps:1. Type pine at the shell prompt, and press Enter.2. Press C.3. Type the name of the recipient in the To: block, and press Enter.4. Type the subject in the Subject: block, and press Enter.

    5. Type the contents of the mail.6. Press the Ctrl and C keys to send the e-mail.

    However, you are not able to send the e-mail by using the preceding steps.Identify the problem and provide the correct solution.

    44 Which of the following statements is NOT the correct file naming guideline ofthe Linux operating system?

    45 Which of the following options do you need to press to switch to the Insertmode and then type the contents at the current cursor position of the vi editor?

    46 You have written a file by using the vi editor. Now, you need to save the file bythe name myfile.txt. Which of the following steps do you need to follow to savethe file and close the vi editor?

    47 Which of the following commands can be used to replace a character at thecurrent cursor position and switch back to the Command mode?

    48 You have opened a file in the vi editor. You have to make some changes in thethird line of the file. The cursor is currently at the end of the second line. To

    make changes in the third line, you pressed the k command. However, thecursor moved to the first line instead of the third line. Analyze the situation andprovide the correct command that should have been used to move the cursorfrom the second to the third line.

    49 You have to view the files stored in the /home/bill directory. You are currently inthe bill directory. Which of the following commands would you use for this

    purpose?50 There are three files in the /home/math directory. The file names are

    math001.2009, math002.2009, and math003.2009. You need to copy all thefiles in the /home/math directory to the /home/backup directory. You arecurrently in the math directory. Which of the following commands would youuse to perform this task?

    51 There is a file named myfile001.txt in the /home/mydir directory. You need torename the file to myfile002.txt. You are currently in the mydir directory. Forthis, you typed the following command at the shell prompt:rm /home/mydir/myfile001.txt /home/mydir/myfile002.txt

    Analyze and predict whether the preceding command is able to accomplish therequired task. If not, predict the correct command.

  • 8/14/2019 semAmt2.xls

    6/70

    52 ABC Bank is offering personal loans to its customers at reduced interest rates.This offer is valid for only a limited period. The bank intends to use a softwareapplication to record all loan details. The bank wants that once the offer periodends, the interest rates and other details such as loan limits are changed to theoriginal values. The bank does not want to modify the complete softwareapplication as a result of change in such loan details. Identify the tier on which

    the bank should place such details in order to accomplish their requirement.

    53 ___________ provides support for asynchronous communication betweenclients and the database server, enabling reliable query processing.

    54 Which of the following is NOT a feature of the CLR component of the .NETFramework?

    55 Which of the following features of SQL Server 2005 allows you to implementprogramming logic in any language supported by the .NET Framework?

    56 Jonathan is using the ALTER statement on a database that he has created.Under which of the following options is the statement being used by Jonathan

    included?57 Which of the following mathematical functions provided by SQL Server 2005returns the largest integer less than or equal to the specified value?

    58 You need to display a report that includes the Login Ids of the employees andtheir birth dates. You want that the birth date should be displayed in yy.mm.ddformat. Which of the following statements will you use to accomplish thesame?

    59 You need to generate summary rows from a table by using aggregate functionsin the query results. Which of the following options will you use to accomplishthe same?

    60 The _______ join displays the result set containing all the rows from one table

    and the matching rows from another table.61 Which of the following operator refers to a value that is greater than the

    maximum value in the list?62 You have to retrieve the details of employees from the Employee table, which

    contains the EmpID and EmpTitle columns. You have to write a query thatdisplays Employee ID and title under the column headings, Employee ID and

    Designation, respectively. Which of the following SQL queries would you use toperform the required task?

    63 You have to create a report containing the Employee ID, title, and total leavesof those employees whose total leaves are not greater than 20. Which of the

    following SQL queries would you use to create this report?

  • 8/14/2019 semAmt2.xls

    7/70

    64 You have to retrieve the Name, DepartmentID, and GroupName columns fromthe Department table. The data of the Name column should be displayed incapital letters with a user-defined heading, Department Name. Which of thefollowing SQL queries would you use to retrieve the required information in thedesired format?

    65 You need to create a report containing the product ID along with their listprices. The products should be ranked based on their list price. The productwith the highest value of list price should be given the rank as 1. In addition, iftwo products have the same list price, they should be given the same rank.However, the next product in the order of list price would be assigned the nextrank value. Which of the following SQL queries would you use to retrieve therequired report?

    66 You have to display a report that contains the Employee ID and the name ofdepartment for each employee. The Employee ID is stored in the

    EmployeeDepartmentHistory table, and the department name is stored in theDepartment table. The Department and EmployeeDepartmentHistory tablescontain a common column, DepartmentID. Which of the following SQL querieswould you use to display the required report?

    67 You have to create a report that displays the number of years an employee hasbeen working with the organization. For this, you created the following SQLquery:

    SELECT datepart (yy, HireDate, getdate()) AS 'Age'FROM HumanResources.EmployeeHowever, the preceding query does not compile. Identify the reason andprovide the correct solution.

    68 You have to create a report that displays the EmployeeID of all the employees,

    who live in the Bothell city, from the EmployeeAddress table. For this, youcreated the following SQL query:

    SELECT EmployeeID FROM HumanResources.EmployeeAddress WHEREAddressID= (SELECT AddressID FROM Person.Address WHERE City = 'Bothell')

    However, the preceding query gives an error "Subquery returned more than 1value". Provide the correct solution for this problem.

  • 8/14/2019 semAmt2.xls

    8/70

    69 You have to create a report that displays the Employee ID and the title of all theemployees whose sick leave hours are more than the sick leave hours ofemployees designated as Stocker. For this, you used the following SQLquery:

    SELECT EmployeeID, Title, SickLeaveHours

    FROM HumanResources.EmployeeWHERE SickLeaveHours >ANY (SELECT SickLeaveHoursFROM HumanResources.Employee WHERE Title ='Stocker')

    Analyze and predict whether the preceding query would display the requiredreport. If not, provide the correct solution.

    70 You have to create a report that displays the EmployeeID of those employeeswhose sick leave hours are greater than the average sick leave hours of

    employees with title as 'Network Administrator'. For this, you used the followingSQL query:

    SELECT EmployeeId FROM HumanResources.Employee WHERESickLeaveHours= (SELECT AVG(SickLeaveHours) FROM HumanResources.EmployeeWHERE Title = 'Network Administrator')

    Analyze and predict whether the preceding query would display the required

    report. If not, provide the correct solution.

    71 You have to create a report that displays all the titles of the employees along

    with their average sick leave hours when the sick leave hours are more than 20and the group average value is greater than 35. For this, you used the followingSQL query:

    SELECT Title, 'Average Sick Leave Hours' = avg(SickLeaveHours) FROMHumanResources.Employee WHERE SickLeaveHours > 20 GROUP BY Title

    Analyze and predict whether the preceding query would display the requiredreport. If not, provide the correct solution.

    72 Which of the following databases acts as a template or a prototype for the newdatabases in SQL Server 2005?

    73 What is the extension of the primary data file in SQL Server 2005?

    74 Which of the following stored procedures is used to rename a database in SQLServer 2005?

    75 The ____________ statement is used to delete a database when it is no longerrequired.

  • 8/14/2019 semAmt2.xls

    9/70

    76 Which of the following functions provided by the XML data type of the SQLServer is used to add nodes to XML in an XML column or variable?

    77 You are creating an Employee table in SQL Server 2005. The table containsthe EmpPhone column to store the phone numbers of the employees. Youneed to ensure that the phone number entered by the employee should not beless 10 digits. Which of the following constraints would you apply on the

    EmpPhone column to accomplish this task?78 The Employee table in SQL Server 2005 contains the details about employees

    working in an organization. According to certain new requirements, you have toadd another column for storing PAN card details of each employee in theEmployee table. Which of the following statements would you use to implementthis change in the Employee table?

    79 The details about various products are stored in the Products table. The priceof one of the products has changed. You need to reflect this change in the

    Products table. Which of the following statements allows you to perform thistask?

    80 An XML document needs to be shredded in order to store it in a database

    table. Which of the following tasks is NOT a part of shredding the XMLdocument?81 You have to retrieve the relational data from the Products table into the XML

    format for reporting purposes. For this, you want to write a Select query thatreturns the result in the form of nested XML elements. Which of the followingmodes of the FOR XML clause would you use to retrieve the XML data in therequired format?

    82 You have to create the Orders table in the database. The table contains threecolumns: OrderID, OrderDate, and OrderPrice. The OrderID column cannot be

    left empty while inserting data in the table. Which of the following statementswould you use to create the Orders table?

    83 You have to create the EmpPayDetails table in the database. This tablecontains the personal details of the employees and their payment rates.Whenever there is a change in the payment rate of an employee, a separate

    record is inserted in the RateChangeDate column. The EmpPayDetails tableneeds to be partitioned based on the changes made in the payment rates ofemployees. For this, you have created a partition function and associated itwith various filegroups by using the partition scheme named RateChngDate.Which of the following statements would you use to create the table that willstore the partitioned records?

  • 8/14/2019 semAmt2.xls

    10/70

    84 You have to store the data in the following columns of the Address table in thedatabase:

    AddressIDAddressLine1AddressLine2

    StateProvinceIDPostalCodeWhich of the following statements would you use to perform this task?

    85 You have received the order details from a vendor in an XML document. ThisXML data needs to be stored in a database table. For this, you need to shredthe XML document by using the OPENXML function. Identify the correctsequence of tasks that you need to perform to shred the XML document.

    86 You have written the following statements to retrieve details of employees withEmployee ID as 1 or 2:

    SELECT EmployeeID, ContactID, LoginID, TitleFROM HumanResources.EmployeeWHERE EmployeeID=1 OR EmployeeID=2FOR XML RAW

    Predict the output of the preceding query.

    87 How many clustered indexes can be created on a table?88 Which of the following constructs is used in a batch to allow a set of T-SQL

    statements to execute repeatedly as long as the given condition holds true?

    89 Which of the following data types can be returned by a scalar function in SQLServer 2005?

    90 Which of the following types of triggers is fired after the execution of the DMLoperation for which it has been defined?

    91 Which of the following problems occurs in the database when two or moretransactions try to modify the same row?

  • 8/14/2019 semAmt2.xls

    11/70

    92 You have to create a clustered index on the Employee table. While creating theindex, you need to reserve a percentage of free space on each data page ofthe index to accommodate future expansion. Which of the following optionsshould you use to accomplish this while creating the clustered index?

    93 Which of the following statements is NOT true about XML indexes?

    94 Which of the following statements is NOT true about batches?

    95 You have to update two tables in a database. For this, you have written two

    update statements. You want that both update statements must execute as asingle logical unit of work to maintain data integrity. If any type of error occursin any of the update statements, none of the statements should be executed.Which of the following options would you use to implement this?

    96 You have to set the timeout period of five seconds for a transaction to wait on ablocked resource. Which of the following statements would you use toaccomplish this?

    97 Identify the correct sequence of tasks that you need to perform to configure full-

    text search on a database.

  • 8/14/2019 semAmt2.xls

    12/70

    98 You have created a view in the database by using the following statements:

    CREATE VIEW HumanResources.vwEmployeeDepDataASSELECT e.EmployeeID, MaritalStatus, DepartmentIDFROM HumanResources.Employee e JOIN

    HumanResources.EmployeeDepartmentHistory dON e.EmployeeID = d.EmployeeIDNow, you want to create a clustered index on the vwEmployeeDepData view.For this, you first need to bind the vwEmployeeDepData view to the schema ofthe underlying tables. Which of the following statements would you use toperform this task?

    99 The CustomerID attribute of the Customer table is an IDENTITY column and itsvalue cannot be specified while inserting a new record. If anyone specifies thevalue for the CustomerID in the INSERT statement, an error will be generated.To handle such errors, you decide to use the TRY and CATCH blocks. Youwant that when an error occurs while inserting a record in the Customer table,the error message along with the line number at which the error occurredshould be displayed. Which of the following statements would you use toperform this task?

  • 8/14/2019 semAmt2.xls

    13/70

    100 You have created following stored procedure in SQL Server:

    CREATE PROCEDURE prcGetEmployeeDetail @EmpId int, @DepNamechar(50) OUTPUT, @ShiftId int OUTPUTASBEGIN

    IF EXISTS(SELECT * FROM HumanResources.Employee WHEREEmployeeID = @EmpId)BEGINSELECT @DepName = d.Name, @ShiftId = h.ShiftIDFROM HumanResources.Department d JOINHumanResources.EmployeeDepartmentHistory hON d.DepartmentID = h.DepartmentIDWHERE EmployeeID = @EmpId AND h.Enddate IS NULLRETURN 0

    ENDELSERETURN 1

    ENDNow, you have to create another procedure that will call theprcGetEmployeeDetail procedure. Which of the following statements would youuse to perform this task?

    101 You have to create an update trigger, trgMagic, on theEmployeeDepartmentHistory table. You want that whenever any updatestatement is fired on the EmployeeDepartmentHistory table, the trgMagictrigger is executed and displays the previous value in the table as well as theupdated value. Which of the following statements would you use to perform therequired task?

    102 ___________ is a set of functions that provide programmable logic used byclient applications over the Internet.

    103 ___________ is an extension of distributed computing based on therequest/reply design pattern.

  • 8/14/2019 semAmt2.xls

    14/70

    104 To use the native XML Web services of the SQL Server, you need to establishan ______ endpoint at the server.

    105 Which of the following database objects in the Service Broker architecture is anaddressable endpoint for the conversations?

    106 The Customer table in the database contains the information about the creditcards of the customers. You need to check whether the credit card number

    provided by the customer is valid. For this, you want to call a Web service.Which of the following options would you use to perform this task?

    107 You have to create Service Broker objects in the AdventureWorks database.For this, you first need to enable Service Broker in the database. Which of thefollowing statements can be used to enable Service Broker?

    108 You have to create a message named myMessage that will be exchanged

    between the Service Broker services. The message will not be validated beforesending. Which of the following statements can be used to create themessage?

    109 You have to implement Service Broker architecture between two services. Forthis, you have to create an agreement to define the messages that will beexchanged between the two services. Which of the following objects needs tobe created to accomplish this?

    110 Which of the following statements will you use to enable the CLR integrationfeature in the database?

    111 You have created a .NET assembly named CLRIntegration.dll. You need toimport this assembly in SQL Server database engine such that the .NET codeis able to access any resource within or outside SQL Server. For this, youcreated the assembly object by using the following code:

    CREATE ASSEMBLY CLRIntegration FROM

    'C:\CLRIntegration.dll' WITH PERMISSION_SET = SAFEHowever, the preceding code does not allow the .NET code to access anyexternal resource. Analyze the preceding code and provide the correct solution.

  • 8/14/2019 semAmt2.xls

    15/70

    112 You have to create a contract to define an agreement between two services inSQL Server. The message type defined by this contract can be sent only by theendpoint that started the conversation. For this, you have used the followingcode:

    CREATE CONTRACT sendContract

    (sendMessage SENT BY TARGET);

    However, the preceding code allows the message to be sent by the endpointthat is the target of the conversation. Analyze the problem and provide thecorrect solution.

    113 ___________ allows the database developers to create objects in any of the.NET-supported languages and embeds the objects in the database.

    114 You have created a procedure, getSalesDetails that returns a result set. Youneed to create an HTTP endpoint named sqlEndpoint to provide thegetSalesDetails procedure as a Web method. For this, you used the following

    statement in SQL Server:

    CREATE ENDPOINT sqlEndpointSTATE = STARTED AS HTTP(PATH = '/sql',AUTHENTICATION = (INTEGRATED ),PORTS = ( CLEAR ), SITE = 'SERVER' )FOR SOAP (WEBMETHOD 'getSqlInfo' (name='master.dbo.xp_msver',

    SCHEMA=STANDARD),WEBMETHOD 'getSalesDetails' (name='master.sys.fn_MSdayasnumber'),WSDL = DEFAULT, SCHEMA = STANDARD, DATABASE = 'master',

    NAMESPACE ='http://tempUri.org/' );

    However, when the preceding statement is executed, the following error isdisplayed:

    Msg 7890, Level 16, State 1, Line 1Identify the reason for this error and provide the correct solution.

  • 8/14/2019 semAmt2.xls

    16/70

    115 You have to create a service to be used by Service Broker to deliver messagesto the correct queue within a database. The service will store all the messagesin the queue named sendQueue. The contract for this service will besendContract. To create the service, you used the following statement:

    CREATE SERVICE sendService

    ON QUEUE(sendContract) [dbo].[sendQueue]

    However, the preceding statement displays a syntactical error. Analyze thestatement and provide the correct solution.

    116 You have to create a managed stored procedure to store the employee detailsin an XML file. For this, you have created the ConvertXML.dll assembly andregistered it in SQL Server with the name ConvertXMLAssembly. The code for

    ConvertXML.dll assembly is:

    namespace CLRStoredProcedure

    { public class XMLProc{

    public static void convXml(){

    .}

    }}

    Now, you have to create a stored procedure and associate it with theconvXML() method contained in the ConvertXML.dll assembly. For this, youhave used the following statement:

    CREATE PROCEDURE clrproc AS EXTERNAL NAMEConvertXML.[CLRStoredProcedure.XMLProc].convXmlAnalyze the scenario and identify whether the preceding statement will createthe required managed stored procedure. If not, provide the correct solution.

  • 8/14/2019 semAmt2.xls

    17/70

    117 Consider the following code for the CalcSal.dll assembly:

    namespace EmployeePay{

    public class Pay {

    public static SqlString calcSalary(SqlString emp){

    .}

    }}

    You have imported the preceding assembly in SQL Server database engine bythe name CalcSalAssembly. Now, you have to create a managed function

    named SalaryCalculation that will refer to the calcSalary() method of thepreceding assembly. Which of the following statements would you use tocreate the managed function?

    118 The UserNameAudit table in the database stores various details of the usersincluding the E-mail address. While inserting the users details, you need tovalidate the E-mail address to ensure that it is a valid E-mail address. You havecreated the ValidateMail.dll assembly to implement the logic of validating the E-mail address. The code of ValidateMail.dll assembly is:

    public class trgMail{

    public static void MailValid()

    {// Write the logic of validating the e-mail address

    }}

    You have imported the preceding assembly in SQL Server database engine bythe name ValidateEmailAssembly. Now, you have to create a trigger that willrefer to the MailValid() method of the preceding assembly. Which of thefollowing statements would you use to create the managed trigger?

    119 You have to implement Service Broker architecture in the database engine tocreate services that converse with each other by sending and receivingmessages. For this, you have created the message type. Now, you need tocreate a queue object that is available to receive messages. Which of thefollowing statements would you use to accomplish this task?

  • 8/14/2019 semAmt2.xls

    18/70

    120 You have to implement Service Broker architecture in the database engine tocreate services that converse with each other by sending and receivingmessages. For this, you have created two services, sendMessage andreceiveMessage services. Now, you need to begin a conversation between thesendMessage and receiveMessage services by using the sendContractcontract. Which of the following statements would you use to accomplish this

    task?

    121 You have to implement Service Broker architecture in the database engine to

    create services that converse with each other by sending and receivingmessages. For this, you have created all the required broker objects andstarted the conversation. Now, you need to send and receive messages. Which

    of the following statements would you use to send a message namedsendMessage?

    122 Which of the following components of the .NET Framework provides thevarious services, such as code compilation, memory allocation, and garbagecollection?

    123 Which of the following properties of a form is used to specify whether a formwill be displayed as a normal, maximized, or minimized window on startup?

    124 Which of the following events of a Windows form occurs when the form losesfocus and is no longer active?

    125 Which of the following properties of the ListBox control can be set at design

    time as well as at run time?126 Which of the following controls allows the user to select an option from the

    given list and also allows him to type new text in it?127 Which of the following properties of the GroupBox control is used to specify the

    caption to be displayed for the control?128 _____________ function is used to convert char to int data type.

    129 You cannot create an instance of the __________ by using the new keyword.

    130 You are working as an application developer in CompSol Inc. You are asked tocreate a Windows-based application that should have a single Form. The Formshould contain multiple controls to take input from user. After creating the

    application, you compiled it. During compilation, you encountered few errors inyour code. Which of the following steps you need to perform to view errordetails?

  • 8/14/2019 semAmt2.xls

    19/70

    131 You are working as an application developer in CompSol Inc. You are asked todevelop a Windows-based application for a grocery shop. The applicationshould allow the user to select a grocery item from the list of items. Which ofthe following code snippets, you need to write in your application to create thelist of grocery items?

    132 You are working as an application developer in ABC Corp. You are asked tocreate a Windows-based application for a school to gather the informationabout the students taking admission in the school. The application should havea Form to enter the information about the students. The Form should have abutton control that should allow the user to submit the information. You need to

    provide an appropriate caption to the button control. Identify the code snippetthat should be used in your application to accomplish the desired task.

    133 You are working as an application developer in InfoSol Inc. You are asked todevelop a Windows-based application for a grocery store. The applicationshould have an interface that should take the bill amount of the customers asinput. If the bill amount is greater than 500 dollars, a button control must beadded to the Interface. The click event of the button control should use Next()method of System.Random class to generate the discount amount between 5%and 35% for the customers who have made purchases more than 500 dollars.The customers must be greeted with an appropriate message.Identify the correct code to accomplish the desired task.

  • 8/14/2019 semAmt2.xls

    20/70

    134 You are working as an application developer in CompSol Inc. You are asked tocreate a Windows based application that should have the login form. Theapplication should allow the user to create their login ID. You need to add avalidation check on the TextBox control that takes the password from the user.An appropriate message should be shown to the user if the length of thepassword is less than 6 characters. Which of the following code snippet you

    need to add to your application code to accomplish the task.

    135 You are developing a Windows-based application that creates the multiple

    objects of the Button class at run time. Which of the following components ofthe .NET Framework allocate memory to these objects?136 You are creating a Windows-based application. You need to drag multiple

    controls from the Toolbox window to the Form control. For your convenience,you want the Toolbox window to be opened permanently. Which of thefollowing features of Visual Studio .NET IDE you need to modify?

    137 You are asked to create a Windows-based application. The form of theapplication must appear at the centre of the screen when application is

    executed. Which of the following properties you need to set to accomplish thedesired task?

    138 You are asked to create a Windows-based application. The form present in theapplication when gets the focus at run time should come to the front of other

    applications or its caption should flash on the task bar. Which of the followingmethods you need to use to accomplish the desired task?

    139 Which of the following controls is a container control?

    140 __________ is a process by which an application in the Windows environmentis able to link to library functions at run time.

    141 Which of the following types of CommonDialog classes can be used to changethe size of the text in the Windows-based application?

    142 Which of the following properties is used to create an MDI parent form?143 Which of the following classes is used for printing the text as well as graphics?

    144 The ______________ is used to display the Print Setup page on the screen byusing the ShowDialog() method.

    145 Which of the following control properties specifies the use of an element in theuser interface and reports it to accessibility aids?

  • 8/14/2019 semAmt2.xls

    21/70

    146 You are working as an application developer in CompSol Inc. You are asked tocreate a Windows based application for children. Through the application,children will be able to learn about the color combinations. Your interfaceshould have one TextBox control and two Button controls required to set thebackground and foreground color of the text written in the TextBox control.Your application should use the ColorDialog control to invoke the default Color

    dialog box. Identify the correct code snippet that you need to add to yourapplication.

  • 8/14/2019 semAmt2.xls

    22/70

    147 You are working as an application developer in InfoSol Inc. You are asked tocreate a Windows-based application for a school. The application shouldenable the user to enter the data in the Student Details forms. The StudentDetails form should have a menu item named Print, which should get mergedwith the main MDI parent form menu. When the user clicks the Student Detailsform, the Student Details form should be displayed. The user should be able to

    close the application by clicking the Exit menu item. Identify the correctsequence of tasks that you need to perform to create the application.

  • 8/14/2019 semAmt2.xls

    23/70

    148 You are working as an application developer in InfoSol Inc. You are asked tocreate a Window-based application that should allow the user to type in thecontent and then print it. Your application should use the PrintDialog andPrintDocument controls to invoke the default Print dialog box. Identify thecorrect code that you need to add to your application.

    149 You are working as an application developer in InfoSol Corp. You are asked tocreate a Window-based application that should implement the concept ofglobalization. The application should have an interface to provide theinformation about culture settings of the system on which the application isrunning. The information should be available on the message box when theuser clicks the button. Identify the code that you need to add to the click eventof the button control.

  • 8/14/2019 semAmt2.xls

    24/70

    150 You are working as an application developer in Infosol Corp. You are asked tocreate a Windows-based application that should have Pop-up help fordisplaying tips for the controls present in the application. Identify the correctsteps that you need to perform for enabling the Pop-up help in a form presentin the application.

    151 Anthony is working as an application developer in Infosol corp. He is asked tocreate a Windows-based application that should allow the users to print thecontent they have typed in the textbox. The application should invoke the

    default Print dialog box by instantiating the PrintDialog class. He writes thefollowing code to accomplish the task........................using System.Drawing.Printing;namespace Print{

    public partial class Form1 : Form{

    PrintDialog pdlg = new PrintDialog(); internal PrintDocument PDocument = new PrintDocument(); public Form1()

    {

    InitializeComponent(); }

    private void Print_Click(object sender, EventArgs e){

    pdlg.Document = PDocument; DialogResult result = pdlg.ShowDialog();

    if (result == DialogResult.OK)PDocument.Print();

    }private void PDocument_PrintPage(object

    sender,System.Drawing.Printing.PrintPageEventArgs e) {

    Graphics.DrawString(textBox1.Text, new Font("Arial", 40,FontStyle.Bold), Brushes.Black, 150, 125);

    } }}

  • 8/14/2019 semAmt2.xls

    25/70

  • 8/14/2019 semAmt2.xls

    26/70

    157 You are creating a Windows-based application that accesses the printer. Yourapplication should have restricted access to the printer. Which of the followingprinting permission levels allows printing only from a more-restricted dialogbox?

    158 You are creating a Windows-based application that is using theCrystalReportViewer control to display the groups into which the Crystal

    Reports is divided. Which of the following components of theCrystalReportViewer control you will use to accomplish the desired task?

    159 You are asked to create a Windows-based application that should be able toretrieve the image resources from an assembly at run time by using theResourceManager class. Which of the following methods of theResourceManager class you need to use to retrieve images from theassembly?

    160 You are asked to create a help system by using the HTML Help Workshop(hhw.exe) tool, which is a help-authoring tool. In which of the following files you

    will put the text that will appear on each page in the help system?

    161 You are working as a developer in InfoSol Inc. You are asked to create an

    application that allow the user to load the picture available on the machine onwhich the application is running. The application should allow the user to enterthe path, where the picture is located, in the textbox. You need to use theasynchronous method to create your application. Identify the correct code thatyou need to add to your application.

  • 8/14/2019 semAmt2.xls

    27/70

    162 You are working as a developer in InfoSol Inc. You are asked to create aWindows-based application that should implement the concept ofasynchronous programming. For such application, the Event Handlers must beassigned to the DoWork and the RunWorkerCompleted events. To do so, youneed to identify the correct code snippet to be added to the constructor of theclass in the application.

    163 You are working as a developer in InfoSol Corp. Your team a created anapplication for a grocery store. The application must validate the customers

    who are regular members of the grocery store. The regular customers areissued the membership cards that bear their name and card number. You areasked to create an application that should validate the customer's name and

    card number before allowing them to avail the discounts. The interface of yourapplication must have the validate button. Your application must havereference to the validation component created by your team.Identify the code snippet that you need to add to the click event of the validatebutton.

  • 8/14/2019 semAmt2.xls

    28/70

    164 You are working as a developer in Infosol corp. You are asked to create aWindows-based application for a university which is conducting an entranceexam. The application must validate the age of the students before acceptingtheir forms. The age of the students should not be less than 18 and more than21. For that you need to create a class named Student and use Get and Setmethods to validate the age. Identify the code snippet that you need to use.

    165 You are working as an application developer in Infosol Corp. You are asked tocreate an application whose interface must have a Calendar control. TheToolbox window of the Visual Studio IDE does not show the Calendar control.So you decide to add the Calendar control to the Toolbox window by selecting itfrom the Choose Toolbox Items dialog box. After the Calendar control is addedto the Toolbox window, you can drag it to the form present in your application.

    When you add the Calendar control to the application, there are twoassemblies that are automatically created and added to your application.Identify those assemblies.

    166 Which of the following statements you need to write in your Windows

    application code to use the Form class?

    167 __________ are loaded and executed within the process space of the hostapplication.

    168 ______________ can be used in a component if you want to use it only insidethe component class.

    169 When the ___________ method is called, the application will continue to runwithout interruption until the MethodNameCompleted event is raised.

    170 Which of the following classes, of the System.Threading namespace, limits thenumber of threads that can access a resource or pool of resourcesconcurrently?

    171 You are asked to create an Out-of-process component that should enable thecommunication between an application and a database. Which of the followingcomponent types you will create?

    172 You are asked to create a .NET component that should have constructor to

    allow the developers to create instances of the component. Which of thefollowing types of the constructor you need to create?

    173 You are asked to create a composite control for a Windows-based application.Which of the following classes you need to use to inherit for creating thecomposite control?

  • 8/14/2019 semAmt2.xls

    29/70

    174 You are asked to create a Windows-based application that is implementingmultiple threading by using the System.Threading namespace. You need tocontrol the access to objects by granting a lock for an object to a single thread.Which of the following classes of the System.Threading namespace you needto use in your application?

    175 You are asked to create an application that should allow simultaneous

    execution of multiple tasks by using the various methods and events of theBackgroundWorker component. Which of the following methods you need touse to accomplish the desired task?

    176 Anthony is working as a developer in InfoSol Corp. He is asked to add a filetype to the deployment project. He decides to perform the following steps:1. Select the File Types on Target Machine node in the File Types editor.2. Select Action-->Add File Type to add a new file type. Type the name of thedocument type in the name text box.3. Select the newly created file type to associate extensions with the file type,

    Press the F4 key to open the Properties window.4. Select the Extensions property and specify the file extensions to beassociated with the file type.

    5. Select the Command property in the Properties window to associate the filetype with an executable file. The Select Item in Project dialog box opens6. Select the executable file to be associated with the file type.However, his manager informs him that the preceding steps will not give thedesired results. Do you agree?

    177 John is creating a deployment project. He is asked to search a specific file on

    the target machine by using the Launch Conditions editor. He decides toperform the following steps:1. Select the Requirements on Target Machine node in the Launch Conditionseditor.

    2. Select Action-->Add File Launch Condition.3. Click the Search for File node, and press the F4 key to switch to theProperties window.4. Select the FileName property in the Properties window, and type the name ofthe file, which you want to search on the target computer.5. Select the Folder property, and specify the folders where the search for the

    file should start.6. Click the Condition node to display a customized error message, in case thefile does not exist.7. Press the F4 key to view the properties for the Condition node. In theMessage property, type the error message to be displayed if the file does notexist on the target computer.

    However, his manager informs him that the preceding steps are not correct. Doyou agree?

  • 8/14/2019 semAmt2.xls

    30/70

    178 John is working as a developer in Infosol Corp. He is asked to modify theapplication settings in the application configuration file to change the way theapplication runs. He is asked to change the URL where the assembly is stored.He decides to change the attribute of the element.However, his manager tells him that he is not required to make any changes inthe element. Do you agree?

    179 John is working as a developer in Infosol Inc. He is asked to create anapplication that should implement the role-based security. He uses theWindows Principal to implement the Windows-based security. He writes thefollowing code snippet in the application:................WindowsIdentity wId = WindowsIdentity.GetCurrent();WindowsPrincipal = wPr.WindowsPrincipal(wId);...............

    He gets the compile time error. Help him by providing the correct code snippet.

    180 You are working as a developer in InfoGain Inc. Your manager has asked youto create a Windows-based application which should have the custom settingsprovided by the configuration file. The application should be able to access atrun time. You are asked to create two custom settings 'setting1' and 'setting2'.Identify the correct code snippet that you need to add to the configuration file ofthe application.

  • 8/14/2019 semAmt2.xls

    31/70

    181 You are working as a developer in Infogain Corp. You are asked to create anapplication that uses a specified version of the assembly, which is 1.0.0.0, atrun time. However, the application needs to be redirected to run against anewer version, which is 2.0.0.0, of the assembly. In addition, the garbagecollection should run concurrently on the same thread as that of the application.You need to make the necessary changes in the configuration file to

    accomplish the desired task. Identify the code snippet that you need to add tothe configuration file.

  • 8/14/2019 semAmt2.xls

    32/70

    182 You are working as a developer in Infogain Corp. You are asked to create anapplication that should have implemented the Windows Installer launchcondition. Identify the correct steps that you need to perform to add a WindowsInstaller launch condition.

  • 8/14/2019 semAmt2.xls

    33/70

    183 You are working as a developer in InfoSol Inc. You are asked to create adeployment project that should include the File Types Editor to enable theusers to add or remove files. Identify the steps that you need to perform toinclude the file type to the deployment project.

  • 8/14/2019 semAmt2.xls

    34/70

    184 You are working as a developer in Infosol Inc. You are part of the team that isdeveloping a deployment project for the application that is created by the team.You are asked to set the environment variable named PATH on each targetmachine on which your application will execute. Identify the steps that you needto perform to accomplish the desired task.

    185 Programs and libraries for .NET are packaged into units called ________.

    186 Which of the following commands is required to create a strong-named keypair and store it in a file using the sn.exe utility?

    187 Which of the following options can be used with the gacutil command toregister the assembly to the GAC?

    188 Using the Visual Studio .NET deployment tools, you can deploy the applicationsthat cannot be deployed by using the ______ command.

    189 Which of the following registry keys stores information about file extensionsand their association with executable files?

    190 The Custom Actions editor contains ___________ sections.

    191 Which of the following elements is the root element of every configuration fileused by the CLR and .NET Framework applications?

    192 Which of the following section handlers of the .NET Framework returns a key-

    value pair configuration setting?

    193 Which of the following permission sets is the default permission set for all codethat runs from an unknown location or origin?

    194 ___________ is the procedure of finding whether a user has rights to perform aspecific action or not.

    195 You are asked to create an assembly by using the Visual Studio .NET IDE forVC#. Identify the type of assembly that you can create.

  • 8/14/2019 semAmt2.xls

    35/70

    196 You are provided with the version number of an assembly, 6.4.0.3. Identify theminor version number.

    197 You are asked to create the deployment project. You need to add the .exe and.dll files to the deployment project. Which of the following editors you need touse to accomplish the desired task?

    198 You are asked to put the settings, of the third-party component used by both

    the client application and server application, at one place. In which of thefollowing files, you will put the information about the component?

    199 You are asked to access configuration settings from the application. Which ofthe following methods you need to use to accomplish the desired task?

    200 John is working as an application developer in Infosol Inc. He is creating adeployment project. He is asked to add a sub folder to the deployment projectwith the help of the File System editor. He performs the following steps to addthe sub folder:

    1. Select a folder in the File System editor.2. Select Action-->Add Special Folder-->Custom Folder.3. Type the name of the newly created subfolder.

    However, he finds that the desired folder is not created. Help him to identify theerror he made.

  • 8/14/2019 semAmt2.xls

    36/70

    1, Convert.ToInt32 2, convert.ToInt32 3, Parse.ToInt32 4, Convert.ToInt 1

    1, ER 2, Network 3, Hierarchical 4, Relational 1

    1, Independent entity 2, Dependent entity 3, Weak entity 4, Subentity 1

    1, One-to-ManyRelationship

    2, Many-to-Onerelationship

    3, Many-to-ManyRelationship

    4, One-to-Onerelationship

    3

    1, PROJECT 2, UNION 3, DIVIDE 4, RESTRICT 4

    1, Entities: Smith,teamRelationship: manage

    2, Entities: SmithRelationship: manageand evaluate

    3, Entities: Smith,teamRelationship:evaluate

    4, Entities: Smith,teamRelationship: manageand evaluate

    4

    1, One-to-OneRelationship

    2, Many-to-OneRelationship

    3, One-to-ManyRelationship

    4, Many-to-ManyRelationship

    4

    1, one 2, two 3, three 4, four 31, Date of joining(19Aug, 2008),Employee_ID(N0065),

    andDesignation(SeniorSoftware Engineer).

    2,Employee_ID(N0065)and

    Designation(SeniorSoftware Engineer).

    3, Date of joining(19Aug, 2008) andEmployee_ID(N0065)

    4, Employee_ID(N0065)

    1

    1, Hierarchical model 2, Conceptual model 3, Relational model 4, ER Model 3

    1, Join 2, Intersect 3, Union 4, Product 1

    1, one-to-one 2, one-to-many 3, many-to-many 4, unnamed 4

    1, Normalization 2, Renormalization 3, FunctionalDependency

    4, Specialization 1

    1, first 2, second 3, third 4, Boyce-Codd 1

  • 8/14/2019 semAmt2.xls

    37/70

    1, BCNF 2, First normal form 3, Second normalform

    4, Third normal form 2

    1, Student Name 2, Student RollNumber

    3, Student Address 4, Student Fathers'Name

    2

    1, A table is said to bein second normal

    form if Boyce-Coddnormal form is appliedto it.

    2, A table is said tobe in second normal

    form when everyattribute in a row isnot functionally

    dependent on anyparticular key.

    3,A table is said to bein second normal

    form, when everyattribute in a row isdependent on just

    part of the whole key.

    4, A table is said to bein second normal

    form, when everyattribute in a row isfunctionally

    dependent upon thewhole key, and notjust part of the key.

    4

    1, first 2,fourth 3, third 4, Boyce-Codd 3

    1, Normalization 2, Denormalization 3,Generalization 4, Specialization 21, 1NF 2, 2NF 3, 3NF 4, BCNF 4

    1, Account Detailsand Saving AccountDetails

    2, Account Details ,Current AccountDetails ,and SavingAccount Details

    3, Salary AccountDetails , CurrentAccount Details ,andSaving Account

    Details

    4, Account Details,Salary AccountDetails , CurrentAccount Details ,and

    Saving AccountDetails

    4

    1, Project 2, Divide 3, Join 4, Union 4

    1, Relational 2, Hierarchical 3, Network 4, ER 1

    1, denormalization 2, normalization 3, generalization 4, specialization 41, Each table should

    have an identifier.

    2, Each table should

    store data for a singletype of entity.

    3, There should be

    atleast one columnthat accepts a NULLvalue.

    4, The repetition of

    values or columnsshould be avoided.

    3

  • 8/14/2019 semAmt2.xls

    38/70

    1, It identifies itsowner entity.

    2, It refers to anotherentity.

    3, It simplifies thedescription of anentity.

    4, It cannot refer toanother entity.

    4

    1, Employee Name 2, Designation Code 3, Email ID 4, Phone Number 2

    1, Cardinality 2, Tuple 3, Relation 4, Degree 3

    1, Employee ID+Account Number

    2, Employee ID +Department ID+Account Number

    3, Employee ID+Department ID +Designation ID

    4, Employee ID+Department ID +Designation ID+Account Number

    1

    1, First Normal Form 2, Second NormalForm

    3, Fourth NormalForm

    4, Boyce-CoddNormal Form

    2

    1, 1NF 2, 2NF 3, 3NF 4, BCNF 3

    1, who 2, talk 3, pine 4, elm 2

    1, Ctrl + C keys 2, Ctrl + X keys 3, Ctrl + S keys 4, Ctrl + N keys 1

    1, 1. Identify the userwith whom she needsto communicate.2. Check whether theuser is online and

    ready to receivemessages.3. Identify themechanism forcommunication.4. Identify the

    contents of themessage.

    2, 1. Identify the userwith whom she needsto communicate.2. Identify themechanism for

    communication.3. Check whether theuser is online andready to receivemessages.4. Identify the

    contents of themessage.

    3, 1. Identify themechanism forcommunication.2. Identify the userwith whom she needs

    to communicate.3. Check whether theuser is online andready to receivemessages.4. Identify the

    contents of themessage.

    4, 1. Identify thecontents of themessage.2. Identify the userwith whom she needs

    to communicate.3. Check whether theuser is online andready to receivemessages.4. Identify the

    mechanism forcommunication.

    1

  • 8/14/2019 semAmt2.xls

    39/70

    1, who -t 2, who -T 3, who -h 4, who -H 2

    1, pine 2, elm 3, mail 4, sendmail 4

    1, MUA deciphers therecipient's addressand delivers the mail

    to the recipient'smailbox.

    2, MUA manages thesending and receivingof mails.

    3, MUA displays afailure message ifthere is any problem

    in delivering the mail.

    4, MUA is used toread the message atthe recipient's end.

    4

    1, 1. Type pine at the

    shell prompt, andpress Enter.2. Press C.3. Select the relevantmail by using the upand down-arrowkeys.4. Press Enter.

    2, 1. Type pine at the

    shell prompt, andpress Enter.2. Press A.3. Select the relevantmail by using the upand down-arrowkeys.4. Press Enter.

    3, 1. Type pine at the

    shell prompt, andpress Enter.2. Press L.3. Select the relevantmail by using the upand down-arrowkeys.4. Press Enter.

    4, 1. Type pine at the

    shell prompt, andpress Enter.2. Press I.3. Select the relevantmail by using the upand down-arrowkeys.4. Press Enter.

    3

    1, Yes, Julia has

    pressed the correctkey.

    2, No, Julia needs to

    press the L key.

    3, No, Julia needs to

    press the F key.

    4, No, Julia needs to

    press the I key.

    2

    1, S 2, C 3, O 4, P 1

    1, By checking thecontents of the sentfolder.

    2, By checking thecontents of theFolders list.

    3, By checking thecontents of the sent-mail folder.

    4, By checking thecontents of the Inbox.

    3

    1, 1. Press the Mkey.

    2. Select the FoldersList option, and pressEnter.3. Select the sent-mailoption from theFolders List by using

    the Tab key, andpress Enter.

    2, 1. Select theFolders List option,

    and press Enter.2. Press the M key.3. Select the sent-mail option from theFolders List by usingthe Tab key, and

    press Enter.

    3, 1. Select theFolders List option,

    and press Enter.2. Select the sent-mail option from theFolders List by usingthe Tab key, andpress Enter.

    3. Press the M key.

    4, 1. Select the sent-mail option from the

    Folders List by usingthe Tab key, andpress Enter.2. Press the M key.3. Select the FoldersList option, and press

    Enter.

    1

  • 8/14/2019 semAmt2.xls

    40/70

    1, At step 6, the Ctrland O keys should bepressed to send the E-mail.

    2, At step 6, the Ctrland J keys should bepressed to send the E-mail.

    3, At step 6, the Ctrland S keys should bepressed to send the E-mail.

    4, At step 6, the Ctrland X keys should bepressed to send the E-mail.

    4

    1, A file name shouldbe unique within adirectory.

    2, A file name canhave maximum of286 characters.

    3, A file name cancontain digits, letters,and specialcharacters except

    backslash.

    4, A file name shouldtypically reflect thecontents of a file.

    2

    1, i 2, w 3, v 4, s 1

    1, 1. Press the Esckey.2. Type :w/home/Complaints/myfile.txt, and pressEnter.3. Type :q, and pressEnter.

    2, 1. Press the Esckey.2. Type :w/home/Complaints/myfile.txt, and pressEnter.3. Type :c, and pressEnter.

    3, 1. Press the Esckey.2. Type :s/home/Complaints/myfile.txt, and pressEnter.3. Type :c, and pressEnter.

    4, 1. Press the Ckey.2. Type :w/home/Complaints/myfile.txt, and pressEnter.3. Type :c, and pressEnter.

    1

    1, i 2, a 3, R 4, r 4

    1, You need to pressthe j command to

    move to the third line.

    2, You need to pressthe h command to

    move to the third line.

    3, You need to pressthe l command to

    move to the third line.

    4, You need to pressthe o command to

    move to the third line.

    1

    1, ls 2, ls bill 3, ls /bill 4, ls /home 1

    1, cp/home/math/math00[1*3].2009/home/backup

    2, cp/home/math/math00[1?3].2009/home/backup

    3, cp /home/backup/home/math/math00[13].2009

    4, cp/home/math/math00[1-3].2009/home/backup

    4

    1, Yes, the givencommand will renamethe file.

    2, No, the correctcommand is:mv/home/mydir/myfile00

    1.txt/home/mydir/myfile002.txt

    3, No, the correctcommand is:rm myfile001.txtmyfile002.txt

    4, No, the correctcommand is:cp/home/mydir/myfile00

    1.txt/home/mydir/myfile002.txt

    2

  • 8/14/2019 semAmt2.xls

    41/70

    1, Client tier 2, Server tier 3, Business tier 4, Database tier 3

    1, Service Broker 2, Full-text Search 3, Replication 4, NotificationServices

    1

    1, Automatic memorymanagement

    2, Support for Webservices

    3, Standard typesystem

    4, Languageinteroperability

    2

    1, Service-orientedarchitecture

    2, Scalability 3, CLR integration 4, Support for datamigration and

    analysis

    3

    1, Data ManipulationLanguage

    2, Data ControlLanguage

    3, Data QueryLanguage

    4, Data DefinitionLanguage

    4

    1, floor 2, power 3, radians 4, Abs 1

    1, SELECT LoginID,convert(char,BirthDate) AS 'Birth Date'FROMHumanResources.Employee

    2,SELECT LoginID,convert(char,BirthDate,2) AS 'Birth Date'FROMHumanResources.Employee

    3, SELECT LoginID,convert(char(2),BirthDate) AS 'Birth Date'FROMHumanResources.Employee

    4, SELECT LoginID,convert(BirthDate(2),char(6)) AS 'BirthDate' FROMHumanResources.Employee

    2

    1, COMPUTE 2, GROUP BY 3, COMPUTE BY 4, PIVOT 1

    1, inner 2, outer 3, cross 4, equi 2

    1, >ALL 2, >ANY 3, =ANY 4, ALL 1

    1, SELECT EmpID'Employee ID',EmpTitle 'Designation'

    FROMHumanResources.Employee

    2, SELECT'Employee ID' EmpID,'Designation'

    EmpTitle FROMHumanResources.Employee

    3, SELECT EmpID ='Employee ID',EmpTitle =

    'Designation' FROMHumanResources.Employee

    4, SELECT'Employee ID' ASEmpID, 'Designation'

    AS EmpTitle FROMHumanResources.Employee

    1

    1, SELECTEmployeeID, Title,

    TotalLeaves FROMHumanResources.Employee WHERETotalLeaves > 20

    2, SELECTEmployeeID, Title,

    TotalLeaves FROMHumanResources.Employee WHERETotalLeaves != 20

    3, SELECTEmployeeID, Title,

    TotalLeaves FROMHumanResources.Employee WHERETotalLeaves < 20

    4, SELECTEmployeeID, Title,

    TotalLeaves FROMHumanResources.Employee WHERETotalLeaves

  • 8/14/2019 semAmt2.xls

    42/70

    1, SELECTupper(Name),DepartmentID,GroupName FROMHumanResources.Department

    2, SELECT'Department Name'=Name, DepartmentID,GroupName FROMHumanResources.Department

    3, SELECT'Department Name'=patindex(Name),DepartmentID,GroupName FROMHumanResources.De

    partment

    4, SELECT'Department Name'=upper(Name),DepartmentID,GroupName FROMHumanResources.De

    partment

    4

    1, SELECT ProductId,ListPrice, rank()OVER(ORDER BYListPrice desc) ASrankFROMProduction.Product

    2, SELECTProductId, ListPrice,dense_rank()OVER(ORDER BYListPrice desc)ASrankFROM

    Production.Product

    3, SELECTProductId, ListPrice,row_number()OVER(ORDER BYListPrice asc) ASrankFROM

    Production.Product

    4, SELECT ProductId,ListPrice, rank()OVER(ORDER BYListPrice asc) AS rank

    FROMProduction.Product

    2

    1, SELECTe.EmployeeID,

    d.Name FROMHumanResources.Department dJOINHumanResources.EmployeeDepartmentHistory eON e.DepartmentID =d.DepartmentID

    2, SELECTe.EmployeeID,

    d.Name FROMHumanResources.Department d OUTERJOINHumanResources.EmployeeDepartmentHistory eON e.DepartmentID =d.DepartmentID

    3, SELECTe.EmployeeID,

    d.Name FROMHumanResources.Department dEQUI JOINHumanResources.EmployeeDepartmentHistory eON e.DepartmentID =d.DepartmentID

    4, SELECTe.EmployeeID,

    d.Name FROMHumanResources.Department d CROSSJOINHumanResources.EmployeeDepartmentHistory eON e.DepartmentID =d.DepartmentID

    1

    1, SELECT datepart(yy, HireDate) AS'Age'FROM

    HumanResources.Employee

    2, SELECT datediff(yy, HireDate,getdate()) AS 'Age'FROM

    HumanResources.Employee

    3, SELECT dateadd(yy, HireDate,getdate()) AS 'Age'FROM

    HumanResources.Employee

    4, SELECT day(HireDate) AS 'Age'FROMHumanResources.Em

    ployee

    2

    1, SELECT

    EmployeeID FROMHumanResources.EmployeeAddressWHERE AddressIDIN (SELECTAddressID FROM

    Person.AddressWHERE City ='Bothell')

    2, SELECT

    EmployeeID FROMHumanResources.EmployeeAddressWHERE AddressIDEXISTS (SELECTAddressID FROM

    Person.AddressWHERE City ='Bothell')

    3, SELECT

    AddressID FROMPerson.AddressWHERE City ='Bothell'

    4, SELECT

    EmployeeID FROMHumanResources.EmployeeAddress eJOIN Person.Addressa ONe.AddressID=a.Addre

    ssID

    1

  • 8/14/2019 semAmt2.xls

    43/70

    1, Yes, the query willdisplay the requiredreport.

    2, No, the correctquery is:SELECTEmployeeID, Title,SickLeaveHoursFROM

    HumanResources.EmployeeWHERESickLeaveHours>ALL (SELECTSickLeaveHoursFROMHumanResources.Employee WHERE

    Title ='Stocker')

    3, No, the correctquery is:SELECTEmployeeID, Title,SickLeaveHoursFROM

    HumanResources.EmployeeWHERESickLeaveHoursALL (SELECTSickLeaveHoursFROMHumanResources.Employee WHERE

    Title ='Stocker')

    4, No, the correctquery is:SELECTEmployeeID, Title,SickLeaveHoursFROM

    HumanResources.EmployeeWHERESickLeaveHours=ANY (SELECTSickLeaveHoursFROMHumanResources.Employee WHERE Title

    ='Stocker')

    2

    1, Yes, the query willdisplay the required

    report.

    2, No, the correctquery is:

    SELECT EmployeeIdFROMHumanResources.Employee WHERESickLeaveHours >(SELECTAVG(SickLeaveHours) FROMHumanResources.E

    mployee WHERETitle = 'NetworkAdministrator')

    3, No, the correctquery is:

    SELECT EmployeeIdFROMHumanResources.Employee WHEREAvg(SickLeaveHours)> (SELECTSickLeaveHoursFROMHumanResources.E

    mployee WHERETitle = 'NetworkAdministrator')

    4, No, the correctquery is:

    SELECT EmployeeIdFROMHumanResources.Employee WHERESickLeaveHours =(SELECTSickLeaveHoursFROMHumanResources.Em

    ployee WHERE Title= 'NetworkAdministrator')

    2

    1, Yes, the query will

    display the requiredreport.

    2, No, the correct

    query is:SELECT Title,'Average Sick LeaveHours' =avg(SickLeaveHours)FROM

    HumanResources.Employee WHERESickLeaveHours > 20ANDavg(SickLeaveHours)>35

    3, No, the correct

    query is:SELECT Title,'Average Sick LeaveHours' =avg(SickLeaveHours)FROM

    HumanResources.Employee WHEREavg(SickLeaveHours)>55

    4, No, the correct

    query is:SELECT Title,'Average Sick LeaveHours' =avg(SickLeaveHours)FROM

    HumanResources.Employee WHERESickLeaveHours > 20GROUP BY TitleHAVINGavg(SickLeaveHours)

    >35

    4

    1, master 2, model 3, msdb 4, Resource 2

    1, .mdf 2, .ndf 3, .ldf 4, .sql 1

    1, sp_name 2, sp_helpdb 3, sp_rename 4, sp_renamedb 4

    1, DROP DATABASE 2, DELETEDATABASE

    3, ALTERDATABASE

    4, DROP DB 1

  • 8/14/2019 semAmt2.xls

    44/70

    1, query 2, value 3, modify 4, exist 3

    1, Foreign Key 2, Check 3, Unique 4, Default 2

    1, ALTER TABLE 2, DROP TABLE 3, CREATE TABLE 4, TRUNCATETABLE

    1

    1, UPDATE 2, ALTER 3, INSERT 4, SELECT 1

    1, Parse the XML

    document

    2, Retrieve a rowset

    from the tree

    3, Delete the data

    from the rowset

    4, Clear the memory 3

    1, RAW 2, AUTO 3, PATH 4, EXPLICIT 2

    1, CREATE TABLEOrders

    (OrderID int NOT

    NULL,OrderDate

    datetime,OrderPrice int

    )

    2, CREATE TABLEOrders

    (OrderID int NOT

    NULL,OrderDate

    datetime,OrderPrice int,

    )

    3, CREATE TABLEOrders

    (OrderID int,

    OrderDatedatetime,

    OrderPrice int)

    4, CREATE TABLEOrders

    (OrderID int NULL,OrderDate

    datetime,

    OrderPrice int)

    1

    1, Create PartitionTableEmpPayDetails

    (EmployeeID int,RateChangeDatedatetime,Rate money,PayFrequency

    tinyint,ModifiedDatedatetime)ON

    RateChngDate(RateChangeDate)

    2, Create TableEmpPayDetails(

    EmployeeID int,RateChangeDatedatetime,Rate money,PayFrequencytinyint,

    ModifiedDatedatetime)ONRateChngDate(RateC

    hangeDate)

    3, Create TableEmpPayDetails(

    EmployeeID int,RateChangeDatedatetime,Rate money,PayFrequencytinyint,

    ModifiedDatedatetime)ON RateChngDate

    4, Create TableEmpPayDetails(

    EmployeeID int,RateChangeDatedatetime,Rate money,PayFrequencytinyint,

    ModifiedDatedatetime)ONRateChangeDate(Rat

    eChngDate)

    2

  • 8/14/2019 semAmt2.xls

    45/70

    1, INSERT Address(AddressID,AddressLine1,AddressLine2,StateProvinceID,PostalCode)

    VALUES (104, '24,Herbon Apts',' ArthorLane', 56, '607009')

    2, INSERT INTOAddress (104, '24,Herbon Apts',' ArthorLane', 56, '607009')

    3, INSERT VALUES(104, '24, HerbonApts',' Arthor Lane',56, '607009')

    4, INSERT AddressVALUE (104, '24,Herbon Apts',' ArthorLane', 56, '607009')

    1

    1, 1. Parse the XMLdocument.2. Store the data fromthe rowset.3. Retrieve a rowset

    from the tree.4. Clear the memory.

    2, 1. Store the datafrom the rowset.2. Parse the XMLdocument.3. Clear the

    memory.4. Retrieve a rowsetfrom the tree.

    3, 1. Parse the XMLdocument.2. Retrieve a rowsetfrom the tree.3. Store the data from

    the rowset.4. Clear the memory.

    4, 1. Clear thememory.2. Store the data fromthe rowset.3. Parse the XML

    document.4. Retrieve a rowsetfrom the tree.

    3

    1,

    2, 11209adventure-works\guy1Production

    Technician -WC60

    21030adventure-works\kevin0MarketingAssistant

    3,

    4, 11209adventure-works\guy1Production

    Technician -WC60

    21030adventure-works\kevin0MarketingAssistant

    1

    1, 1 2, 2 3, 4 4, 249 11, IF...ELSE 2, CASE 3, WHILE 4, FOREACH 3

    1, text 2, ntext 3, cursor 4, float 4

    1, After Triggers 2, Instead of Triggers 3, Nested Triggers 4, Recursive Triggers 1

    1, Lost updates 2, Uncommitteddependency

    3, Inconsistentanalysis

    4, Phantom reads 1

  • 8/14/2019 semAmt2.xls

    46/70

    1, PAD_INDEX 2, FILLFACTOR 3, ONLINE 4, DROP_EXISTING 2

    1, XML indexes can

    be created only onXML columns.

    2, XML indexes only

    support indexing asingle XML column.

    3,XML indexes can

    only be added totables, views, table-valued variables withXML columns or XMLvariables.

    4, XML indexes

    created on a table donot allow you tomodify the primarykey.

    3

    1, When a batch issubmitted to the SQLServer, it is compiledto create an execution

    plan.

    2, If any compilationerror occurs, none ofthe statements in thebatch is executed.

    3, You can use theEXECUTE statementin a batch when it isnot the first statement

    of the batch.

    4, You can define anduse the CHECKconstraint in the samebatch.

    4

    1, Transaction 2, Batch 3, Trigger 4, Stored Procedure 1

    1, SETLOCK_TIMEOUT5000

    2, SETLOCK_TIMEOUT 500

    3, SETLOCK_TIMEOUT 50

    4, SETLOCK_TIMEOUT 5

    1

    1, 1. Enable the full-

    text search in thedatabase.2. Create a full-textcatalog.

    3. Create a uniqueindex.4. Create a full-textindex.5. Populate the full-text index.

    2, 1. Enable the full-

    text search in thedatabase.2. Create a uniqueindex.

    3. Create a full-textcatalog.4. Create a full-textindex.5. Populate the full-text index.

    3, 1. Create a full-text

    catalog.2. Enable the full-textsearch in thedatabase.

    3. Create a uniqueindex.4. Create a full-textindex.5. Populate the full-text index.

    4, 1. Create a full-text

    index.2. Create a full-textcatalog.3. Enable the full-text

    search in thedatabase.4. Create a uniqueindex.5. Populate the full-text index.

    1

  • 8/14/2019 semAmt2.xls

    47/70

    1, CREATE VIEWHumanResources.vwEmployeeDepDataWITHSCHEMABINDINGAS

    SELECTe.EmployeeID,MaritalStatus,DepartmentIDFROMHumanResources.Employee e JOINHumanResources.EmployeeDepartmentHist

    ory dON e.EmployeeID =d.EmployeeID

    2, ALTER VIEWHumanResources.vwEmployeeDepDataWITHSCHEMABINDINGAS

    SELECTe.EmployeeID,MaritalStatus,DepartmentIDFROMHumanResources.Employee e JOINHumanResources.EmployeeDepartmentH

    istory dON e.EmployeeID =d.EmployeeID

    3, ALTER VIEWHumanResources.vwEmployeeDepDataWITH SCHEMAASSELECT

    e.EmployeeID,MaritalStatus,DepartmentIDFROMHumanResources.Employee e JOINHumanResources.EmployeeDepartmentHistory d

    ON e.EmployeeID =d.EmployeeID

    4, SELECT VIEWHumanResources.vwEmployeeDepDataWITHSCHEMABINDINGAS

    SELECTe.EmployeeID,MaritalStatus,DepartmentIDFROMHumanResources.Employee e JOINHumanResources.EmployeeDepartmentHis

    tory dON e.EmployeeID =d.EmployeeID

    2

    1, BEGIN TRYINSERT INTOHumanResources.CustomerVALUES ('C001',1979, 'robertl', 16,'M')END TRYBEGIN CATCH

    SELECT 'There wasan error! ' +ERROR_MESSAGE()AS ErrorMessage,

    ERROR_LINE() ASErrorLineEND CATCHGO

    2, BEGIN TRYINSERT INTOHumanResources.CustomerVALUES ('C001',1979, 'robertl', 16,'M')END TRYBEGIN CATCH

    SELECT 'There wasan error! ' +ERROR_MESSAGE()AS ErrorMessage,

    ERROR_NUMBER()AS ErrorLineEND CATCHGO

    3, BEGIN TRYINSERT INTOHumanResources.CustomerVALUES ('C001',1979, 'robertl', 16,'M')END TRYBEGIN CATCH

    SELECT 'There wasan error! ' + ERROR()AS ErrorMessage,ERROR_NUMBER()

    AS ErrorLineEND CATCHGO

    4, BEGIN TRYINSERT INTOHumanResources.CustomerVALUES ('C001',1979, 'robertl', 16,'M')END TRYBEGIN CATCH

    SELECT 'There wasan error! ' + ERROR()AS ErrorMessage,ERROR_LINE() AS

    ErrorLineEND CATCHGO

    1

  • 8/14/2019 semAmt2.xls

    48/70

    1, CREATEPROCEDUREprcDisplayEmployeeStatus @EmpId intASBEGIN

    DECLARE@DepNamechar(50)DECLARE @ShiftIdintDECLARE@ReturnValue intEXEC @ReturnValue=

    prcGetEmployeeDetail @EmpId,@DepName

    OUTPUT, @ShiftIdOUTPUTIF (@ReturnValue =0)BEGINPRINT 'The details ofan employee with ID: '+ convert(char(10),@EmpId)

    PRINT 'DepartmentName: ' +@DepNamePRINT 'Shift ID: ' +

    convert( char(1),

    2, CREATEPROCEDUREprcDisplayEmployeeStatus @EmpId intASBEGIN

    DECLARE@DepNameDECLARE @ShiftId

    DECLARE@ReturnValueEXEC @ReturnValue=prcGetEmployeeDetai

    l @EmpId,@DepNameOUTPUT, @ShiftId

    OUTPUTIF (@ReturnValue =0)BEGINPRINT 'The details ofan employee with ID: '+ convert(char(10),@EmpId)PRINT 'Department

    Name: ' +@DepNamePRINT 'Shift ID: ' +convert( char(1),

    @ShiftId)

    3, CREATEPROCEDUREprcDisplayEmployeeStatus @EmpId intBEGINDECLARE

    @DepNamechar(50)DECLARE @ShiftIdintDECLARE@ReturnValue intEXEC @ReturnValue=prcGetEmployeeDetai

    l @EmpId,@DepNameOUTPUT, @ShiftId

    OUTPUTIF (@ReturnValue =0)BEGINPRINT 'The details ofan employee with ID: '+ convert(char(10),@EmpId)PRINT 'Department

    Name: ' +@DepNamePRINT 'Shift ID: ' +convert( char(1),

    @ShiftId)

    4, CREATEPROCEDUREprcDisplayEmployeeStatus @EmpId intASBEGIN

    DECLARE@DepNamechar(50)DECLARE @ShiftIdintEXEC @ReturnValue=prcGetEmployeeDetail @EmpId,

    @DepNameOUTPUT, @ShiftIdOUTPUT

    IF (@ReturnValue =0)BEGINPRINT 'The details ofan employee with ID: '+ convert(char(10),@EmpId)PRINT 'DepartmentName: ' +

    @DepNamePRINT 'Shift ID: ' +convert( char(1),@ShiftId)

    END

    1

    1, CREATETRIGGER[HumanResources].[trgMagic] ON[HumanResources].[EmployeeDepartmentHistory]OF UPDATE ASBEGINSELECT * FROM

    Deleted

    SELECT * FROMInsertedEND;

    2, CREATETRIGGER[HumanResources].[trgMagic] ON[HumanResources].[EmployeeDepartmentHistory]FOR UPDATE ASBEGINSELECT * FROM

    Deleted

    SELECT * FROMInsertedEND;

    3, CREATETRIGGER[HumanResources].[trgMagic] ON[HumanResources].[EmployeeDepartmentHistory]AFTER UPDATEASBEGIN

    SELECT * FROM

    DeletedSELECT * FROMInsertedEND;

    4, CREATETRIGGER[HumanResources].[trgMagic] ON[HumanResources].[EmployeeDepartmentHistory]INSTEAD OFUPDATE ASBEGIN

    SELECT * FROM

    DeletedSELECT * FROMInsertedEND;

    3

    1, Web service 2, Service-OrientedArchitecture

    3, HTTP 4, Personal DesktopAssistant

    1

    1, Web service 2, Service-OrientedArchitecture

    3, HTTP 4, SOAP 2

  • 8/14/2019 semAmt2.xls

    49/70

    1, SOAP 2, WSDL 3, UDDI 4, HTTP 4

    1, Message 2, Service 3, Contract 4, Queue 2

    1, Managed databaseobjects

    2, Transaction 3, Stored procedure 4, Trigger 1

    1, ALTERDATABASEAdventureWorksENABLE_BROKER

    2, ALTERAdventureWorksENABLE_BROKER

    3, ALTERDATABASEAdventureWorksENABLE_SERVICE_BROKER

    4, ALTERDATABASEAdventureWorksENABLE_SERVICEBROKER

    1

    1,CREATE

    MESSAGE TYPEmyMessageVALIDATION =

    WELL_FORMED_XML

    2, CREATE

    MESSAGE TYPEmyMessage

    3, CREATE

    MESSAGE TYPEmyMessageVALIDATION =

    VALID_XML WITHSCHEMACOLLECTION

    4, CREATE

    MESSAGE TYPEmyMessageVALIDATION =

    EMPTY

    2

    1, MessageType 2, Contract 3, Service 4, Queue 2

    1, sp_configureCLR_ENABLED, 1;

    GORECONFIGURE;GO

    2, sp_configure CLRENABLED, 1;

    GORECONFIGURE;GO

    3, sp_configureCLR_ENABLE, 1;

    GORECONFIGURE;GO

    4, sp_configureENABLE_CLR, 1;

    GORECONFIGURE;GO

    1

    1, CREATEASSEMBLYCLRIntegrationFROM'C:\CLRIntegration.dll'WITH

    PERMISSION_SET =ANY

    2, CREATEASSEMBLYCLRIntegrationFROM'C:\CLRIntegration.dll'WITH

    PERMISSION_SET =EXTERNAL_ACCESS

    3, CREATEASSEMBLYCLRIntegrationFROM'C:\CLRIntegration.dll'WITH

    PERMISSION_SET =UNSAFE

    4, CREATEASSEMBLYCLRIntegrationFROM'C:\CLRIntegration.dll'WITH

    PERMISSION_SET =EXTERNAL

    3

  • 8/14/2019 semAmt2.xls

    50/70

    1, CREATECONTRACTsendContract(sendMessage BYINITIATOR

    );

    2, CREATECONTRACTsendContract(sendMessage SENTBY INITIATOR

    ONLY);

    3, CREATECONTRACTsendContract(sendMessage SENTBY ANY

    );

    4, CREATECONTRACTsendContract(sendMessage SENTBY INITIATOR

    );

    4

    1, T-SQL 2, XML file 3, CLR integration 4, Functions 3

    1, This error occurswhen the port 8080 isbeing used by some

    other service and isnot free to host anyother service. Toresolve the error, youneed to use thefollowing statement:PORTS = ( CLEAR ),Clear_Port = 8080,SITE = 'localhost' )

    2, This error occurswhen theauthentication type

    used isINTEGRATED. Toresolve the error, youneed to use thefollowing statement:AUTHENTICATION =(BASIC)

    3, This error occurswhen an inline XSDschema will be

    returned for thecurrent Web methodin the SOAPresponses. Toresolve the error, youneed to use thefollowing statement:SCHEMA= NONE

    4, This error occurswhen the WSDLdocument generation

    is not supported forthis endpoint. Toresolve the error, youneed to use thefollowing statement:WSDL = NONE

    1

  • 8/14/2019 semAmt2.xls

    51/70

    1, CREATE SERVICEsendServiceON QUEUE[dbo].[sendQueue](sendContract)

    2, CREATESERVICEsendServiceON QUEUE[dbo].[sendQueue]CONTRACT

    (sendContract)

    3, CREATESERVICEsendServiceON QUEUE[dbo].[sendQueue]

    4, CREATE SERVICEsendServiceON CONTRACT(sendContract)[dbo].[sendQueue]

    1

    1, There is no error inthe code andmanaged stored

    procedure will becreated successfully.

    2, No, the correctstatement to createthe managed stored

    procedure is:

    CREATE

    PROCEDURE clrprocAS EXTERNALNAMECLRStoredProcedure.XMLProc.convXml

    3, No, the correctstatement to createthe managed stored

    procedure is:

    CREATE

    PROCEDURE clrprocAS EXTERNALNAMEConvertXML.XMLProc.convXml

    4, No, the correctstatement to createthe managed stored

    procedure is:

    CREATE

    PROCEDURE clrprocAS EXTERNALNAMEConvertXMLAssembly.[CLRStoredProcedure.XMLProc].convXml

    4

  • 8/14/2019 semAmt2.xls

    52/70

    1, CREATEFUNCTIONSalaryCalculation(@EmpID asnVarchar(3))AS EXTERNAL

    NAMECalcSalAssembly.[EmployeePay.Pay].calcSalary

    2, CREATEFUNCTIONSalaryCalculationRETURNSnVarcharAS EXTERNAL

    NAMECalcSalAssembly.[EmployeePay.Pay].calcSalary

    3, CREATEFUNCTIONSalaryCalculation(@EmpID asnVarchar(3))RETURNS

    nVarchar(10)AS EXTERNALNAMECalcSal.[EmployeePay.Pay].calcSalary

    4, CREATEFUNCTIONSalaryCalculation(@EmpID asnVarchar(3))RETURNS

    nVarchar(10)AS EXTERNALNAMECalcSalAssembly.[EmployeePay.Pay].calcSalary

    4

    1, CREATETRIGGEREmailValidationOF INSERT ONUserNameAuditAS EXTERNALNAMEValidateEmailAssembly.trgMail.MailValid

    2, CREATETRIGGEREmailValidationON UserNameAuditFOR INSERTAS EXTERNALNAMEValidateEmailAssembly.trgMail.MailValid

    3, CREATETRIGGEREmailValidationFOR INSERT ONUserNameAuditAS EXTERNALNAMEValidateEmailAssembly.trgMail.MailValid

    4, CREATETRIGGEREmailValidationON UserNameAuditFOR INSERTAS EXTERNALNAMEValidateEmailAssembly.trgMail

    2

    1, CREATE QUEUEsendQueue WITHSTATUS = ON

    2, CREATE QUEUEsendQueue WITHSTATUS = OFFRETENTION = ON

    3, CREATE QUEUEsendQueue WITHACTIVATION = ON

    4, CREATE QUEUEsendQueue WITHACTIVATION = ONRETENTION = ON

    1

  • 8/14/2019 semAmt2.xls

    53/70

    1, DECLARE@dialog_handleUNIQUEIDENTIFIER;BEGIN DIALOGCONVERSATION

    @dialog_handleFROMSERVICE[sendMessage] TOSERVICE'receiveMessage' ONCONTRACT[sendContract];

    2, DECLARE@dialog_handle;BEGIN DIALOGCONVERSATION@dialog_handleFROM

    SERVICE[sendMessage] TOSERVICE'receiveMessage' ONCONTRACT[sendContract];

    3, DECLARE@dialog_handleUNIQUEIDENTIFIER;BEGIN DIALOGCONVERSATION

    @dialog_handleFROMSERVICE[sendMessage] TOSERVICE'receiveMessage' ON[sendContract]CONTRACT;

    4, DECLARE@dialog_handleUNIQUEIDENTIFIER;BEGINCONVERSATION

    @dialog_handleFROMSERVICE[sendMessage] TOSERVICE'receiveMessage' ONCONTRACT[sendContract];

    1

    1, SEND ON

    CONVERSATION@dialog_handle FORMESSAGE TYPE

    [sendMessage]('John')

    2, SEND ON

    CONVERSATION@dialog_handleMESSAGE TYPE

    [sendMessage]('John')

    3, SEND ON

    CONVERSATION@dialog_handleMESSAGE

    [sendMessage]('John')

    4, SEND ON

    CONVERSATION@dialog_handle FORMESSAGE

    [sendMessage]('John')

    2

    1, Common LanguageRuntime

    2, Windows Forms 3, .NET frameworkbase classes

    4, ASP.NET 1

    1, Size 2, StartPosition 3, WindowState 4, Text 3

    1, Deactivate 2, FormClosed 3, Click 4, Load 1

    1, Sorted 2, SelectionMode 3, SelectedIndex 4, SelectedItem 2

    1, LinkLabel Control 2, TextBox Control 3, ComboBox Control 4, ListBox Control 3

    1, DocumentTitle 2, Value 3, Text 4, Font 3

    1, Parse.ToInt32 2, DateTime.Parse 3, Convert.ToInt32 4,

    Convert.ToDateTime

    3

    1, ErrorProvider Class 2, MessageBox Class 3, ToolStrip Class 4, StatusStrip Class 2

    1, Select Debug-->Windows-->Breakpoints from the

    Menu bar.

    2, Select Window-->Error List from theMenu bar.

    3, Select Debug-->Exceptions from theMenu bar.

    4, Select View-->ErrorList from the Menubar.

    4

  • 8/14/2019 semAmt2.xls

    54/70

    1, ..........................................listBox1.Items.Add("Rice");listBox1.Items.Add("Flour");

    ...................................

    ...

    ..................................

    2, ..........................................listBox1.Add("Rice");listBox1.Add("Flour");

    ...................................

    ...

    ..................................

    3, ..........................................comboBox1.Items.Add("Rice");comboBox1.Items.Add("Flour");

    ...................................

    ...

    ..................................

    4, ..........................................comboBox1.Add("Rice");comboBox1.Add("Flour");

    ...................................

    ...

    ..................................

    1

    1, button1.Text ="Submit Details";

    2, button1.Name ="Submit Details";

    3, button1.Tag ="Submit Details";

    4, button1.TextAlign ="Submit Details";

    1

    1, public partial classForm1 : Form{

    int BillAmount; Button btn = newButton();

    public Form1(){

    InitializeComponent();

    btn.Click +=new

    EventHandler(btn_Click);

    }private void

    btn_Click(objectsender, EventArgs

    e) {

    Random rnd =new Random();

    int x =rnd.Next(5,35);

    MessageBox.Show("Congratulations!!!!!You get "+x+"%

    discount");}private void

    2, public partial classForm1 : Form{

    int BillAmount; Button btn = newButton();

    public Form1(){

    InitializeComponent();

    }

    private voidbtn_Click(objectsender, EventArgse) {

    Random rnd =

    new Random();int x =

    rnd.Next(5,35);

    MessageBox.Show("Congratulations!!!!!

    You get "+x+"%discount");

    }private void

    button1_Click(objectsender, EventArgse)

    3, public partial classForm1 : Form{

    int BillAmount;

    public Form1(){

    InitializeComponent();

    btn.Click +=

    newEventHandler(btn_Cli

    ck);}private void

    btn_Click(objectsender, EventArgse)

    {Random rnd =

    new Random();int x =

    rnd.Next(5,35);

    MessageBox.Show("Congratulations!!!!!You get "+x+"%discount");

    }private void

    button1_Click(object

    4, public partial classForm1 : Form{

    int BillAmount; Button btn = newButton();

    public Form1(){

    InitializeComponent();

    btn.Click +=new

    EventHandler(btn_Click);

    }private void

    btn_Click(objectsender, EventArgs

    e) {

    Random rnd =new Random();

    int x =rnd.Next(5,35);

    MessageBox.Show("Congratulations!!!!!You get "+x+"%

    discount");}private void

    4

  • 8/14/2019 semAmt2.xls

    55/70

    1, private voidtextBox1_Validating(object sender,CancelEventArgs e) {

    if(textBox1.Text.Length

  • 8/14/2019 semAmt2.xls

    56/70

    1, private voidBackground_Click(object sender, EventArgse) {

    ColorDialog

    colorDialog1 = newColorDialog();

    colorDialog1.ShowDialog();

    textBox1.BackColor =colorDialog1.Color;

    }

    private voidForeground_Click(obj

    ect sender, EventArgse) {

    ColorDialogcolorDialog2 = newCol