为什么程序关闭的时候报 access violation add address 错误?

SauMa 2007-01-04 11:00:30
每次程序关闭的时候就会报这个错,这是怎么回事呢
...全文
179 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
我不懂电脑 2007-01-04
  • 打赏
  • 举报
回复
有内存被释放后,又访问了。
___NULL 2007-01-04
  • 打赏
  • 举报
回复
这个问题不好说,估计什么东西还没关闭,就被你 Terminate 了,但设断点运行却给了足够的时间来完成那个任务
SauMa 2007-01-04
  • 打赏
  • 举报
回复
这得给什么地方的代码啊?我关闭程序就直接调用Application->Terminate(),然后就报错,但是我再这里下断点跟进去又么有错,可以正常退出
daydayup234 2007-01-04
  • 打赏
  • 举报
回复
给点代码才知道
SauMa 2007-01-04
  • 打赏
  • 举报
回复
谢谢如风,我把程序改了一下,可以了

现在我想在子窗口关闭的时候发消息给主窗体,把子窗体指针delete然后再赋NULL

下面是添加的消息映射
BEGIN_MESSAGE_MAP
MESSAGE_HANDLER(WM_FORM_CLOSE,TMessage,CMMessage)
END_MESSAGE_MAP(TForm1)

自定义消息,程序一起来运行到这里END_MESSAGE_MAP(TForm1)这里就报了stack overflow,这是为什么呢
donwmufromdying 2007-01-04
  • 打赏
  • 举报
回复
个人认为你在关闭子窗口和主窗口时的问题。一般的一个form1调用另外一个form2(动态创建的)这个流程:Form2=new TForm2(this);
Form2->ShowModal();
Form2->Close();
Form2=Null;
donwmufromdying 2007-01-04
  • 打赏
  • 举报
回复
你最好把你程序中动态分配的内存显式释放掉,比如:free,dealloc...,Close等等,特别是一些对象的实例释放,比如:form
SauMa 2007-01-04
  • 打赏
  • 举报
回复
我打开了一个子窗口,在子窗口运行部分代码后,关闭子窗口,在关主窗口就出错,但是关子窗口的时候没出错
jiangshx 2007-01-04
  • 打赏
  • 举报
