《数据库系统概念》第一章实践习题答案(英文版)

CHAPTER 1

1.1 This chapter has described several major advantages of a database system. What are two disadvantages?

Answer: Two disadvantages associated with database systems are listed below.

    a. Setup of the database system requires more knowledge, money, skills, and time.

    b. The complexity of the database may result in poor performance.

1.2 List five ways in which the type declaration system of a language such as Java or C++ differs from the data definition language used in a data definition language used in a database.

Answer: 

   a. Executing an action in the DDL results in the creation of an object in the database; in contrast, a programming language type declaration is simply an abstraction used in the program.

  b. Database DDLs allows consistency constraints to be specified, which programming language type systems generally do not allow. These include domain constraints and referential integrity constraints.

   c. Database DDLs support authorization, giving different access rights to different users. Programming language type systems do not provide such protection ( at best, they protect attributes in a class from being accessed by methods in another class).

   d. Programming languages type systems are usually much richer than the SQL type system. Most databases support only basic types such as different types of numbers and strings, although some databases do support some complex type such as array, and objects.

   e. A database DDL is focused on specifying types of attributes of relations; in contrast, a programming language allows objects, and collections of objects to be created.

1.3 List six major steps that you would take in setting up a database for a particular enterprise.

Answer: Six major steps in setting up a database for a particular enterprise are:

  • Define the high level requirements of the enterprise (this step generates a document known as the system requirements specification)
  • Define a model containing all appropriate types of  data and data relationships.
  • Define the physical level.
  • For each known problem to be solved on regular basis (e.g., tasks to be carried out by clerks or Web users) define a user interface to carry out the task, and write the necessary application programs to implements the user interface.
  • Create/ initialize the database.

1.4 List at least 3 different types of information that a university would maintain, beyond those listed in Section 1.6.2

Answer:

  • Information about people who are employees of a university but who are not instructors.
  • Library information, including books in the library, and who has issued books.
  • Accounting information including fee payment, scholarships, salaries, and all other kinds of receipts and payments of the university.

1.5 Suppose you want to build a video site similar to YouTube. Consider each of the points listed in Section 1.2, as disadvantages of keeping data in a file-processing system. Discuss the relevance of each of these points to the storage of actual video data, and to metadata about the video, such as title, the user who uploaded it, tags, and which users viewed it.

Answer:

  • Data redundancy and inconsistency. This would be relevant to metadata to some extent, although not to the actual video data, which is not updated. There are very few relationships here, and none of them can lead to redundancy.
  • Difficulty in accessing data. If video data is only accessed through a few predefined interfaces, as is done in video sharing sites today, this will not be a problem. However, if an organization needs to find video data based on specific search conditions (beyond simple key-word queries) if meta data were stored in files it would be hard to find relevant data without writing application programs. Using a database would be important for the task of finding data.
  • Data isolation. Since data is not usually updated, but instead newly created, data isolation is not a major issue. Even the task of keeping track of who has viewed what videos is (conceptually) append only, again making isolation not a major issue. However, if authorization is added, there may be some issues of concurrent upadates to authorization information.
  • Integrity problems. When a video is uploaded, metadata about the video and the video should be added atomically, otherwise  there would be an inconsistency in the data. An underlying recovery mechanism would be required to ensure atomicity in the event of failures.
  • Concurrent-access anomalies. Since data is not updated, concurrent access anomalies would be unlikely to occur.
  • Security problems. These would be a issue if the system supported authorization.

1.6 Keyword queries used in Web search are quite different form database queries. List key differences between the two, in term of the way the queries are specified , an in terms of what is the result of a query.

Answer:    Queries used in the Web are specified by providing a list of keywords with no specific syntax. The result is typically an ordered list of URLs, along with snippets of information about the content of the URLs. In contrast, database queries have a specific syntax allowing complex queries to be specified. And in the relational world the result of a query of a query is always a table.

  • 3
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
数据库系统概念(杨冬青)习题答案Chapter 1 provides a general overview of the nature and purpose of database systems. The most important concept in this chapter is that database systems allow data to be treated at a high level of abstraction. Thus, database systems differsignificantly from the file systemsand general purpose programming environments with which students are already familiar. Another important aspect of the chapter is to provide motivation for the use of database systems as opposed to application programs built on top of file systems. Thus, the chapter motivates what the student will be studying in the rest of the course. The idea of abstraction in database systems deserves emphasis throughout, not just in discussion of Section 1.3. The overview of the structure of databases is, of necessity, rather brief, and is meant only to give the student a rough idea of some of the concepts. The student may not initially be able to fully appreciate the concepts described here, but should be able to do so by the end of the course. The specifics of the E-R, relational, and object-oriented models are covered in later chapters. These models can be used in Chapter 1 to reinforce the concept of abstraction, with syntactic details deferred to later in the course. If students have already had a course in operating systems, it is worthwhile to point out how the OS and DBMS are related. It is useful also to differentiate between concurrency as it is taught in operating systems courses (with an orientation towardsfiles, processes,and physical resources)and database concurrency control (with an orientation towards granularity finer than the file level, recoverable transactions, and resources accessed associatively rather than physically). If students are familiar with a particular operating system, that OS’s approach to concurrent file access may be used for illustration.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值