首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
You are the administrator of a SQL Server 2000 computer. The server contains a database named sales. You need to change the way
You are the administrator of a SQL Server 2000 computer. The server contains a database named sales. You need to change the way
admin
2009-05-19
55
问题
You are the administrator of a SQL Server 2000 computer. The server contains a database named sales. You need to change the way customer Ids appear in the Customers table. The database schema is shown in the exhibit.
You need to automate the process of updating the primary key tools. You also want to minimize records locks and administration within the database during the update process.
What should you do?
选项
A、Add an ON UPDATE CASCADE constraint to the CustomerID field in the Customers table. Modify the values in the CustomerID field in the Customers table.
B、Create a duplicate record that has a new CustomerID value. Update the foreign key fields in the invoices, contacts, and quotes tables with the new value.
C、Disable the FOREIGN KEY constraints. Within a transaction, modify the values in the CustomerID field in the Customers table and all related foreign key values in the invoices, contacts, and quotes tables. Re-enable the FOREIGN KEY constraints after the keys are changed.
D、Create a Data Transformation Services package. Use the package to transform the CustomerID value and the values of the related foreign keys in the invoices, contacts, and quotes tables.
答案
A
解析
Explanation: A cascading referential integrity constraints allows for the automatic updating of primary key tools by defining the actions SQL Server 2000 takes when a user deletes or updates a key to which existing foreign keys point.
The ON UPDATE CASCADE option specifies that if an attempt is made to update a key value in a row, where the key value is referenced by foreign keys in existing rows in other tables, all of the foreign key values are also updated to the new value specified for the key. If cascading referential actions have also been defined on the target tables, the specified cascading actions are also taken for the key values updated in those tables.
Incorrect Answers:
B: In this solution the FOREIGN KEY fields are updated manually.
C: Constraints allow you to define the way SQL Server 2000 enforces the integrity of a database. Constraints define rules regarding the values allowed in columns and are the standard mechanism for enforcing integrity. Using constraints is preferred to using triggers, rules, and defaults.
A FOREIGN KEY is a column or a combination of columns used to establish and enforce a link between the data in two tables and are used in conjunction with the primary keys on a referenced table. It can be used together with cascading referential constraints to automate the process of the updating primary keys. Disabling the foreign keys and re-enabling them after the data has been changed will not allow for the automation of the primary key tools. Running the whole update process within a transaction would lock the table.
D: Data Transformation Services is a set of graphical tools and programmable objects that allows for the extraction, transformation, and consolidation of data from disparate sources into single or multiple destinations.
转载请注明原文地址:https://www.kaotiyun.com/show/luhZ777K
本试题收录于:
微软70228题库微软认证分类
0
微软70228
微软认证
相关试题推荐
WhentheresidentsofBuenosAireswanttochangethepesostheydonottrustintothedollarstheydo,theygotoacueva,or"
EricHansenwritesabouttravelasaparticipatingenthusiastratherthanamereobserver.【T1】Itgivesthesenineessays,based
EricHansenwritesabouttravelasaparticipatingenthusiastratherthanamereobserver.【T1】Itgivesthesenineessays,based
EricHansenwritesabouttravelasaparticipatingenthusiastratherthanamereobserver.【T1】Itgivesthesenineessays,based
In2016,manyshoppersoptedtoavoidthefreneticcrowdsanddotheirholidayshoppingfromthecomfortoftheircomputer.But
In2016,manyshoppersoptedtoavoidthefreneticcrowdsanddotheirholidayshoppingfromthecomfortoftheircomputer.But
InToday’smanagement-theoryindustry,reputation—oratleastthecorporatekind—isa"strategicasset"thatcanbe"leveraged"
随机试题
治疗棘球蚴病的药物是
言语轻迟低微,欲言不能复言者,称为
发包人应在进度款支付证书或临时进度款支付证书签发后()天内完成支付,发包人逾期支付进度款的,应按照中国人民银行发布的同期同类贷款基准利率支付违约金。
通用措施项目中在正常情况下可能不发生的是()。
Excel2003做分类汇总计算时,无须先对工作表排序即可实现分类汇总。()
根据一节课所要完成任务的类型数,可将课分为讲授课、演示课、练习课和实验课。()
谈谈怎样做一个有素养、受学生欢迎的老师。
通过云计算技术可以实现共享软硬件资源和信息。下列直接使用到云计算技术的是()。
火车轰隆轰隆地开(1),开往山里。火车要(2)过一百零八十个山洞,这是这条支线当年修通时,我第一次经过时,一个个数的。我坐在火车上,毫无倦意,因为在铁路线的另一头,有一个我(3)中最重要的人——母亲在等着我。(1)
Builtfortrainstorunon.Gatekeeper.
最新回复
(
0
)