首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
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
68
问题
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://kaotiyun.com/show/luhZ777K
本试题收录于:
微软70228题库微软认证分类
0
微软70228
微软认证
相关试题推荐
Climatechangeissupposedtounfoldslowly,overdecades.Butthatisnottrueupinthegreatwhitenorth,asthoseattending
WhentheresidentsofBuenosAireswanttochangethepesostheydonottrustintothedollarstheydo,theygotoacueva,or"
BarackObamaspentmuchtimeonthecampaigntrailproposingadramaticvisiontochangenotonlytheUnitedStatesforthebett
EricHansenwritesabouttravelasaparticipatingenthusiastratherthanamereobserver.【T1】Itgivesthesenineessays,based
Thehumanbraincontains10thousandmillioncellsandeachofthesemayhaveathousandconnections.Suchenormousnumbersused
InParagraphs1and2,thetextshowsPTK’s______.Skepticalobserversbelievethatancestrytestingfailsto______.
Writealettertorecommendyourstudent,LiXu,forapositionofadministratorinacompany.Youshouldincludethedetailsyo
在用户管理组administrators中添加本地用户“sy”。
随机试题
A.吡拉西坦B.茴拉西坦C.奥拉西坦D.利斯的明E.多奈哌齐不良反应偶见前胸和腹部发热感、肝肾功能异常的是
关于食物对药物吸收的影响,下列食物可使其吸收量增加的是
A.1000~2000mlB.2000~3000mlC.3000~4000mlD.4000~8000mlE.8000~12000ml霍乱轻度患者24小时补液量是
医疗单位调配毒性药品,每次处方剂量不得超过
监理工程师不得在以下哪些单位兼职?()①工程设计②工程施工③材料供应④政府机构⑤科学研究⑥设备厂家
机械设备安全应考虑机械产品安全和机械使用安全两个阶段,每个阶段都应采取安全技术措施和安全管理措施消除或减小机械设备风险。下列机械设备安全措施中,不属于安全技术措施的是()。
国债的年利率固定,又有国家信用作为保证,因而这类基金的风险较低,适合于稳健型投资者。()
某公司主要从事建筑工程机械的生产制造,2016年发生以下业务:(1)签订钢材采购合同一份,采购金额8000万元;签订以货换货合同一份,用库存的3000万元A型钢材换取对方相同金额的B型钢材;签订销售合同一份,销售金额15000万元。
我国《中华人民共和国行政诉讼法》规定,对行政案件实行()。
WhenrecruitingatBritishuniversities,PricewaterhouseCoopers,oneoftheBigFourauditingfirmswithitsheadquartersinthe
最新回复
(
0
)