首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
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
34
问题
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
BarackObamaspentmuchtimeonthecampaigntrailproposingadramaticvisiontochangenotonlytheUnitedStatesforthebett
EricHansenwritesabouttravelasaparticipatingenthusiastratherthanamereobserver.【T1】Itgivesthesenineessays,based
In2016,manyshoppersoptedtoavoidthefreneticcrowdsanddotheirholidayshoppingfromthecomfortoftheircomputer.But
In2016,manyshoppersoptedtoavoidthefreneticcrowdsanddotheirholidayshoppingfromthecomfortoftheircomputer.But
In2016,manyshoppersoptedtoavoidthefreneticcrowdsanddotheirholidayshoppingfromthecomfortoftheircomputer.But
In2016,manyshoppersoptedtoavoidthefreneticcrowdsanddotheirholidayshoppingfromthecomfortoftheircomputer.But
Herearesomemanagementtoolsthatcanbeusedtohelpyouleadapurposefullife.1.UseYourResourcesWisely.Yourdecisi
Writealettertorecommendyourstudent,LiXu,forapositionofadministratorinacompany.Youshouldincludethedetailsyo
在用户管理组administrators中添加本地用户“sy”。
随机试题
下列不属于计算机按其构成器件分类的是()
水准测量采用高差法,测量过程中,通过()得到待定点的高程。
关于温度对酶活性影响的实验,下列叙述不正确的是()。
①只有这样,才能使人们在网络社会里的行为,与在现实社会一样,受到来自法律和道德的制约,并在现实社会中找到责任的主体②网络社会,身份虚拟,使一些人毫无忌惮,常常铤而走险③因此,要从根本上用好微时代带给我们的便利,同时避免可能出现的弊端
2012年2月4日,私人房主陆某为建造自家的一栋四层高的民房,将工程承包给当地的包工头黄某,并签订了书面承揽合同。在黄某建好该民房前两层时,由于物价上涨,建房成本增加,陆某觉得将工程继续承包给黄某不划算,于是跟黄某解除了承揽合同,之后与黄某达成口头协议,约
A、 B、 C、 D、 A将“1”化成,分子是公比为5的等比数列,分母是二级等差数列变式,后项减前项得到数列为22,44,88是公比为2的等比数列,所以。
让别人去把握自己的决定,或服从别人的意见,不能正确选择适应社会环境的生活角色,无法“发现自己”,也不知道自己究竟是什么样的人和想要成为什么样的人,这属于()
新三民主义的政纲同中共在民主革命阶段的纲领基本一致,因而成为国共合作的政治基础。其中,新三民主义主要“新”在
既是中华民族的传统美德,也是我国公民道德建设的重点,还是社会主义核心价值观的一条重要准则的是()
在关系数据库中,用来表示实体之间联系的是______。
最新回复
(
0
)