首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
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
49
问题
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://kaotiyun.com/show/zrhZ777K
本试题收录于:
微软70228题库微软认证分类
0
微软70228
微软认证
相关试题推荐
Inthissection,youareaskedtowriteanessaybasedonthefollowinginformation.Makecommentsandexpressyourownopinion.
Inthissection,youareaskedtowriteanessaybasedonthefollowinginformation.Makecommentsandexpressyourownopinion.
Twomonthsago,yougotajobasaconsultantforHumanResourceServiceCompany.Butnowyoufindthattheworkisnotwhatyou
Writealettertoacompanydecliningajoboffer.Inyourletter,youshouldappreciatethejoboffer,andstateyourreason(s)
EricHansenwritesabouttravelasaparticipatingenthusiastratherthanamereobserver.【T1】Itgivesthesenineessays,based
EricHansenwritesabouttravelasaparticipatingenthusiastratherthanamereobserver.【T1】Itgivesthesenineessays,based
Inthefollowingtext,somesentenceshavebeenremoved.ForQuestions41-45,choosethemostsuitableonefromthelistA-Gto
Theideaisasaudaciousasitaltruistic:provideapersonallaptopcomputertoeveryschoolchild—particularlyinthepoorestp
Successfulsportsprofessionalscanearnagreatdealmoremoneythanpeopleinotherimportantprofessions.Somepeoplethinki
Thefollowingscenariowillbeusedforquestions29and30.Johnisanetworkadministratorandhasbeentoldbyoneofhisnet
随机试题
屈节辱命,虽生何面目以归汉?(《汉书·苏武传》)节:
“多行不义必自毙”出自()
通知:你所在单位决定举行一次万米跑步活动,请你以工会的名义写一个通知张贴出去(词数100~120)。内容如下:(1)主题:长跑;(2)时间和地点;(3)参加对象。
患儿,女,5岁。发热1天,颜面、躯干见丘疹及水疱疹。现低热,恶寒,鼻塞流涕,疹色红润,疱浆清亮,疹粒稀疏,舌质红,苔薄白,脉浮数。其病证诊断为( )。
藿香正气散的功用是
某航空公司经批准占用耕地500000平方米,于2016年5月31日办妥占用耕地手续,其中用于建设飞机场跑道、停机坪占地320000平方米、候机厅占地100000平方米、宾馆和办公楼占地80000平方米。2017年6月1日,航空公司就该耕地与当地政府
当代教育家苏霍姆林斯基在他曾担任校长的帕夫雷什中学创立了几十个课外兴趣小组供学生选择。这反映了教育必须适应发展的哪一特点?()(2014年上半年真题)
—Fangfangfailedinthesingingcompetition.Shemustbeverysad.—Let’sgoand______.
根据迁移性质的不同和影响效果的不同,迁移可分为()。
民事诉讼:是人民法院和一切诉讼参与人,在审理民事案件的过程中所进行的各种诉讼活动,以及由此产生的各种诉讼关系的总和。下列不属于民事诉讼的一项是( )。
最新回复
(
0
)