Database_System_Concepts_5th_ed_-_Solutions

Database_System_Concepts_5th_ed_-_Solutions - CHAPTER 1...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
CHAPTER 1 Introduction Solutions to Practice Exercises 1.1 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 Programming language classiFcation: Procedural: C, C++, Java, Basic, ±ortran, Cobol, Pascal Non-procedural: Lisp and Prolog Note: Lisp and Prolog support some procedural constructs, but the core of both these languages is non-procedural. In theory, non-procedural languages are easier to learn, because they let the programmer concentrate on what needs to be done, rather than how to do it. This is not always true in practice, especially if procedural languages are learned Frst. 1.3 Six major steps in setting up a database for a particular enterprise are: DeFne the high level requirements of the enterprise (this step generates a document known as the system requirements speciFcation.) DeFne a model containing all appropriate types of data and data relation- ships. DeFne the integrity constraints on the data. DeFne the physical level. ±or each known problem to be solved on a regular basis (e.g., tasks to be carried out by clerks or Web users) deFne a user interface to carry out the task, and write the necessary application programs to implement the user interface. 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Chapter 1 Introduction Create/initialize the database. 1.4 Let tgrid be a two-dimensional integer array of size n × m . a. The physical level would simply be m × n (probably consecutive) stor- age locations of whatever size is speciFed by the implementation (e.g., 32 bits each). The conceptual level is a grid of boxes, each possibly containing an in- teger, which is n boxes high by m boxes wide. There are 2 m × n possible views. ±or example, a view might be the entire array, or particular row of the array, or all n rows but only columns 1 through i . b. Consider the following Pascal declarations: type tgrid = array [1. . n ,1. . m ] of integer ; var vgrid1 , vgrid2 : tgrid Then tgrid is a schema, whereas the value of variables vgrid1 and vgrid2 are instances. To illustrate further, consider the schema array [1. .2, 1. .2] of integer .Two instancesofthisschemeare: 1 16 17 90 7 89 412 8
Background image of page 2
CHAPTER 2 Relational Model Solutions to Practice Exercises 2.1 a. Π person name (( employee 1 manages ) 1 ( manager name = employee 2 .person name employee.street = employee 2 .street employee.city = employee 2 .city ) ( ρ employee 2 ( employee ))) b. The following solutions assume that all people work for exactly one com- pany. If one allows people to appear in the database (e.g. in employee )but not appear in works , the problem is more complicated. We give solutions for this more realistic case later. Π person name ( σ company name 6 = “First Bank Corporation” ( works )) If people may not work for any company: Π person name ( employee ) Π person name ( σ ( company name = “First Bank Corporation” ) ( works )) c. Π person name ( works ) works.person name ( works 1 ( works.salary works 2 .salary works 2 .company
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 104

Database_System_Concepts_5th_ed_-_Solutions - CHAPTER 1...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online