回复
看看运行程序时都执行了哪些操作,导致了这个错误。
比如:如果运行程序以后,直接退出就出错,那就可能是在程序启动一些事件中,某段代码有问题,可能指针越界之类的。试着屏蔽该段代码或其中部分代码,看看还出错不,以此判断代码错误的位置。
abstract class 抽象类 accelerator 快捷键 accelerator mapping 快捷键映射 accelerator table 快捷键对应表 access modifier 访问修饰符 Access Pack 访问包 access specifier 访问说明符 access violation 访问冲突 accessibility 辅助功能 accessibility domain 可访问域 Accessibility Options 辅助功能选项 accessor 访问器 action 操作 Active Directory hierarchy Active Directory 层次结构 active document 活动文档 Active Document Containment 活动文档包容 active end 活动结尾 active object 活动对象 active point 活动点 Active Template Library 活动模板库 ActiveX Component ActiveX 组件 ActiveX Control ActiveX 控件 ActiveX control container ActiveX 控件容器 ActiveX Control Interface Wizard ActiveX 控件接口向导 ActiveX Control Test Container ActiveX 控件测试容器 ActiveX Designer ActiveX 设计器 ActiveX Document Migration Wizard ActiveX 文档移植向导 ActiveX-enabled 支持 ActiveX 的 Add key/ Multiply key/ Substract key/ Devide key 加号键/ 乘号键/ 减号键/ 除号键 Add-In 外接程序 Address Book 通讯簿 address space 地址空间 Administrator Mode 管理员模式 advise sink 通知接收 aggregate 聚合 Airbrush 喷枪 All Tables 所有表 allocation hook 分配挂钩 Alternate text "替换文字,备用文本" Always On Top 总在最前面 ambient 环境 ambiguous 不明确 ampersand “&”符 ampersand (&) “and”符 (&) anchor 锚定 (v.);定位点 (n.) animation control 动画控件 apartment-model threading 单元模型线程 application framework 应用程序框架 Application Wizard 应用程序向导 Apply Now 立即应用 apply to similar 应用到相似项 argument 参数 Arrange Tables 排列表 array initializer 数组初始值设定项 array rank 数组秩 arrow cap 箭头帽 ARROW key 箭头键 ArrowHourGlass 箭头沙漏 ArrowQuestion 箭头问号 article family 文章族 assembly 程序集;汇编 assembly manifest 程序集清单 assert 断言 assign 分配 associate 关联 asterisk (""*"") 星号(“*”) asynchronous moniker 异步名字对象 asynchronous peek operation 异步查看操作 ATL Object Wizard ATL 对象向导 atomic operation 原子操作 attached table 附加表 attribute 属性 Attributed Component Wizard 属性化组件向导 Attributed Programming 属性化编程 Attributes Property Attributes 属性 Authentication 身份验证 authorable 可创作(的) Auto completion for commands 自动完成命令 Auto Increment 自动增加 Auto Syntax Check 自动语法校验 Automatic 自动 automation 自动化 automation-enabled 启用自动化
Borland Delphi 2005 Architect Update 3----------Report #: Short Description: Rating: Status12241 IntToHex returns lowercase letters0.00 of 5 Closed11881 TStringStream constructor for .NET sets Position incorrectly0.00 of 5 Closed11787 Access violation using Code Insight when editing the uses clause0.00 of 5 Closed11759 TList instance leaked in DBCommon.pas when using IN operator in Filter expression5.00 of 5 Closed11651 New EllipsisPosition property causes text to be invisible & process to hang5.00 of 5 Closed11471 Cannot manage StarTeam association since applying Update20.00 of 5 Closed11353 (strict) protected nested class become public3.67 of 5 Closed11314 Too much inlining yields unstable compiled code.0.00 of 5 Closed11266 Inline causes compile error : F2084 Internal Error SCR765.00 of 5 Closed11193 Inlined function affects working of the enclosing for loop0.00 of 5 Closed11184 [Fatal Error] F2084 Internal Error: ILLK26340.00 of 5 Closed11069 Compact the TApplication.ProcessMessage code fragment for Unicode handling5.00 of 5 Closed10918 TColorBox control custom color selection causes AV0.00 of 5 Closed10873 Internal error: URW 793 when using constant struct with enums2.00 of 5 Closed10861 Access Violation when compiling code with default index property0.00 of 5 Closed10772 Designer improperly handles controls tagged with [ToolboxItem]0.00 of 5 Closed10669 TWideStrings has no GetEnumerator method0.00 of 5 Closed10661 Switching between form and source view cause long delay4.67 of 5 Closed10567 Ability to create all VCL packages0.00 of 5 Closed10498 D2005: DataSet lots of methods missing in code completion0.00 of 5 Closed10450 The Ellipse is drawn over some of the caption text when a form is docked in IDE0.00 of 5 Closed10381 Constant array of procedural types crashes compiler5.00 of 5 Closed10376 The Delphi 2k5 IDE UpTime & project loading is very SLOW4.00 of 5 Closed10314 Error Insight fails to flag an error4.00 of 5 Closed10248 Alignment Palette in VCL form designer malfunctions5.00 of 5 Closed10190 List view selected item no longer selected5.00 of 5 Closed10009 Double-click in the Search Results window0.00 of 5 Closed9912 Press Enter on Component crashes Delphi 20050.00 of 5 Closed9847 Transactional Object Wizard Missing0.00 of 5 Closed9712 The XML documentation feature doesn't associate comments with the correct symbols5.00 of 5 Closed9690 "Cannot focus a disabled or invisible window" in IDE0.00 of 5 Closed9666 Code Completion doesn't show all available items when using overload5.00 of 5 Closed9639 Active Form wizard not available in Delphi 2005 but mentioned in online help5.00 of 5 Closed9634 IDE response too SLOW4.63 of 5 Closed9578 TXPManifest + TFrame + TLabel + TRadioGroup = bad5.00 of 5 Closed9477 Delphi .NET assembly references with strong names5.00 of 5 Closed9254 Incorrect reference public key token included into Delphi8 strong-named assembly metadata4.00 of 5 Closed9021 Memory Leak in TreeView0.00 of 5 Closed8866 Assigning long string values (greater than 8192 characters) to TStringFields results in access violation.5.00 of 5 Closed8785 Filter or Ranges on Nested Dataset's should restrict master as well.0.00 of 5 Closed8417 TCustomSQLDataSet.GetFieldData implementation0.00 of 5 Closed8229 Error in code when database doesn't support schema/owner names5.00 of 5 Closed8032 Show modified code in the scrollbar0.00 of 5 Closed8021 TIndexDef.Assign Doesn't copy DescFiels and CaseInsFields5.00 of 5 Closed8001 SQLDataset doesn't call .Close on dbExpress driver cursor when closing5.00 of 5 Closed7912 TCustomClientdataset: properties "IndexDefs" and "IndexName" should be public0.00 of 5 Closed7872 double exception in method TDataSetProvider.InternalGetRecords5.00 of 5 Closed7809 SetOptionalParam don't work0.00 of 5 Closed7768 An Easy Feature Request: TDataset.CopyFields4.00 of 5 Closed7290 Grid's functionality enhancement5.00 of 5 Closed7199 Class Completion erroneously adds fields to a complete class if the getter functions starts with F5.00 of 5 Closed7082 Add SSE3 / PNI instructions to the BASM5.00 of 5 Closed7005 New control request - TDBStaticText - Add possibility to have Edge Borders0.00 of 5 Closed6985 Add node for unit name in Find in Files results in Message Window0.00 of 5 Closed6803 WebToolBar problem with buttons0.00 of 5 Closed6558 AV in DBGrid when destroying DataSet0.00 of 5 Closed6428 Labels disappear with XPManifest5.00 of 5 Closed6368 Resolving lookup- & calculated fields to datafields4.00 of 5 Closed6238 DBNavigator and DBGrid compliant with Federal Section 5080.00 of 5 Closed6021 Labels not visible in Windows XP0.00 of 5 Closed5951 Internal error: SY5764.44 of 5 Closed5812 TComboBox.Focused method does not always return good results.1.00 of 5 Closed5803 Unable to delete component if code editor minimized in saved desktop5.00 of 5 Closed5763 Cannot debug datamodule containing many objects0.00 of 5 Closed5699 Apache shared modules do not work with Apache 2.0.4x5.00 of 5 Closed5592 New event OnValidate that is fired before applying updates2.00 of 5 Closed5336 fatal error: Internal Error: L6812.33 of 5 Closed5283 Cannot read complete compiler error message.0.00 of 5 Closed5280 MessageDlg returns mrNone instead of mrCancel when aborted5.00 of 5 Closed5248 Assert fails to break and leaves FPU invalid op exception set.4.50 of 5 Closed4627 Cannot assign -2147483648 into INTEGER Variable4.00 of 5 Closed4624 A way to set both Width and Height of TBitmap (speed reason)4.85 of 5 Closed4581 Field description and Label3.00 of 5 Closed4444 IncMilliSeconds...IncHour with DateTime<0 wrong0.00 of 5 Closed4343 Proposal of modification of the TDataSet.Post method in DB.pas unit1.00 of 5 Closed4184 Delphi DLL using sharemem called from VC++ exe AV on exit3.25 of 5 Closed4172 tFrames and XPMan hiding controls5.00 of 5 Closed3850 TGraphicControl descendants invisible in frames with XP Manifest4.60 of 5 Closed3792 TryEncodeDateTime not correct for dates before Dec. 30, 18995.00 of 5 Closed3776 Add full IDL support0.00 of 5 Closed3718 Automatic Required setting of TField not consistent with SQL3.71 of 5 Closed3542 Strange limits in property CommandText2.40 of 5 Closed2881 DBGrid doesn't repaint when Enabled changed.5.00 of 5 Closed2625 Impossible to open a .TLB into the TLB Editor if missing uses reference3.50 of 5 Closed2608 Compiler crashes, dcc70.dll Read of address 000000004.00 of 5 Closed2572 Unable to sort on columns in module view3.00 of 5 Closed2382 TListView doesn't update correctly in OwnerData mode.4.00 of 5 Closed2276 'deprecated' warning appears when it shouldn't4.31 of 5 Closed2258 Failure to parse/compile integer constant --2147483648 and lower4.86 of 5 Closed2236 Delphi converts Text DFM's to binary with these steps4.71 of 5 Closed1685 Compiler error message refers to HIGH when it should be LOW3.43 of 5 Closed1455 GetRange method3.38 of 5 Closed1209 Context help does not work for TComboboxEx3.67 of 5 Closed1177 ResourceString limitation of 1024 characters3.89 of 5 Closed(出处:www.borland.com)
//// TICQClient Version 1.18f// (C) Alex Demchenko(alex@ritlabs.com)// http://www.cobans.net////-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=[ Legend: ][ + Added feature ][ * Improved/changed feature ][ - Bug fixed (I hope) ]16-September-2002, Version 1.18f (fix release)[+] Added .manifest file in Example project for better WinXP GUI compatability[-] Fixed SMS reply receiving (Thx! to Nick Anikin)[-] Fixed OnConnectionRefused event, it wasn‘t called when connection with ICQ server was lost (Thx! to Mironov Serghei)[-] Application containing TTimer on the same form as TICQClient generated Access Violation error (Thx! to Simon de James)07-September-2002, Version 1.18[!] Sorry that HTTP proxy support wasn‘t added in this release, it‘s impossible due to blocking sockets architecture, but ICQ HTTP PROXY protocol has been discovered and parsed (for developers: see MySocket.pas)[!] Added file receiving see ‘File Transfers‘ in Help.chm[+] Added RequestInfoShort procedure & OnUserInfoShort event for requesting the short info about user[+] Added LastError: String property in TICQClient[+] Added ICQClientVer_Major, ICQClientVer_Minor constants in ICQWorks.pas[*] Some work-speed improvements[*] Improved info request/response procedures & events[*] Improved white pages (more compatible with ICQ2002a)[*] Improved sockets: data sending should work better now (especially with badly internet connection)[*] Improved TICQClient timeout timer[*] Contacts & contacts requests can be sent/received also through server now, see SendContacts, RequestContacts functions[*] OnPasswordChanged events moved to OnInfoChanged event.[-] Finally fixed the bug which doesn‘t allow to close the application having TICQClient while Windows restarting/shutting down[-] Fixed bug: users where not added to invisible list while receiving server side lists in Example (bug in Example) (Thx! to Attila)[-] Fixed age field in OnUserFound event when searching white pages[-] Fixed disconnection bug in direct connection sessions (server doesn‘t handled disconnection events)[-] Fixed access violation on receiving OnInfoBackGround events with different count in Pasts & Affiliations lists (bug in Example)[-] Fixed UTF8ToStrSmart function, now it should convert UNICODE strings from ICQ server nearly perfectly ;) (Thx! to Alexander Vaga)[-] Fixed TMySock access violation when destroying the object after socket reported OnConnectError[-] Lots of access violation fixes, which appear while using heavily TICQClient as a non-visual object17-August-2002, Version 1.17[!] Added server side list upload support (you can even add users into SSL without authorization!), see ‘Server Side Lists‘ in Help.chm[!] Added Miranda-icq database support in TICQDb component, see DbType property in Help.chm[+] Added ignore list support, see Server Side Lists in Help.chm[+] Added OnURLFound event in TICQDb[+] Added OnChangePasswordError event, called when password cannot be changed[+] Added new ERR_LOGIN type in OnError event, for more info see Help.chm file - OnError event[+] Added SetAuthorization procedure setting ‘authorization required‘ and ‘webaware flag‘, see SetAuthorization procedure, OnAuthorizationChangedOk event[+] ICQ databases can be open now while ICQ is running[*] Added authorize parameter in OnUserFound event[-] Fixed internet address resolving, which caused connection errors on some Win98 systems[-] Received SMS messages were not converted from UTF-8 format[-] Fixed devision by zero in TICQDb component10-August-2002, Version 1.16[+] Added SMS reply event, now you can receive messages sent through cellular, see OnSMSReply event (Thx! to Olivier)[+] Added connection timeout support, see ConnectionTimeout property[+] Added OnError event, now you can understand why you‘ve been disconnected :)[+] Answers on info changing, see OnInfoChanged event[+] An option disabling direct connections, see property DisableDirectConnections[*] Direct connections are estabilished now through proxy (if any)[*] Removed thread layer while resolving IPs in SOCKS proxies[*] MySocket.pas improvements, fixed potential Access Violation bugs[*] TProxyType moved to ICQWorks.pas[-] Fixed SetSelfInfoMore procedure: languges were broken[-] Fixed message ACKs[-] Proxy packets were dumped in OnPktParse event[-] SendSMS procedure didn‘t convert Text to UTF-8 format[-] Client should disconnect now on receiving malformed packets06-August-2002, Version 1.15[!] SOCKS4, SOCKS5 proxy support, only experimental now, please test it[+] Added keep alive packets support, see procedure SendKeepAlive[+] Added OnOnlineInfo event providing advanced info about users going online: Internal & External IPs, Port, Protocol version.[-] Messages from Mac clients were not received (Thx! to AV(T))[-] Fixed range checking errors in TICQClient component (Thx! to Klimashev I.A.)[-] Fixed unicode strings in server side contact list group names[-] Fixed icon displaying in UserSearch form of the Example project[-] Some help fixes and modifications16-July-2002, Version 1.11[!] Added TICQDb example. See DbConverter.[+] Impoved SMS support, see OnSMSAck & OnSMSRefused events.[-] TICQDb: .idx and .dat files were not closed after importing[-] Offline messages were not received (Thx to Sergey Sokolov)15-July-2002, Version 1.1[!] Importing messages, urls, contacts(with their info) & owner‘s info (including password!) from ICQ2000x, ICQ2001x, ICQ2002a databases. See TICQDb component.[!] SMS messages are working :) (Thx! to Nick Barrett)[*] property Pasword changed to property Password (sorry for spelling)[*] New help file! (.chm format)[*] Removed AddContactVisible, AddContactInvisible functions, use VisibleList.Add, InvisibleList.Add instead.[-] Fixed bug with Visible/Invisible lists: after adding a user to your vis./inv. lists you was disconnected from server. (Thx! to Karloz R.)[-] Sorry that new Russian help file isn‘t included in this release, I have‘t got time for it bacause of going in the summer hollidays :)12-July-2002, Version 1.0 (Release!)[+] Added contacts request, see RequestContacts function[+] Added acks on every direct packet, see OnDirectPacketAck event.[-] Russian help didn‘t contain some functions & events[-] Main example should work now in Delphi5 & other compatability issues10-July-2002, Version 0.9[!] Direct connections are supported now![!] OnMessageRecv & OnOfflineMsgRecv are divided now into OnMessageRecv/OnURLRecv & OnOfflineMsgRecv/OnOfflineURLRecv, so the MsgType param isn‘t used now[+] Sending/Receiving messages directly to client[+] Sending/Receiving contacts[+] Receiving contacts requests[+] Improved MySocket.pas, now it works safier and doesn‘t use any threads05-July-2002, Version 0.8[+] Added Russian translation of Help.html. See HelpRus.html.[+] Added password changing procedure. See ChangePassword procedure & OnChangePasswordOk event.[+] Added unregistering the existing UIN. See UnregisterUIN procedure and OnUnregisterBadPassword, OnUnregisterOk events.[-] UNICODE(UTF-8) names in the server side contact lists were not converted to ASCII.[-] Packet dumper now parses more packets on channels 1 & 405-July-2002, Version 0.7[+] Now you can register new UIN from TICQClient! See RegisterNewUIN procedure and OnNewUINRegistered, OnNewUINRefused events.[+] Auto-away messages support. See RequestAwayMsg procedure, OnAutoMsgResponse event and AutoAwayMessage property.[-] Since v0.6 ‘White Pages‘ did not work properly (Thx! to Ozan Kulahci)[-] Login event was called too early, so search & some other functions were not working immideatly after login (Thx! to Ozan Kulahci)04-July-2002, Version 0.6[!] Removed Connecting property & OnConnect, OnConnectError, OnDisconnect events. I think there‘s no way of using them. OnConnectionFailed now called when you loose connection with server or you cannot connect to it.[+] Added advanced message support(SendMessageAdvanced procedure, OnAdvancedMsgAck event). Now you can receive confirmations on messages you‘ve sent![+] Added SendSMS(const Destination, Text: String) procedure for sending sms messages, please, test it and mail me(email above) about results, country where I live isn‘t supported by the ICQ sms gateway :)[+] Added new items to languages constant array[-] Example wasn‘t showing messages received in RTF format02-July-2002, Version 0.5[+] Added visible/invisible list support: look at AddContactVisible, AddContactInvisible functions and VisibleList, InvisibleList TStringLists in Help.html file[+] Updated main Example, now it receives server lists, saves contact list to disk and adds users from the search dialog[+] Added new VerySimple example with just logging and sending/receiving messages. This example shows easy of use of the TICQClient component.[+] Changed AddContact(UIN: LongWord) procedute to AddContact(UIN: LongWord): Boolean function, it returns True when user is added to the list and False if it‘s in the list already[+] Added RemoveContact procedure, which removes UIN from user‘s contact list while you are online[-] Fix in AddContact procedure it was sending the entire contact list, instead of new UIN[-] User‘s info StringLists(Interests, Affiliations, etc) in Example having the same group names caused errors: the first group and value were repeated a few times instead of showing the different values with the same groups01-July-2002, Version 0.4[!] Server side contact list is supported now![+] Added SendURL(UIN: LongWord; const URL, Description: String) procedure for sending URLs[+] Added SetSelfInfoGeneral, SetSelfInfoMore, SetSelfInfoAbout procedures for uploading the self info[-] Fixed SearchByName procedure, now it works correctly30-June-2002, Version 0.3[+] Added ICQClient.dcr icon, thx to Quique![+] Added OnUserInfoBackground event[-] Fix with user‘s gender in ‘White Pages‘[-] A few other small fixes28-June-2002, Version 0.2[+] Added white pages & random search[+] Update to PacketDump viewer (PktDump.pas), not it parses CLI_META and SRV_META packets[-] Fix in SRV_METAINTEREST, interests were badly parsed[-] Some fixes with LNTS strings26-June-2002, Version 0.1[!] First public release
View Assessment Result: Multiple-Choice Quiz 2 Your performance was as follows: 1. The degree of a table is the number of _____ in the table. (a) keys (b) columns (c) rows (d) foreign keys Correct answer is (b) Your score on this question is: 10.00 Feedback: (b) -------------------------------------------------------------------------------- 2. The arity of a table is the number of _____ in the table. (a) keys (b) columns (c) foreign keys (d) rows Correct answer is (b) Your score on this question is: 10.00 Feedback: (b) -------------------------------------------------------------------------------- 3. What information is necessary when specifying the structure of a table? (a) the name of the table and the amount of storage space to be allocated to the table (b) the name of the table, the names of the table's attributes, the data types of the table's attributes, the formats of the table's attributes, and the maximum number of rows that the table can have (c) the name of the table and the names of the table's attributes (d) the name of the table, the names of the table's attributes, the data types of attributes, and the formats of attributes Correct answer is (d) Your score on this question is: 10.00 Feedback: (d) -------------------------------------------------------------------------------- 4. The foreign key in a table T1 _____ the same _____ as the corresponding primary key in table T2. must have, name need not have, name must have, domain (a) I, II, and III (b) I and II (c) I and III (d) II and III Correct answer is (d) Your score on this question is: 10.00 Feedback: (d) -------------------------------------------------------------------------------- 5. Which of the following SQL statements can be used to add a row to a table? (a) CREATE (b) INSERT (c) APPEND (d) ADD Correct answer is (b) Your score on this question is: 10.00 Feedback: (b) -------------------------------------------------------------------------------- 6. A difference operation can be applied to tables that (a) are union compatible (b) have the same column names (c) have the same name (d) are the same size Correct answer is (a) Your score on this question is: 10.00 Feedback: (a) -------------------------------------------------------------------------------- 7. Which of the following SQL statements can be used to create a relational table? (a) INSERT (b) ADD (c) CREATE (d) APPEND Correct answer is (c) Your score on this question is: 10.00 Feedback: (c) -------------------------------------------------------------------------------- 8. For two tables to be union compatible, the tables should be the same with respect to which of the following? (a) keys (b) cardinality (c) name (d) degree Correct answer is (d) Your score on this question is: 0.00 Feedback: (b) -------------------------------------------------------------------------------- 9. A deletion operation will _____ if the deletion leads to the violation of a referential integrity constraint. (a) fail (b) succeed with warning (c) succeed without warning (d) crash the system Correct answer is (a) Your score on this question is: 10.00 Feedback: (a) -------------------------------------------------------------------------------- 10. With Query By Example, a user enters a query by (a) filling in skeleton tables of the database with examples of what is to be retrieved (b) placing SQL keywords, such as select, under the column names they want to retrieve (c) typing a syntactically correct SQL query that uses column and table names similar to the correct column and table names in a database (d) writing an English description of the data that the user needs Correct answer is (a) Your score on this question is: 10.00 Feedback: See section 1.2.3 in the course notes. (a) -------------------------------------------------------------------------------- Go to top of assessment. Total score: 90.00 ? Copyright 2008 iCarnegie, Inc. All rights reserved. 1. In the Entity-Relationship model, the degree of a relationship specifies which of the following? (a) The cardinality ratio of the relationship (b) The number of integrity constraints required to implement the relationship (c) The number of attributes that characterize the relationship (d) The number of entities that participate in the relationship Correct answer is (d) 2. In an ER model, which of the following is true about a component attribute? (a) A component attribute is always atomic. (b) Component attributes must always be combined by an aggregation operation. (c) A component attribute can be a composite attribute. (d) A component attribute always contains other components. Correct answer is (c) 3. In the Entity-Relationship model, properties that characterize entities and relationships are modeled as (a) attributes (b) participation constraints (c) entity types (d) weak entities Correct answer is (a) 4. What is an identifying owner in an ER model? (a) The entity upon which a weak entity's existence depends (b) The relationship that identifies a weak entity's owner (c) The entity upon which a strong entity's existence depends (d) The relationship that identifies a strong entity's owner Correct answer is (a) 5. In an ER model, the cardinality ratio of a relationship type is (a) the number of instances of relationships of that relationship type (b) the number of entity types involved in that relationship type (c) the number of relationships of that relationship type in which an entity can participate (d) the minimum number of entities that can participate in that relationship type Correct answer is (c) 6. Which of the following is true about storage for derived attributes? (a) Derived attributes must not be stored. (b) Derived attributes are usually stored because storage improves retrieval performance. (c) Derived attributes must be stored. (d) Derived attributes are usually not stored because they can be computed. Correct answer is (d) 7. In an ER model, what is a recursive relationship type? (a) A never-ending type of relationship (b) The type of relationship that does not belong anywhere (c) The type of relationship between entities of one entity type (d) The relationship type where the related entities are one and the same Correct answer is (c) 8. In EER modeling, generalization is the process of generating (a) superclasses out of subclasses (b) subclasses out of superclasses (c) entities out of attributes (d) attributes out of entities Correct answer is (a) 9. When mapping from an ER model to a relational model, a strong entity is mapped into a (a) table (b) row (c) column (d) key Correct answer is (a) 10. Which of the following is true about attributes in a relational model? Attributes can be multi-valued. Attributes can be composite. (a) Both I and II (b) II only (c) Neither I nor II (d) I only Correct answer is (c) 1. In an ER model, what is a recursive relationship type? (a) The relationship type where the related entities are one and the same (b) The type of relationship that does not belong anywhere (c) The type of relationship between entities of one entity type (d) A never-ending type of relationship Correct answer is (c) 2. In an ER model, the cardinality ratio of a relationship type is (a) the number of relationships of that relationship type in which an entity can participate (b) the minimum number of entities that can participate in that relationship type (c) the number of entity types involved in that relationship type (d) the number of instances of relationships of that relationship type Correct answer is (a) 3. In the Entity-Relationship model, a derived attribute is one (a) that is composed of multiple atomic attributes (b) that characterizes a relationship instead of an entity (c) that may have multiple values simultaneously (d) whose value can be computed from the values of other attributes Correct answer is (d) 4. In the Entity-Relationship model, properties that characterize entities and relationships are modeled as (a) entity types (b) weak entities (c) attributes (d) participation constraints Correct answer is (c) 5. Which of the following is true about storage for derived attributes? (a) Derived attributes must be stored. (b) Derived attributes are usually stored because storage improves retrieval performance. (c) Derived attributes must not be stored. (d) Derived attributes are usually not stored because they can be computed. Correct answer is (d) 6. What is an identifying owner in an ER model? (a) The relationship that identifies a weak entity's owner (b) The relationship that identifies a strong entity's owner (c) The entity upon which a strong entity's existence depends (d) The entity upon which a weak entity's existence depends Correct answer is (d) 7. In an ER model, which of the following is true about a component attribute? (a) A component attribute always contains other components. (b) A component attribute can be a composite attribute. (c) A component attribute is always atomic. (d) Component attributes must always be combined by an aggregation operation. Correct answer is (b) 8. In EER modeling, generalization is the process of generating (a) attributes out of entities (b) superclasses out of subclasses (c) subclasses out of superclasses (d) entities out of attributes Correct answer is (b) 9. When mapping from an ER model to a relational model, a strong entity is mapped into a (a) key (b) row (c) column (d) table Correct answer is (d) 10. Which of the following is true about attributes in a relational model? Attributes can be multi-valued. Attributes can be composite. (a) I only (b) II only (c) Neither I nor II (d) Both I and II Correct answer is (c) 1. Through normalization, update anomalies (a) can be eliminated (b) is usually left unchanged (c) can be maximized (d) can be minimized but not eliminated Correct answer is (a) 2. Which of the following is a property (are properties) exhibited by good relational schemas? The use of null values in tuples The grouping of as many attributes as possible into one main table The elimination of data redundancy to avoid update anomalies (a) III only (b) None (c) I and II only (d) II and III only Correct answer is (a) 3. Which of the following statements concerning normal forms is true? (a) A relation that is in second normal form is also in first normal form. (b) The lower the normal form number, the better the schema design is. (c) Each normal form contains a state of independent properties, unrelated to other normal forms. (d) Schemas that are in second normal form are considered the best. Correct answer is (a) 4. Consider the following functional dependency. {A, B} -> {C} Regarding this dependency, which of the following statements is (are) true? The values of C are uniquely determined by the values of A. The values of A are uniquely determined by the values of C. (a) None (b) II only (c) I only (d) I and II Correct answer is (a) 5. Which of the following problems can be caused by data redundancy in a relational schema? Inefficient use of space Update anomalies and possible loss of data Inefficient use of processing time (a) I and II only (b) I and III only (c) I, II, and III (d) II only Correct answer is (c) 6. Consider a table with atomic attributes A, B, and C and the following functional dependencies. A -> B B -> C If the primary key of this table is attribute A, then this relation satisfies which of the following normal forms? First Second Third (a) None (b) I only (c) I, II and III (d) I and II only Correct answer is (d) 7. For a relation to be in 3NF, it should not contain _____ attribute that is transitively dependent on _____. (a) a non-primary key, a foreign key (b) a primary key, a non-primary key (c) a primary key, a foreign key (d) a non-primary key, the primary key Correct answer is (d) 8. The FD X -> Y is a full dependency in a relation R, if there is _____ attribute A that can be _____ X and the dependency still holds. (a) no, added to (b) no, removed from (c) at least one, removed from (d) at least one, added to Correct answer is (b) 9. For a relation to be in 2NF, _____ attribute must be fully functionally dependent on _____. (a) every non-primary-key, the primary key (b) every alternate key, the primary key (c) every non-key, every key (d) every non-key, at least one key Correct answer is (a) 10. The FD X -> Y is a partial dependency in a relation R, if there is _____ attribute A that can be _____ X and the dependency still holds. (a) at least one, removed from (b) at least one, added to (c) no, added to (d) no, removed from Correct answer is (a) 1. Through normalization, update anomalies (a) can be eliminated (b) is usually left unchanged (c) can be minimized but not eliminated (d) can be maximized Correct answer is (a) 2. Consider the following functional dependency. {A, B} -> {C} Regarding this dependency, which of the following statements is (are) true? The values of C are uniquely determined by the values of A. The values of A are uniquely determined by the values of C. (a) None (b) I and II (c) I only (d) II only Correct answer is (a) 3. Which of the following is a property (are properties) exhibited by good relational schemas? The use of null values in tuples The grouping of as many attributes as possible into one main table The elimination of data redundancy to avoid update anomalies (a) III only (b) None (c) II and III only (d) I and II only Correct answer is (a) 4. Through normalization, data redundancy (a) can be eliminated (b) can be maximized (c) can be minimized but not eliminated (d) are usually left unchanged Correct answer is (a) 5. Which of the following statements concerning normal forms is true? (a) A relation that is in second normal form is also in first normal form. (b) Each normal form contains a state of independent properties, unrelated to other normal forms. (c) Schemas that are in second normal form are considered the best. (d) The lower the normal form number, the better the schema design is. Correct answer is (a) 6. For a relation to be in 3NF, it should not contain _____ attribute that is transitively dependent on _____. (a) a primary key, a foreign key (b) a primary key, a non-primary key (c) a non-primary key, a foreign key (d) a non-primary key, the primary key Correct answer is (d) 7. The FD X -> Y is a full dependency in a relation R, if there is _____ attribute A that can be _____ X and the dependency still holds. (a) no, removed from (b) at least one, removed from (c) at least one, added to (d) no, added to Correct answer is (a) 8. Consider a table with atomic attributes A, B, and C and the following functional dependencies. A -> B B -> C If the primary key of this table is attribute A, then this relation satisfies which of the following normal forms? First Second Third (a) I, II and III (b) None (c) I and II only (d) I only Correct answer is (c) 9. For a relation to be in 2NF, _____ attribute must be fully functionally dependent on _____. (a) every alternate key, the primary key (b) every non-key, at least one key (c) every non-key, every key (d) every non-primary-key, the primary key Correct answer is (d) 10. The FD X -> Y is a partial dependency in a relation R, if there is _____ attribute A that can be _____ X and the dependency still holds. (a) no, added to (b) no, removed from (c) at least one, added to (d) at least one, removed from Correct answer is (d) 1. What is an identifying owner in an ER model? (a) The entity upon which a weak entity's existence depends (b) The relationship that identifies a weak entity's owner (c) The relationship that identifies a strong entity's owner (d) The entity upon which a strong entity's existence depends Correct answer is (a) 2. In an ER model, the cardinality ratio of a relationship type is (a) the minimum number of entities that can participate in that relationship type (b) the number of instances of relationships of that relationship type (c) the number of entity types involved in that relationship type (d) the number of relationships of that relationship type in which an entity can participate Correct answer is (d) 3. In the Entity-Relationship model, properties that characterize entities and relationships are modeled as (a) entity types (b) participation constraints (c) weak entities (d) attributes Correct answer is (d) 4. In an ER model, what is a recursive relationship type? (a) A never-ending type of relationship (b) The relationship type where the related entities are one and the same (c) The type of relationship between entities of one entity type (d) The type of relationship that does not belong anywhere Correct answer is (c) 5. In the Entity-Relationship model, a derived attribute is one (a) that characterizes a relationship instead of an entity (b) that may have multiple values simultaneously (c) whose value can be computed from the values of other attributes (d) that is composed of multiple atomic attributes Correct answer is (c) 6. In the Entity-Relationship model, the degree of a relationship specifies which of the following? (a) The number of attributes that characterize the relationship (b) The number of entities that participate in the relationship (c) The cardinality ratio of the relationship (d) The number of integrity constraints required to implement the relationship Correct answer is (b) 7. Which of the following is true about storage for derived attributes? (a) Derived attributes are usually not stored because they can be computed. (b) Derived attributes are usually stored because storage improves retrieval performance. (c) Derived attributes must be stored. (d) Derived attributes must not be stored. Correct answer is (a) 8. In EER modeling, generalization is the process of generating (a) superclasses out of subclasses (b) entities out of attributes (c) subclasses out of superclasses (d) attributes out of entities Correct answer is (a) 9. When mapping from an ER model to a relational model, a strong entity is mapped into a (a) key (b) table (c) row (d) column Correct answer is (b) 10. Which of the following is true about attributes in a relational model? Attributes can be multi-valued. Attributes can be composite. (a) II only (b) I only (c) Both I and II (d) Neither I nor II Correct answer is (d) 1. Which of the following is true about storage for derived attributes? (a) Derived attributes are usually stored because storage improves retrieval performance. (b) Derived attributes must be stored. (c) Derived attributes are usually not stored because they can be computed. (d) Derived attributes must not be stored. Correct answer is (c) 2. In an ER model, the cardinality ratio of a relationship type is (a) the minimum number of entities that can participate in that relationship type (b) the number of entity types involved in that relationship type (c) the number of relationships of that relationship type in which an entity can participate (d) the number of instances of relationships of that relationship type Correct answer is (c) 3. In the Entity-Relationship model, the degree of a relationship specifies which of the following? (a) The number of attributes that characterize the relationship (b) The number of integrity constraints required to implement the relationship (c) The cardinality ratio of the relationship (d) The number of entities that participate in the relationship Correct answer is (d) 4. In the Entity-Relationship model, properties that characterize entities and relationships are modeled as (a) weak entities (b) participation constraints (c) attributes (d) entity types Correct answer is (c) Your score on this question is: 0.00 5. A weak entity type implies a (a) weak relationship type (b) relationship with total participation constraint (c) strong relationship type (d) relationship with partial participation constraint Correct answer is (b) 6. In an ER model, which of the following is true about a component attribute? (a) A component attribute can be a composite attribute. (b) Component attributes must always be combined by an aggregation operation. (c) A component attribute always contains other components. (d) A component attribute is always atomic. Correct answer is (a) 7. In the Entity-Relationship model, a derived attribute is one (a) that characterizes a relationship instead of an entity (b) that is composed of multiple atomic attributes (c) whose value can be computed from the values of other attributes (d) that may have multiple values simultaneously Correct answer is (c) 1. Through normalization, update anomalies (a) is usually left unchanged (b) can be minimized but not eliminated (c) can be maximized (d) can be eliminated Correct answer is (d) 2. Which of the following problems can be caused by data redundancy in a relational schema? Inefficient use of space Update anomalies and possible loss of data Inefficient use of processing time (a) I and II only (b) I and III only (c) II only (d) I, II, and III Correct answer is (d) 3. Consider the following functional dependency. {A, B} -> {C} Regarding this dependency, which of the following statements is (are) true? The values of C are uniquely determined by the values of A. The values of A are uniquely determined by the values of C. (a) I only (b) I and II (c) II only (d) None Correct answer is (d) 4. Which of the following is a property (are properties) exhibited by good relational schemas? The use of null values in tuples The grouping of as many attributes as possible into one main table The elimination of data redundancy to avoid update anomalies (a) III only (b) II and III only (c) I and II only (d) None Correct answer is (a) 5. Which of the following statements concerning normal forms is true? (a) Schemas that are in second normal form are considered the best. (b) Each normal form contains a state of independent properties, unrelated to other normal forms. (c) A relation that is in second normal form is also in first normal form. (d) The lower the normal form number, the better the schema design is. Correct answer is (c) 6. The FD X -> Y is a partial dependency in a relation R, if there is _____ attribute A that can be _____ X and the dependency still holds. (a) at least one, added to (b) at least one, removed from (c) no, removed from (d) no, added to Correct answer is (b) 7. For a relation to be in 2NF, _____ attribute must be fully functionally dependent on _____. (a) every non-primary-key, the primary key (b) every non-key, at least one key (c) every non-key, every key (d) every alternate key, the primary key Correct answer is (a) 8. Consider a table with atomic attributes A, B, and C and the following functional dependencies. A -> B B -> C If the primary key of this table is attribute A, then this relation satisfies which of the following normal forms? First Second Third (a) I only (b) None (c) I and II only (d) I, II and III Correct answer is (c) 9. The FD X -> Y is a full dependency in a relation R, if there is _____ attribute A that can be _____ X and the dependency still holds. (a) no, removed from (b) at least one, removed from (c) at least one, added to (d) no, added to Correct answer is (a) 10. For a relation to be in 3NF, it should not contain _____ attribute that is transitively dependent on _____. (a) a primary key, a foreign key (b) a non-primary key, a foreign key (c) a non-primary key, the primary key (d) a primary key, a non-primary key Correct answer is (c) 1. Which of the following statements concerning normal forms is true? (a) The lower the normal form number, the better the schema design is. (b) A relation that is in second normal form is also in first normal form. (c) Schemas that are in second normal form are considered the best. (d) Each normal form contains a state of independent properties, unrelated to other normal forms. Correct answer is (b) 2. Consider the following functional dependency. {A, B} -> {C} Regarding this dependency, which of the following statements is (are) true? The values of C are uniquely determined by the values of A. The values of A are uniquely determined by the values of C. (a) I only (b) II only (c) I and II (d) None Correct answer is (d) 3. Which of the following problems can be caused by data redundancy in a relational schema? Inefficient use of space Update anomalies and possible loss of data Inefficient use of processing time (a) I, II, and III (b) I and II only (c) I and III only (d) II only Correct answer is (a) Y 4. Through normalization, update anomalies (a) can be eliminated (b) can be maximized (c) is usually left unchanged (d) can be minimized but not eliminated Correct answer is (a) 5. Which of the following is a property (are properties) exhibited by good relational schemas? The use of null values in tuples The grouping of as many attributes as possible into one main table The elimination of data redundancy to avoid update anomalies (a) I and II only (b) III only (c) None (d) II and III only Correct answer is (b) 6. Consider a table with atomic attributes A, B, and C and the following functional dependencies. A -> B B -> C If the primary key of this table is attribute A, then this relation satisfies which of the following normal forms? First Second Third (a) I and II only (b) I only (c) I, II and III (d) None Correct answer is (a) 7. For a relation to be in 3NF, it should not contain _____ attribute that is transitively dependent on _____. (a) a non-primary key, a foreign key (b) a primary key, a foreign key (c) a primary key, a non-primary key (d) a non-primary key, the primary key Correct answer is (d) 8. The FD X -> Y is a partial dependency in a relation R, if there is _____ attribute A that can be _____ X and the dependency still holds. (a) at least one, added to (b) no, removed from (c) no, added to (d) at least one, removed from Correct answer is (d) 9. For a relation to be in 2NF, _____ attribute must be fully functionally dependent on _____. (a) every non-primary-key, the primary key (b) every alternate key, the primary key (c) every non-key, every key (d) every non-key, at least one key Correct answer is (a) 10. The FD X -> Y is a full dependency in a relation R, if there is _____ attribute A that can be _____ X and the dependency still holds. (a) no, added to (b) at least one, removed from (c) at least one, added to (d) no, removed from Correct answer is (d) 1. In an ER model, which of the following is true about a composite attribute? (a) A composite attribute can have a method attached to it. (b) A composite attribute cannot be broken into more basic attributes. (c) A composite attribute can be broken into more basic attributes. (d) A composite attribute can only be designed by users with special privileges. Correct answer is (c) 2. The term physical data independence refers to the ability to change (a) the physical layout of the data without changing the external schemas, the conceptual schemas, or the application programs (b) the data without physically relocating the tables (c) the conceptual schema without changing the application programs (d) the application programs without changing the conceptual schema Correct answer is (a) 3. What attributes does a subclass have? (a) None of the attributes of its superclass (b) All the attributes of its superclass, and possibly more (c) Just the attributes from the superclass (d) A subset of the attributes of its superclass Correct answer is (b) 4. If X -> Y, which of the following would make Y fully dependent on X? (a) Y is a single attribute (b) X is a single attribute (c) X consists of multiple attributes (d) Y consists of multiple attributes Correct answer is (b) 5. In an ER model, what is the degree of a relationship type? (a) The validity of the relationship type (b) The strength of the relationship type (c) The number of entity types participating in the relationship type (d) The number of instances of the relationship type Correct answer is (c) 6. Database design typically consists of which of the following phases? Conceptual design Logical design Physical design (a) II only (b) I, II, and III (c) II and III only (d) I only Correct answer is (b) 7. A relational schema is in first normal form, if the domain of all of its (a) primary keys are not multi-valued (b) primary keys and alternate keys are not multi-valued (c) primary keys are not composite (d) attributes can take on only atomic values Correct answer is (d) 8. In an ER model, a derived attribute is one whose values (a) have been derived at some time in the past (b) can be derived from the values of some other attributes (c) can be derived from the system tables (d) can be derived from another table Correct answer is (b) 9. Y is transitively dependent on X, if (a) X -> Y and A -> Y (b) X -> A, B and A -> Y (c) X -> Y and Y -> A (d) X -> A, B and Y -> A, B Correct answer is (b) 10. Relationships in an ER model are primarily translated to which of the following in a relational model? (a) relationships (b) primary keys and foreign keys (c) three-way tables (d) dummy relationship tables Correct answer is (b) View Assessment Result With Query By Example, a user enters a query by (a) filling in skeleton tables of the database with examples of what is to be retrieved (b) placing SQL keywords, such as select, under the column names they want to retrieve (c) writing an English description of the data that the user needs (d) typing a syntactically correct SQL query that uses column and table names similar to the correct column and table names in a database F Your performance was as follows: You took 2 minutes on this assessment from Tue Mar 17 05:22:13 UTC+0800 2009 to Tue Mar 17 05:24:13 UTC+0800 2009. Total score: 100.00 1. An E-Commerce system consists of the following components. Which of the same components must be included in a database management system? 1 The data, such as information about the goods available for sale, customers, orders placed, shipping information, etc. 2 A collection of programs must be included that control the data, such as programs to create, maintain, and manipulate the data. These programs can be easily used to create, maintain, and manipulate data in other domains, such as in a library information system. 3 A collection of programs that operate on the data, but are specific to the E-commerce system. These programs enable users to browse through the store-items, place orders, track shipping, etc. (a) II only (b) I, II, and III (c) I only (d) II and III only Correct answer is (a) Your score on this question is: 14.29 Feedback: A DBMS refers to just the set of general-purpose programs to control data. (a) 2. An E-Commerce system consists of the following components. Which of these same components will constitute a database system? 4 The data, such as information about the goods available for sale, customers, orders placed, shipping information, etc. 5 A collection of programs that control the data, such as programs to create, maintain, and manipulate the data constitutes a database system. These programs can be easily used to create, maintain, and manipulate data in other domains such as in a library information system. 6 A collection of programs that operate on the data, but are specific to the E-commerce system, constitutes a database system. These programs enable users to browse through the store-items, place orders, track shipping, etc. (a) I only (b) I, II, and III (c) I and II only (d) II only Correct answer is (b) Your score on this question is: 14.29 Feedback: A database system includes the data, the DBMS, and the application-specific programs that operate on that data. (b) 3. An E-Commerce system consists of the following components. Which of these same components must be included in a database? 7 The data, such as information about the goods available for sale, customers, orders placed, shipping information, etc. 8 A database must include a collection of programs that control the data, such as programs to create, maintain, and manipulate the data. These programs can be easily used to create, maintain, and manipulate data in other domains. 9 A database must include a collection of programs that operate on the data, but are specific to the E-commerce system. These programs enable users to browse through the store-items, place orders, track shipping, etc. (a) I and II only (b) I only (c) II only (d) I, II, and III Correct answer is (b) Your score on this question is: 14.29 Feedback: Database refers to just the data (b) 4. An E-Commerce database contains data about customers, products, orders, system response times, etc. Which of the following can be specified as integrity constraints in an E-Commerce database system? 10 No two products can have the same product ID. 11 The DBMS response time for all Web requests should be at most 2 seconds. 12 A customer order cannot have more than one shipping address. (a) I and III only (b) I and II only (c) I only (d) I, II, and III Correct answer is (a) Your score on this question is: 14.29 Feedback: The constraints I, II and III specify the application semantics of the data captured in the E-Commerce database. Constraint II, although it seems contrary to common sense, is not something that can be prohibited by the DBMS because the DBMS is general purpose. The response time of the DBMS cannot be enforced by the DBMS. It depends on factors such the processor speed, memory available, etc. (a) 5. In a database system, whose responsibility is it to provide data consistency? (a) the user's (b) the application programmer's (c) the DBMS's (d) the database administrator's Correct answer is (c) Your score on this question is: 14.29 Feedback: (c) 6. A database is needed for which of the following application scenarios? 13 A video store that needs to keep track of data about members, about videos carried by the store, about videos rented by members, as well as data concerning borrow-date, return-date, and payment information. 14 In the human resources department of a company, information about employees, their titles, their salaries and sick days, and about vacation days taken by each employee. 15 A computer-simulated video game which needs to calculate and display, the physical (x, y) location of each actor in the game, the speed with which they are moving at the current instant, the direction in which they are moving, the action they are performing, the angle at which the game-player is viewing the scene. (a) I only (b) I, II, and III (c) I and II only (d) I and III only Correct answer is (c) Your score on this question is: 14.29 Feedback: (c) 7. The physical storage structure will be _____ to the application programmer in a database approach, and will be _____ to the application programmer in a file system approach. (a) hidden, hidden (b) hidden, visible (c) visible, visible (d) visible, hidden Correct answer is (b) Your score on this question is: 14.29 Feedback: The layer of abstraction offered by a DBMS hides the physical storage structure from the application programmer. (b) Go to top of assessment. Total score: 100.00 Your performance was as follows: You took 3 minutes on this assessment from Tue Mar 17 04:27:27 UTC+0800 2009 to Tue Mar 17 04:30:02 UTC+0800 2009. Total score: 85.71 1. An E-Commerce system consists of the following components. Which of these same components must be included in a database? 1 The data, such as information about the goods available for sale, customers, orders placed, shipping information, etc. 2 A database must include a collection of programs that control the data, such as programs to create, maintain, and manipulate the data. These programs can be easily used to create, maintain, and manipulate data in other domains. 3 A database must include a collection of programs that operate on the data, but are specific to the E-commerce system. These programs enable users to browse through the store-items, place orders, track shipping, etc. (a) II only (b) I and II only (c) I only (d) I, II, and III Correct answer is (c) Your score on this question is: 14.29 Feedback: Database refers to just the data (c) 2. In a database system, whose responsibility is it to provide data consistency? (a) the database administrator's (b) the user's (c) the application programmer's (d) the DBMS's Correct answer is (d) Your score on this question is: 14.29 Feedback: (d) 3. An E-Commerce system consists of the following components. Which of these same components will constitute a database system? 4 The data, such as information about the goods available for sale, customers, orders placed, shipping information, etc. 5 A collection of programs that control the data, such as programs to create, maintain, and manipulate the data constitutes a database system. These programs can be easily used to create, maintain, and manipulate data in other domains such as in a library information system. 6 A collection of programs that operate on the data, but are specific to the E-commerce system, constitutes a database system. These programs enable users to browse through the store-items, place orders, track shipping, etc. (a) I, II, and III (b) I only (c) I and II only (d) II only Correct answer is (a) Your score on this question is: 14.29 Feedback: A database system includes the data, the DBMS, and the application-specific programs that operate on that data. (a) 4. An E-Commerce system consists of the following components. Which of the same components must be included in a database management system? 7 The data, such as information about the goods available for sale, customers, orders placed, shipping information, etc. 8 A collection of programs must be included that control the data, such as programs to create, maintain, and manipulate the data. These programs can be easily used to create, maintain, and manipulate data in other domains, such as in a library information system. 9 A collection of programs that operate on the data, but are specific to the E-commerce system. These programs enable users to browse through the store-items, place orders, track shipping, etc. (a) I only (b) I, II, and III (c) II only (d) II and III only Correct answer is (c) Your score on this question is: 0.00 Feedback: A DBMS refers to just the set of general-purpose programs to control data. (d) 5. An E-Commerce database contains data about customers, products, orders, system response times, etc. Which of the following can be specified as integrity constraints in an E-Commerce database system? 10 No two products can have the same product ID. 11 The DBMS response time for all Web requests should be at most 2 seconds. 12 A customer order cannot have more than one shipping address. (a) I, II, and III (b) I only (c) I and II only (d) I and III only Correct answer is (d) Your score on this question is: 14.29 Feedback: The constraints I, II and III specify the application semantics of the data captured in the E-Commerce database. Constraint II, although it seems contrary to common sense, is not something that can be prohibited by the DBMS because the DBMS is general purpose. The response time of the DBMS cannot be enforced by the DBMS. It depends on factors such the processor speed, memory available, etc. (d) 6. A database is needed for which of the following application scenarios? 13 A video store that needs to keep track of data about members, about videos carried by the store, about videos rented by members, as well as data concerning borrow-date, return-date, and payment information. 14 In the human resources department of a company, information about employees, their titles, their salaries and sick days, and about vacation days taken by each employee. 15 A computer-simulated video game which needs to calculate and display, the physical (x, y) location of each actor in the game, the speed with which they are moving at the current instant, the direction in which they are moving, the action they are performing, the angle at which the game-player is viewing the scene. (a) I and II only (b) I only (c) I, II, and III (d) I and III only Correct answer is (a) Your score on this question is: 14.29 Feedback: (a) 7. The physical storage structure will be _____ to the application programmer in a database approach, and will be _____ to the application programmer in a file system approach. (a) visible, hidden (b) hidden, hidden (c) hidden, visible (d) visible, visible Correct answer is (c) Your score on this question is: 14.29 Feedback: The layer of abstraction offered by a DBMS hides the physical storage structure from the application programmer. (c) Go to top of assessment. Total score: 85.71 Total score: 42.86 1. An E-Commerce system consists of the following components. Which of these same components must be included in a database? 1 The data, such as information about the goods available for sale, customers, orders placed, shipping information, etc. 2 A database must include a collection of programs that control the data, such as programs to create, maintain, and manipulate the data. These programs can be easily used to create, maintain, and manipulate data in other domains. 3 A database must include a collection of programs that operate on the data, but are specific to the E-commerce system. These programs enable users to browse through the store-items, place orders, track shipping, etc. (a) I and II only (b) I only (c) II only (d) I, II, and III Correct answer is (b) Your score on this question is: 14.29 Feedback: Database refers to just the data (b) 2. In a database system, whose responsibility is it to provide data consistency? (a) the DBMS's (b) the user's (c) the application programmer's (d) the database administrator's Correct answer is (a) Your score on this question is: 0.00 Feedback: (d) 3. An E-Commerce system consists of the following components. Which of these same components will constitute a database system? 4 The data, such as information about the goods available for sale, customers, orders placed, shipping information, etc. 5 A collection of programs that control the data, such as programs to create, maintain, and manipulate the data constitutes a database system. These programs can be easily used to create, maintain, and manipulate data in other domains such as in a library information system. 6 A collection of programs that operate on the data, but are specific to the E-commerce system, constitutes a database system. These programs enable users to browse through the store-items, place orders, track shipping, etc. (a) II only (b) I and II only (c) I, II, and III (d) I only Correct answer is (c) Your score on this question is: 0.00 Feedback: A database system includes the data, the DBMS, and the application-specific programs that operate on that data. (a) 4. An E-Commerce system consists of the following components. Which of the same components must be included in a database management system? 7 The data, such as information about the goods available for sale, customers, orders placed, shipping information, etc. 8 A collection of programs must be included that control the data, such as programs to create, maintain, and manipulate the data. These programs can be easily used to create, maintain, and manipulate data in other domains, such as in a library information system. 9 A collection of programs that operate on the data, but are specific to the E-commerce system. These programs enable users to browse through the store-items, place orders, track shipping, etc. (a) I, II, and III (b) II only (c) I only (d) II and III only Correct answer is (b) Your score on this question is: 0.00 Feedback: A DBMS refers to just the set of general-purpose programs to control data. (d) 5. An E-Commerce database contains data about customers, products, orders, system response times, etc. Which of the following can be specified as integrity constraints in an E-Commerce database system? 10 No two products can have the same product ID. 11 The DBMS response time for all Web requests should be at most 2 seconds. 12 A customer order cannot have more than one shipping address. (a) I only (b) I and III only (c) I and II only (d) I, II, and III Correct answer is (b) Your score on this question is: 0.00 Feedback: The constraints I, II and III specify the application semantics of the data captured in the E-Commerce database. Constraint II, although it seems contrary to common sense, is not something that can be prohibited by the DBMS because the DBMS is general purpose. The response time of the DBMS cannot be enforced by the DBMS. It depends on factors such the processor speed, memory available, etc. (d) 6. A database is needed for which of the following application scenarios? 13 A video store that needs to keep track of data about members, about videos carried by the store, about videos rented by members, as well as data concerning borrow-date, return-date, and payment information. 14 In the human resources department of a company, information about employees, their titles, their salaries and sick days, and about vacation days taken by each employee. 15 A computer-simulated video game which needs to calculate and display, the physical (x, y) location of each actor in the game, the speed with which they are moving at the current instant, the direction in which they are moving, the action they are performing, the angle at which the game-player is viewing the scene. (a) I only (b) I and II only (c) I, II, and III (d) I and III only Correct answer is (b) Your score on this question is: 14.29 Feedback: (b) 7. The physical storage structure will be _____ to the application programmer in a database approach, and will be _____ to the application programmer in a file system approach. (a) visible, visible (b) visible, hidden (c) hidden, visible (d) hidden, hidden Correct answer is (c) Your score on this question is: 14.29 Feedback: The layer of abstraction offered by a DBMS hides the physical storage structure from the application programmer. (c) Go to top of assessment. The arity of a table is the number of _____ in the table. (a) rows (b) columns (c) keys (d) foreign keys Correct answer is (b) Your score on this question is: 10.00 Feedback: 2. The cardinality of a table is the number of _____ in the table. (a) rows (b) foreign keys (c) keys (d) columns Correct answer is (a) Your score on this question is: 10.00 Feedback: 3. The degree of a table is the number of _____ in the table. (a) rows (b) columns (c) foreign keys (d) keys Correct answer is (b) Your score on this question is: 10.00 Feedback: 4. The foreign key in a table T1 _____ the same _____ as the corresponding primary key in table T2. 1 must have, name 2 need not have, name 3 must have, domain (a) I and III (b) II and III (c) I, II, and III (d) I and II Correct answer is (b) Your score on this question is: 10.00 Feedback: 5. The SQL clause to perform a set UNION operation is (a) MELD (b) UNITE (c) UNION (d) COMBINE Correct answer is (c) Your score on this question is: 10.00 Feedback: 6. DML is used to (a) manipulate the structure of database applications. (b) add/modify/delete data in the database. (c) specify the structure of a database. (d) add and delete tables. Correct answer is (b) Your score on this question is: 10.00 Feedback: 7. DDL is used to (a) specify the structure of a database. (b) add contents to tables. (c) access the contents of tables. (d) define the structure of database applications. Correct answer is (a) Your score on this question is: 10.00 Feedback: 8. Which of the following SQL statements can be used to create a relational table? (a) APPEND (b) CREATE (c) ADD (d) INSERT Correct answer is (b) Your score on this question is: 10.00 Feedback: 9. Which of the following SQL statements can be used to modify just one row (out of many rows) in a table? (a) CHANGE (b) UPDATE (c) ALTER (d) MODIFY Correct answer is (b) Your score on this question is: 0.00 Feedback: 10. The term query by example refers to (a) a visual query language developed by IBM (b) a query for SQL examples (c) example SQL queries provided by the DBMS that users can modify to suit their current needs (d) example SQL queries provided by other users that can be modified to suit current needs Correct answer is (a) Your score on this question is: 10.00 Feedback: See section 1.2.3 in the course notes. Your performance was as follows: You took 4 minutes on this assessment from Wed Mar 29 08:46:41 UTC+0800 2006 to Wed Mar 29 08:50:36 UTC+0800 2006. Total score: 90.00 1. What information is necessary when specifying the structure of a table? (a) the name of the table, the names of the table's attributes, the data types of attributes, and the formats of attributes (b) the name of the table, the names of the table's attributes, the data types of the table's attributes, the formats of the table's attributes, and the maximum number of rows that the table can have (c) the name of the table and the names of the table's attributes (d) the name of the table and the amount of storage space to be allocated to the table Correct answer is (a) Your score on this question is: 0.00 Feedback: 2. The cardinality of a table is the number of _____ in the table. (a) columns (b) foreign keys (c) rows (d) keys Correct answer is (c) Your score on this question is: 10.00 Feedback: 3. The arity of a table is the number of _____ in the table. (a) foreign keys (b) keys (c) rows (d) columns Correct answer is (d) Your score on this question is: 10.00 Feedback: 4. The degree of a table is the number of _____ in the table. (a) rows (b) foreign keys (c) columns (d) keys Correct answer is (c) Your score on this question is: 10.00 Feedback: 5. A difference operation can be applied to tables that (a) are union compatible (b) have the same name (c) are the same size (d) have the same column names Correct answer is (a) Your score on this question is: 10.00 Feedback: 6. Which of the following SQL statements can be used to remove a row from a table? (a) DESTROY (b) DELETE (c) ERASE (d) REMOVE Correct answer is (b) Your score on this question is: 10.00 Feedback: 7. DML is used to (a) add/modify/delete data in the database. (b) add and delete tables. (c) manipulate the structure of database applications. (d) specify the structure of a database. Correct answer is (a) Your score on this question is: 10.00 Feedback: 8. A deletion operation will _____ if the deletion leads to the violation of a referential integrity constraint. (a) fail (b) succeed with warning (c) succeed without warning (d) crash the system Correct answer is (a) Your score on this question is: 10.00 Feedback: 9. DDL is used to (a) access the contents of tables. (b) add contents to tables. (c) define the structure of database applications. (d) specify the structure of a database. Correct answer is (d) Your score on this question is: 10.00 Feedback: 10. With Query By Example, a user enters a query by (a) writing an English description of the data that the user needs (b) typing a syntactically correct SQL query that uses column and table names similar to the correct column and table names in a database (c) filling in skeleton tables of the database with examples of what is to be retrieved (d) placing SQL keywords, such as select, under the column names they want to retrieve Correct answer is (c) Your score on this question is: 10.00 1. What information is necessary when specifying the structure of a table? (a) the name of the table, the names of the table's attributes, the data types of attributes, and the formats of attributes (b) the name of the table, the names of the table's attributes, the data types of the table's attributes, the formats of the table's attributes, and the maximum number of rows that the table can have (c) the name of the table and the names of the table's attributes (d) the name of the table and the amount of storage space to be allocated to the table Correct answer is (a) Your score on this question is: 0.00 Feedback: 2. The cardinality of a table is the number of _____ in the table. (a) columns (b) foreign keys (c) rows (d) keys Correct answer is (c) Your score on this question is: 10.00 Feedback: 3. The arity of a table is the number of _____ in the table. (a) foreign keys (b) keys (c) rows (d) columns Correct answer is (d) Your score on this question is: 10.00 Feedback: 4. The degree of a table is the number of _____ in the table. (a) rows (b) foreign keys (c) columns (d) keys Correct answer is (c) Your score on this question is: 10.00 Feedback: 5. A difference operation can be applied to tables that (a) are union compatible (b) have the same name (c) are the same size (d) have the same column names Correct answer is (a) Your score on this question is: 10.00 Feedback: 6. Which of the following SQL statements can be used to remove a row from a table? (a) DESTROY (b) DELETE (c) ERASE (d) REMOVE Correct answer is (b) Your score on this question is: 10.00 Feedback: 7. DML is used to (a) add/modify/delete data in the database. (b) add and delete tables. (c) manipulate the structure of database applications. (d) specify the structure of a database. Correct answer is (a) Your score on this question is: 10.00 Feedback: 8. A deletion operation will _____ if the deletion leads to the violation of a referential integrity constraint. (a) fail (b) succeed with warning (c) succeed without warning (d) crash the system Correct answer is (a) Your score on this question is: 10.00 Feedback: 9. DDL is used to (a) access the contents of tables. (b) add contents to tables. (c) define the structure of database applications. (d) specify the structure of a database. Correct answer is (d) Your score on this question is: 10.00 Feedback: 10. With Query By Example, a user enters a query by (a) writing an English description of the data that the user needs (b) typing a syntactically correct SQL query that uses column and table names similar to the correct column and table names in a database (c) filling in skeleton tables of the database with examples of what is to be retrieved (d) placing SQL keywords, such as select, under the column names they want to retrieve Correct answer is (c) The cardinality of a table is the number of _____ in the table. (a) rows (b) keys (c) foreign keys (d) columns Correct answer is (a) Your score on this question is: 10.00 Feedback: 2. The foreign key in a table T1 _____ the same _____ as the corresponding primary key in table T2. 1 must have, name 2 need not have, name 3 must have, domain (a) I and II (b) I, II, and III (c) II and III (d) I and III Correct answer is (c) Your score on this question is: 10.00 Feedback: 3. What information is necessary when specifying the structure of a table? (a) the name of the table and the names of the table's attributes (b) the name of the table, the names of the table's attributes, the data types of attributes, and the formats of attributes (c) the name of the table, the names of the table's attributes, the data types of the table's attributes, the formats of the table's attributes, and the maximum number of rows that the table can have (d) the name of the table and the amount of storage space to be allocated to the table Correct answer is (b) Your score on this question is: 10.00 Feedback: 4. The arity of a table is the number of _____ in the table. (a) columns (b) foreign keys (c) keys (d) rows Correct answer is (a) Your score on this question is: 10.00 Feedback: 5. A difference operation can be applied to tables that (a) are union compatible (b) are the same size (c) have the same name (d) have the same column names Correct answer is (a) Your score on this question is: 10.00 Feedback: 6. What can be specified in the selection condition of a SELECT statement? (a) a Boolean operation (b) an arithmetic operation (c) the conditions under which the statement should be executed (d) the time at which the selection should be performed Correct answer is (a) Your score on this question is: 0.00 Feedback: 7. The SQL clause to perform a set UNION operation is (a) MELD (b) UNION (c) UNITE (d) COMBINE Correct answer is (b) Your score on this question is: 10.00 Feedback: 8. Which of the following SQL statements can be used to add a row to a table? (a) APPEND (b) CREATE (c) ADD (d) INSERT Correct answer is (d) Your score on this question is: 10.00 Feedback: 9. A join operation joins _____ tables into _____. (a) two, one (b) four, two (c) three, one (d) three, two Correct answer is (a) Your score on this question is: 10.00 Feedback: 10. With Query By Example, a user enters a query by (a) placing SQL keywords, such as select, under the column names they want to retrieve (b) writing an English description of the data that the user needs (c) typing a syntactically correct SQL query that uses column and table names similar to the correct column and table names in a database (d) filling in skeleton tables of the database with examples of what is to be retrieved Correct answer is (d) Your score on this question is: 10.00 The degree of a table is the number of _____ in the table. (a) foreign keys (b) columns (c) rows (d) keys Correct answer is (b) Your score on this question is: 10.00 Feedback: 2. The arity of a table is the number of _____ in the table. (a) rows (b) keys (c) columns (d) foreign keys Correct answer is (c) Your score on this question is: 10.00 Feedback: 3. What information is necessary when specifying the structure of a table? (a) the name of the table and the amount of storage space to be allocated to the table (b) the name of the table and the names of the table's attributes (c) the name of the table, the names of the table's attributes, the data types of the table's attributes, the formats of the table's attributes, and the maximum number of rows that the table can have (d) the name of the table, the names of the table's attributes, the data types of attributes, and the formats of attributes Correct answer is (d) Your score on this question is: 10.00 Feedback: 4. The cardinality of a table is the number of _____ in the table. (a) foreign keys (b) columns (c) keys (d) rows Correct answer is (d) Your score on this question is: 10.00 Feedback: 5. DML is used to (a) specify the structure of a database. (b) add and delete tables. (c) manipulate the structure of database applications. (d) add/modify/delete data in the database. Correct answer is (d) Your score on this question is: 10.00 Feedback: 6. The SQL clause to perform a set UNION operation is (a) COMBINE (b) UNION (c) UNITE (d) MELD Correct answer is (b) Your score on this question is: 10.00 Feedback: 7. Which of the following SQL statements can be used to create a relational table? (a) ADD (b) APPEND (c) CREATE (d) INSERT Correct answer is (c) Your score on this question is: 10.00 Feedback: 8. DDL is used to (a) access the contents of tables. (b) specify the structure of a database. (c) add contents to tables. (d) define the structure of database applications. Correct answer is (b) Your score on this question is: 10.00 Feedback: 9. What can be specified in the selection condition of a SELECT statement? (a) the time at which the selection should be performed (b) an arithmetic operation (c) the conditions under which the statement should be executed (d) a Boolean operation Correct answer is (d) Your score on this question is: 10.00 Feedback: 10. The term query by example refers to (a) a query for SQL examples (b) example SQL queries provided by other users that can be modified to suit current needs (c) a visual query language developed by IBM (d) example SQL queries provided by the DBMS that users can modify to suit their current needs Correct answer is (c) Your score on this question is: 10.00 Feedback: See section 1.2.3 in the course notes. Go to top of assessment. Your performance was as follows: 1. What information is necessary when specifying the structure of a table? (a) the name of the table, the names of the table's attributes, the data types of attributes, and the formats of attributes (b) the name of the table and the amount of storage space to be allocated to the table (c) the name of the table and the names of the table's attributes (d) the name of the table, the names of the table's attributes, the data types of the table's attributes, the formats of the table's attributes, and the maximum number of rows that the table can have Correct answer is (a) Your score on this question is: 10.00 Feedback: (a) 2. The foreign key in a table T1 _____ the same _____ as the corresponding primary key in table T2. 1 must have, name 2 need not have, name 3 must have, domain (a) I and II (b) II and III (c) I and III (d) I, II, and III Correct answer is (b) Your score on this question is: 10.00 Feedback: (b) 3. The arity of a table is the number of _____ in the table. (a) foreign keys (b) rows (c) keys (d) columns Correct answer is (d) Your score on this question is: 10.00 Feedback: (d) 4. The cardinality of a table is the number of _____ in the table. (a) keys (b) columns (c) rows (d) foreign keys Correct answer is (c) Your score on this question is: 10.00 Feedback: (c) 5. Which of the following SQL statements can be used to create a relational table? (a) INSERT (b) ADD (c) CREATE (d) APPEND Correct answer is (c) Your score on this question is: 10.00 Feedback: (c) 6. The SQL clause to perform a set difference operation is (a) EXCEPT (b) OMIT (c) DIFFER (d) REJECT Correct answer is (a) Your score on this question is: 10.00 Feedback: (a) 7. Which of the following SQL statements can be used to remove a row from a table? (a) ERASE (b) REMOVE (c) DESTROY (d) DELETE Correct answer is (d) Your score on this question is: 10.00 Feedback: (d) 8. Which of the following SQL statements can be used to add a row to a table? (a) ADD (b) APPEND (c) CREATE (d) INSERT Correct answer is (d) Your score on this question is: 10.00 Feedback: (d) 9. What can be specified in the selection condition of a SELECT statement? (a) the time at which the selection should be performed (b) a Boolean operation (c) an arithmetic operat

604

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder VCL组件使用和开发
社区管理员
  • VCL组件使用和开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