首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
You are the administrator of a SQL Server 2000 computer. One of the databases on the server contains a table named complaints. T
You are the administrator of a SQL Server 2000 computer. One of the databases on the server contains a table named complaints. T
admin
2009-05-19
37
问题
You are the administrator of a SQL Server 2000 computer. One of the databases on the server contains a table named complaints. This table is used to store information about customer complaints.
The customer service representatives in your company add and edit the information in the complaints table. They work with this table by using a number of client applications, including a web-based application and a Microsoft Windows 32-bit application.
The customer service manager discovers that some customer complaints are marked as closed before they are resolved to the customer’s satisfaction.
You need to notify the customer service manager whenever a complaint is marked as closed. You do not want to make any changes to the client applications.
What should you do?
选项
A、Create an UPDATE trigger that sends an e-mail message.
B、Create a stored procedure that sends an e-mail message. Use the stored procedures to make changes to the data.
C、Create a user-defined function that sends an e-mail message. Use the function to make changes to the data.
D、Create a rule that validates data entry. Bind the rule to the CompliantClosed column.
答案
A
解析
Explanation: Adding an appropriate UPDATE trigger that notifies the service manager whenever a complaint is marked is closed would accomplish the requirements. The client applications application would not have to be changed.
Note: In SQL Server 2000, triggers are a special type of stored procedure that fire automatically when an UPDATE, INSERT, or DELETE statement is issued against a table or view. Triggers are powerful tools that can be used to enforce business rules automatically when data is modified and can automate the processing for a company. Like stored procedures, triggers contain Transact-SQL statements which can include instructions to send an e-mail message when a particular column is updated
Incorrect Answers:
B: If a stored procedure is created and used the client application would have to be adjusted
accordingly. But we don’t want to make any changes in the client application.
Note: A stored procedure is a set of Transact-SQL statements compiled into a single execution plan and can return data as output parameters, which can return either data or a cursor variable; return codes, which are always an integer value; a result set for each SELECT statement contained in the stored procedure or any other stored procedures called by the stored procedure; or as a global cursor that can be referenced outside the stored procedure.
Stored procedures assist in achieving a consistent implementation of logic across applications as the SQL statements and logic needed to perform a task can be coded and tested once in a stored procedure. Thereafter each application or user that needs to perform that task can execute the stored procedure.
Coding business logic into a single stored procedure also offers a single point of control for ensuring that business rules are correctly enforced. Stored procedures can also be used to customize security permissions in much the same way as views. Stored procedure permissions can be used to prevent users from modifying data in certain columns and then grant users permissions to execute the procedure.
C: If a user defined function is created and used the client application would have to be adjusted accordingly. But we don’t want to make any changes in the client application.
Note: In programming languages, functions are subroutines used to encapsulate frequently performed logic. Any code that must perform the logic incorporated in a function can call the function rather than having to repeat all of the function logic. SQL Server 2000 supports built-in functions and user-defined functions.
Built-in functions operate as defined in the Transact-SQL Reference and cannot be modified while user-defined functions allow the user to define their own Transact-SQL functions using the CREATE FUNCTION statement. User-defined functions take zero or more input parameters, and return a single value. Some user-defined functions return a single, scalar data value, such as an int, char, or decimal value.
D: Just creating a rule would only check the input, it would not notify the service manager as required.
Note: Rules are a backward-compatibility feature of SQL Server 2000 and performs the same functions as CHECK constraints. CHECK constraints are the preferred, standard way to restrict the values in a column as they are more concise than rules.
转载请注明原文地址:https://jikaoti.com/ti/eVO7FFFM
本试题收录于:
微软70228题库微软认证分类
0
微软70228
微软认证
相关试题推荐
Whenpeopletalkabouta"north-southdivide"inBritain,theyusuallyrefertohouseprices,employmentandtheratioofprivat
Youaresupposedtowritealettertoyouruniversitycanteen,suggestinghowtoimproveitsservice.Youshouldwriteneatly
DespiteincreasedairportsecuritysinceSeptember11th,2001,thetechnologytoscanbothpassengersandbaggageforweaponsan
Inthefollowingtext,somesentenceshavebeenremoved.ForQuestions41-45,choosethemostsuitableonefromthelistA-Gto
In2016,manyshoppersoptedtoavoidthefreneticcrowdsanddotheirholidayshoppingfromthecomfortoftheircomputer.But
Whethertheeyesare"thewindowsofthesoul"isdebatable;thattheyareintenselyimportantininterpersonalcommunicationis
InParagraphs1and2,thetextshowsPTK’s______.Skepticalobserversbelievethatancestrytestingfailsto______.
Insectsaredisappearing.Theworldhas25percentfewerterrestrialinsectsnowthanin1990.Thisincludesthosewerelyon
对MSN常规选项进行设置,使登录到Windows时自动运行Messenger(R),联系人联机时显示通知,收到电子邮件时通知我。
在【安全中心】窗口中开启Windows自动更新,设置为每天9:00自动下载安装。
随机试题
女,55岁。掌指关节和腕关节反复肿痛5年。近2周病情加重,晨起出现关节僵硬,活动后可缓解。该患者应首先考虑的诊断是
服务项目招标采购的流程中,关于接收建议书的表述,不正确的是()。
某电建公司承担某发电厂安装工程。主要工作包括:锅炉、汽机、发电机、变压器、开关设备、架空线、控制设备等的安装。其中架空线由电建公司按设计要求组织采购。在施工过程中油浸变压器突然出现火苗,现场施工人员即时采取了有效措施,避免了事故发生。考虑发电企业技术密集性
甲向乙借款5万元,并以一辆汽车作抵押,办理了抵押登记。随后,甲又将该汽车质押给丙。丙在占有该汽车期间,将其交给丁修理,因拖欠修理费而被丁留置。下列说法正确的有()。
求助者一般资料:男性,33岁,大学毕业,国家公务员。求助者主诉:婚姻不美满,妻子有外遇,自己想与妻子离婚但又怕给孩子造成负面的影响,对妻子既不满又怨恨,情绪低落一个半月。心理咨询师在充分了解求助者的基本生活情况后,决定对他进行合理情绪疗法。
甲公司欠银行贷款500万,后该公司将其部分资产分离出去,另成立乙公司。对于公司分立后这笔债务的清偿责任,存在以下几种意见,其中哪个是正确的?()
我们通常说的晕车和晕船,是因为体内平衡感受器受到了刺激,使人感到眩晕和不适,这个平衡感受器位于()。
公安机关的专政职能与民主职能是相互重叠的关系。()
A、 B、 C、 D、 D每个图形中圆的位置关系都有相交、相离、相切三种。选项中只有D同时具备这三种位置关系。
下面三个题基于学生一课程数据库中的3个基本表:学生信息表:s(sno,sname,sex,age,dept)主码为sno课程信息表:c(cno,cname,teacher)主码为cno学生选课信息表:sc(sno,cno,grade
最新回复
(
0
)