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:
1.4 List at least 3 different types of information that a university would maintain, beyond those listed in Section 1.6.2
Answer:
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:
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.