首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
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
38
问题
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://jikaoti.com/ti/3wO7FFFM
本试题收录于:
微软70228题库微软认证分类
0
微软70228
微软认证
相关试题推荐
Writeanessayof160-200wordsbasedonthefollowingtable.Youressayshould1.describethechangesintheaveragefamilyex
EricHansenwritesabouttravelasaparticipatingenthusiastratherthanamereobserver.【T1】Itgivesthesenineessays,based
EricHansenwritesabouttravelasaparticipatingenthusiastratherthanamereobserver.【T1】Itgivesthesenineessays,based
In2016,manyshoppersoptedtoavoidthefreneticcrowdsanddotheirholidayshoppingfromthecomfortoftheircomputer.But
In2016,manyshoppersoptedtoavoidthefreneticcrowdsanddotheirholidayshoppingfromthecomfortoftheircomputer.But
Herearesomemanagementtoolsthatcanbeusedtohelpyouleadapurposefullife.1.UseYourResourcesWisely.Yourdecisi
InToday’smanagement-theoryindustry,reputation—oratleastthecorporatekind—isa"strategicasset"thatcanbe"leveraged"
随机试题
脑屏障是指
下列哪些属于靶向制剂
具有稳定性质,传热性能缓和,不易与中药所含成分发生化学变化的最常用的中药煎煮器具是
计算该地区生产总值(GDP)可采用的方法有()。该地区生产总值(GDP)为()亿元。
如果想查广东以前各市、县发生的大事,从2008年起查,要用哪种检索方法()
“严慈相济”体现的德育原则是()。
根据加德纳的多元智力理论,“在能力和兴趣受到限制的情况下我们如何改变自我”,这属于下列哪类智力任务?()
斡旋受贿罪,也称间接受贿罪,是指国家工作人员利用本人职权或地位形成的便利条件,通过其他国家工作人员职务上的行为,为请托人谋取不正当利益,索取请托人财物或者收受请托人财物。根据上述定义,下列存在斡旋受贿罪的是()。
四位球迷在某球赛的晋级赛开始之前对几个队伍的赛况进行预测,他们比较关注其中的两支球队,分别做了如下预测:方某说:“如果甲队不能晋级,那么乙队也不能晋级。”白某说:“不管甲队能不能晋级,乙队都不能晋级。”夏某说:“乙队能晋级,但
设f(x)∈C[—π,π],且f(x)=+∫—ππf(x)sinxdx,求f(x).
最新回复
(
0
)