Docsity

Database Design, Query Formulation, and Administration Using Oracle and PostgreSQL – Solut, Exams of Database Management Systems (DBMS)

Toggle sidebar
bg1
Chapter 1
QUESTIONS
1. Describe a database that you have used on a job or as a consumer. List the
entities and relationships that the database contains. If you are not sure,
imagine the entities and relationships that are contained in the database.
Ans: Students' responses will vary. However, in the example of the
University Database, the entities are students, faculty, courses, offerings, and
enrollments. The relationships are faculty teaches offerings, students enroll in
offerings, offerings made of courses and faculty supervises faculties.
2. For the database in question 1, list different user groups that can use the
database.
Ans: Students' responses will vary. However, some examples of user groups
for the University database are students, faculty, and university staff.
3. For one of the groups in question 2, describe an application (form or report)
that the group uses.
Ans: Students' responses will vary. However, some examples of applications
for the University database are that the user group of student can use the
registration form, transcript (the report of grade). The user group of
university’s staff can use the assignment form. The user group of faculty can
use the report of faculty workload.
4. Explain the persistent property for databases.
Ans: Persistent means that data resides on stable storage such as a magnetic
disk. For example, organizations need to retain data about customers,
suppliers, and inventory on stable storage because these data are repetitively
used. A variable in a computer program is not persistent because it resides in
main memory and disappears after the program terminates. Persistency does
not mean that data lasts forever. When data are no longer relevant (such as a
supplier going out of business), they are removed or archived.
5. Explain the inter-related property for databases.
Ans: Inter-related means that data stored as separate units can be connected to
provide a whole picture. For example, a customer database relates customer
data (name, address, …) to order data (order number, order date, …) to
facilitate order processing. Databases contain both entities and relationships
among entities. An entity is a cluster of data usually about a single topic that
can be accessed together. An entity may denote a person, place, thing, or
event.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Partial preview of the text

Download Database Design, Query Formulation, and Administration Using Oracle and PostgreSQL – Solut and more Exams Database Management Systems (DBMS) in PDF only on Docsity!

Chapter 1 QUESTIONS

1. Describe a database that you have used on a job or as a consumer. List the entities and relationships that the database contains. If you are not sure, imagine the entities and relationships that are contained in the database. Ans: Students' responses will vary. However, in the example of the University Database, the entities are students, faculty, courses, offerings, and enrollments. The relationships are faculty teaches offerings, students enroll in offerings, offerings made of courses and faculty supervises faculties. 2. For the database in question 1, list different user groups that can use the database. Ans: Students' responses will vary. However, some examples of user groups for the University database are students, faculty, and university staff. 3. For one of the groups in question 2, describe an application (form or report) that the group uses. Ans: Students' responses will vary. However, some examples of applications for the University database are that the user group of student can use the registration form, transcript (the report of grade). The user group of university’s staff can use the assignment form. The user group of faculty can use the report of faculty workload. 4. Explain the persistent property for databases. Ans: Persistent means that data resides on stable storage such as a magnetic disk. For example, organizations need to retain data about customers, suppliers, and inventory on stable storage because these data are repetitively used. A variable in a computer program is not persistent because it resides in main memory and disappears after the program terminates. Persistency does not mean that data lasts forever. When data are no longer relevant (such as a supplier going out of business), they are removed or archived. 5. Explain the inter-related property for databases. Ans: Inter-related means that data stored as separate units can be connected to provide a whole picture. For example, a customer database relates customer data (name, address, …) to order data (order number, order date, …) to facilitate order processing. Databases contain both entities and relationships among entities. An entity is a cluster of data usually about a single topic that can be accessed together. An entity may denote a person, place, thing, or event.

6. Explain the shared property for databases. Ans: Shared means that a database can have multiple uses and users. A database provides a common memory for multiple functions in an organization. For example, a personnel database can support payroll calculations, performance evaluations, government reporting requirements, and so on. Many users can use a database at the same time. For example, many customers can simultaneously make airline reservations. Unless two users are trying to change the same part of the database at the same time, they can proceed without waiting. 7. What is a DBMS? Ans: A database management system (DBMS) is a collection of software that supports the creation, use, and maintenance of databases. Initially, DBMSs provided efficient storage and retrieval of data. Due to marketplace demands and product innovation, DBMSs have evolved to provide a broad range of features for data acquisition, storage, dissemination, maintenance, retrieval, and formatting. The evolution of these features has made DBMSs rather complex. 8. What is SQL? Ans: The Structured Query Language (SQL) is an industry standard language supported by most DBMSs. SQL contains statements for data definition, data manipulation, and data control. 9. Describe the difference between a procedural and a non-procedural language. What statements belong in a procedural language but not in a nonprocedural language? Ans: A nonprocedural language allows users with limited computing skills to submit queries instead of coding complex procedures. Nonprocedural languages specify what parts of a database to retrieve, not the detail of how retrieval occurs as compared to procedural language. Statements that belong in a procedural language but not in a nonprocedural language are looping statements (for, while, and so on). 10. Why is non-procedural access an important feature of DBMS? Ans: Non-procedural access can reduce the number of lines of code by a factor of 100 as compared to procedural access. Because a large part of business software involves data access, non-procedural access can provide a dramatic improvement in software productivity. 11. What is a procedural language interface?

Ans: The example of transaction that uses the University Database is registering for a course. The University Database ensures that the registering for a course is free of interference from other students (or users). Parts of course registration are not lost due to a failure, and the registering for a course does not make the university database inconsistent. The transaction is often submitted to the database. Hundreds of students can submit transactions at the same time.

17. What is an enterprise DBMS? Ans: An enterprise DBMS supports databases that are often critical to the functioning of an organization. Enterprise DBMSs usually run on powerful servers and have a high cost. 18. What is a desktop DBMS? Ans: A desktop DBMS runs on personal computers and small servers. It supports limited transaction processing features but has a much lower cost than an enterprise DBMS. Desktop DBMSs support databases used by work teams and small businesses. 19. What is an embedded DBMS? Ans: Embedded DBMSs are an emerging category of database software. As the name implies, an embedded DBMS resides in a larger system, either an application or a device such as a Personal Digital Assistant or smart card. Embedded DBMSs provide limited transaction processing features but have low memory, processing, and storage requirements. 20. What were the prominent features of first-generation DBMSs? Ans: File structures and proprietary program interfaces were the prominent features of first-generation database software. 21. What were the prominent features of second-generation DBMSs? Ans: Networks and hierarchies of related records along with standard program interfaces were the prominent features of second-generation database software. 22. What were the prominent features of third-generation DBMSs? Ans: Non-procedural languages, optimization, and transaction processing were the prominent features of third-generation database software.

23. What are the prominent features of fourth-generation DBMSs? Ans: Support for multi-media data, active databases, data warehouses, distributed processing, and big data are the prominent features of fourth- generation database software. 24. For the database you described in question 1, make a table to depict differences among schema levels. Use Table 1–4 as a guide. Ans: Schema level Description External The registration form View, the report of grade View, the faculty assignment form View, and the report of faculty workload View Conceptual Student, Enrollment, Course, Faculty, and Enrollment tables and relationships Internal Files needed to store the tables; extra files to improve performance 25. What is the purpose of the mappings in the Three Schema Architecture? Is the user or the DBMS responsible for using the mappings? Ans: The purpose of the mappings in the Three Schema Architecture is to describe how a schema at a higher level is derived from a schema at a lower level. The DBMS, not the user, is responsible for using the mappings. 26. Explain the ways that the Three Schema Architecture supports data independence? Ans: The Three Schema Architecture is a standard that serves as a guideline about how data independence can be achieved. The spirit of the Three Schema Architecture is widely implemented in third- and fourth-generation DBMS. In the Three Schema Architecture, the DBMS uses schemas and mappings to ensure data independence. Typically, applications access a database using a view. The DBMS converts an application’s request into a request using the conceptual schema rather than the view. The DBMS then transforms the conceptual schema request into a request using the internal schema. Most changes to the conceptual or internal schema do not affect applications because applications do not use the lower schema levels. 27. In a client–server architecture, why are processing capabilities divided between a client and a server? In other words, why not have the server do all the processing?

Ans: Students' responses will vary. However, an example response might be: Data administrator is more appealing to me as a long-term career goal because the Data administrator has broader responsibilities than the database administrator. Data administrator is primarily a planning role, while database administrator is a more technical role focused on individual databases and DBMS. Data administrators also view the information resource in a broader context and consider all kinds of data, both computerized and noncomputerized.

33. What advantages are reported by organizations using open source DBMS products? Ans: Many organizations have reported cost savings using open source DBMS products, mostly for non mission critical systems. 34. What is the state of the cloud computing segment of the DBMS marketplace? Ans: The market for cloud-based DBMSs is rapidly evolving so market shares and size are difficult to determine. The market seems dominated by new products such as Amazon RDS (based on MySQL), Microsoft SQL Azure, Oracle Berkeley DB, and Google BigTable. Most of the products provide a subset of relational database features or use a different database model entirely. The impact of cloud computing on the DBMS market seems small in 2010 although future product developments and organizational needs may increase cloud computing usage. 35. What is the relationship between the cloud-based database architecture and other distributed processing architectures for database computing? Ans: Cloud computing provides a new approach without initial product licensing costs and no hosting requirements. Using web-based interfaces, organizations can design and deploy databases with dynamic resource allocation provided by the cloud as depicted in Figure 1.16. The cloud service may restrict the design flexibility for database design and operations available for database usage. Internally, the cloud can use any distributed processing approach although the internal details of the cloud are invisible to organizations using the cloud service. 36. What is information resource management? Ans: Information resource management is one of two approaches for organizations to manage data resources. Information resource management focuses on information technology as a tool for processing, distributing, and integrating information throughout an organization. Information resource management involves activities for planning databases, acquiring data, protecting data from unauthorized access, ensuring reliability, coordinating flow among information systems, and eliminating duplication. 37. What is data governance?

Ans: Data governance is one of two approaches for organizations to manage data resources. According to the Data Governance Institute (www.dgi.com), “data governance is the exercise of decision-making and authority for data- related matters.” Data governance provides a system of checks and balances to develop data rules and policies, support application of data rules and policies, and evaluate compliance of data rules and policies. Organizations use the artifacts of data governance to mitigate risks associated with the complex regulatory environment, information security, and information privacy especially for personal identifiable data and related business transactions.

38. What are the responsibilities of data administrators versus database administrators for data governance programs? Ans: The data administrator role typically has broader responsibilities than the database administrator role. For data governance, data administrators typically serve as members in the data governance organization often in a leadership position and consult on activities managed by the data governance office. Database administrators serve in support roles by implementing controls for data governance policies. 39. Identify several sources of data growth that challenge organizations and vendors of database products. Ans: The growth in data comes from a variety of sources such as sensors in smart phones, energy meters, and automobiles, interaction of individuals in social media websites, radio frequency identification tags in retail, and digitized media content in medicine, entertainment, and security. 40. What features of NoSQL database products address the challenges of big data? Ans: NoSQL database products use simplified database models, less stringent transaction processing models, and distributed processing to reduce bottlenecks for dealing with big data. 41. What is an SQL client? Ans: An SQL client submits SQL statements to a database server and processes statement results, usually rows generated by executing a statement. An SQL client can be configured in a client-server architecture with a database server on a remote computer interacting with multiple SQL clients on personal computing devices. Alternatively, a personal computer can host both a database server and SQL client as processes executing on the same personal computing device.

Chapter 2 Question Solutions Page 2

  • Preliminary Investigation phase: Produces a problem statement and feasibility study.
  • Systems analysis phase: Produces requirements describing processes, data, and environment interactions.
  • Systems design phase: Produces a plan to efficiently Implement the requirements.
  • Systems Implementation phase: Produces executable code, databases, and user documentation.
  • Maintenance phase: Produces corrections, changes, and enhancements to an operating information system. 6. Why is the waterfall model considered only a reference framework? Ans: Because the particular phases are not standard. For most systems, the boundary between phases is blurred and there is considerable backtracking between phases. 7. What are the shortcomings in the waterfall model? Ans: The traditional life cycle has been criticized for several reasons. First, an operating system is not produced until late in the process. By the time a system is operational, the requirements already have changed. Second, there is often a rush to begin implementation so that a product is visible. In this rush, appropriate time may not be devoted to analysis and design. 8. What alternative methodologies have been proposed to alleviate the difficulties of the waterfall model? Ans: A number of alternative methodologies have been proposed to alleviate these difficulties. In spiral development methodologies, the life-cycle phases are performed for subsets of a system, progressively producing a larger system until the complete system emerges. Rapid application development methodologies delay producing design documents until requirements are clear. Scaled-down versions of a system known as prototypes are used to clarify requirements. Agile development methodologies are another variation to traditional information systems development. Agile development methodologies promote active user involvement and team empowerment, viewing software development as an empirical process. Requirements evolve in agile development but the timescale of development is fixed. Agile development involves iteration through small incremental releases with testing integrated throughout the project lifecycle. Extreme programming is a prominent agile development approach featuring a set of primary technical practices and a set of corollary technical practices.

Chapter 2 Question Solutions Page 3 9. What is the relationship of the database development process to the information systems development process? Ans: The database development process is an important part of the information systems development process. The database development process produces the data model that specifies the operational database for the information system. The data model is usually the most important artifact for an information system. 10. What is a data model? Process model? Environment interaction model? Ans: The data model describes the kinds of data and relationships. The process model describes relationships among processes. The environment interaction model describes relationships between events and processes. In many information systems development efforts, the data model is the most important. For business information systems, the process and environment interaction models are usually produced after the data model. 11. What is the purpose of prototyping in the information systems development process? Ans: To clarify requirements by using the scaled-down versions of a system. Prototyping can reduce the risk of developing an information system because it allows earlier and more direct feedback about the system. 12. How is a database designer like a politician in establishing a common vocabulary? Ans: A good politician often finds solutions with which everyone finds something to agree or disagree. A good database designer also finds similar imperfect solutions. 13. Why should a database designer establish the meaning of data? Ans: Because a database contains business rules to support organizational policies. Defining business rules is the essence of defining the semantics or meaning of the database.

14. What factors should a database designer consider when choosing database constraints?

Chapter 2 Question Solutions Page 5 Ans: The inputs of the conceptual data modeling phase are data requirements. The outputs of the conceptual data modeling phase are entity relationship diagrams. 20. What are the inputs and the outputs of the logical database design phase? Ans: The inputs of the logical database design phase are entity relationship diagrams. The outputs of the logical database design phase are relational database tables. 21. What are the inputs and the outputs of the distributed database design phase? Ans: The inputs of the distributed database design phase are relational database tables. The outputs of the distributed database design phase are the distribution schema indicating the location of data and processes. 22. What are the inputs and the outputs of the physical database design phase? Ans: The inputs of the physical database design phase are the distribution schema for each site. The outputs of the physical database design phase are the internal schema and the populated database. The internal schema indicates index choices, data placement, and other decisions. 23. What does it mean to say that the conceptual data modeling phase and the logical database design phase are concerned with the information content of the database? Ans: The conceptual data modeling phase and the logical database design phase emphasize the meaning of the database, not an efficient representation. The information content involves the entities and relationships in the database, not efficiency concerns. The information content also involves the representation of the information content on a commercial DBMS. 24. Why are there two phases (conceptual data modeling and logical database design) that involve the information content of the database?

Chapter 2 Question Solutions Page 6 Ans: Because of the database development process, the first two phases are concerned with the information content of the database while the last two phases are concerned with efficient implementation. The conceptual data modeling phase uses data requirements and produces entity relationship diagrams for the conceptual schema and for each external schema. The logical database design phase is concerned with refinements to the conceptual data model. The refinements preserve the information content of the conceptual data model while enabling representation on a commercial DBMS. 25. What is the relationship of view design and view integration to conceptual data modeling? Ans: View design and integration is an approach to managing the complexity of large database development efforts. For large databases, the conceptual modeling phase is usually modified. Designing large databases is a time-consuming and labor-intensive process often involving a team of designers. In view design, an ERD is constructed for each group of users. A view is typically small enough for a single person to design. The view integration process merges the views into a complete, conceptual schema. 26. What is a soft skill? Ans: A soft skill is a qualitative, subjective, and people-oriented skill used for conceptual data modeling and logical database design phases. 27. What phases of database development primarily involve soft skills? Ans: The conceptual data modeling and logical database design phases involve mostly soft skills. As a database designer, you want to generate a range of feasible alternatives. The choice among feasible alternatives can be subjective. You should note the assumptions in which each feasible alternative is preferred. The alternative chosen is often subjective based on the designer’s assessment of the most reasonable assumptions. Conceptual data modeling is especially people-oriented. In the role of data modeling, you need to obtain requirements from diverse groups of users. 28. What is a hard skill? Ans: A hard skill is a quantitative, objective, and data intensive skill used for distributed database design and physical database design.

29. What phases of database development primarily involve hard skills?

Chapter 2 Question Solutions Page 8 Ans: Most CASE tools provide predefined shapes and connections among the shapes. The connection tools typically allow the shapes to be moved but stay connected as though “glued.” This glue feature provides important flexibility because symbols on a diagram typically are rearranged many times. For large drawings, CASE tools provide several features. Most CASE tools allow diagrams to span multiple pages. Multiple-page drawings can be printed so that the pages can be pasted together to make a wall display. Layout can be difficult for large drawings. Some CASE tools try to improve the visual appeal of a diagram by performing automatic layout. 35. What kinds of support can a CASE tool provide for documenting a database design? Ans: Storing various properties of a data model and linking the properties to symbols on the diagram, storing text describing assumptions, alternatives, and notes, and documenting versions. 36. What kinds of support can a CASE tool provide for analyzing a database design? Ans: Active assistance to database designers through analysis functions. Analysis functions can be provided in each phase of database development. In the conceptual data modeling phase, analysis functions can reveal conflicts in an ERD. In the logical database design phase, conversion and normalization are common analysis functions. Conversion produces a table design from an ERD. Normalization removes redundancy in a table design. In the distributed database design and physical database design phases, analysis functions can suggest decisions about data location and index selection. In addition, analysis functions for version control can cross database development phases. Analysis functions can convert between versions and show a list of differences between versions. 37. What kinds of support can a CASE tool provide for prototyping? Ans: Prototyping tools provide a link between database development and application development. Prototyping tools can be used to create forms and reports that use a database. Because prototyping tools may generate code (SQL statements and programming language code), they are sometimes known as code generation tools. Prototyping tools are often provided as part of a DBMS. The prototyping tools may feature wizards to aid a developer in quickly creating applications that can be tested by users.

Chapter 2 Question Solutions Page 9 38. Should you expect to find one software vendor providing a full range of functions (drawing, documenting, analyzing, and prototyping) for the database development process? Why or why not? Ans: Students' responses may vary. There are a number of CASE tools that provide extensive functionality for database development. Each of the products in Table 2-2 is a complex product that supports the full life-cycle of information systems development. Although the features of the products look similar, the quality, the depth, and the breadth of the features may vary across products. In addition, most of the products in Table 2-2 have several different versions that vary in price and features. Most major products are relatively neutral to a particular DBMS even if a product is offered by a DBMS vendor. 39. How has data quality moved beyond an issue just for the design of individual databases and data integration efforts? Ans: Data quality has become an issue beyond both design of individual databases and data integration efforts. Organizations now increasingly recognize that poor data quality can bring extra risks to an organization especially related to litigation and government regulations. Many businesses and government agencies now have data governance organizations that deal with data quality, privacy, and security issues in a broad context. For data quality improvements, data governance initiatives typically focus on development of data quality measures, reporting status of data quality, and establishing decision rights and accountabilities.

Ans: Referential integrity ensures that a database contains valid connections. For example, it is critical that each row of the Enrollment table contains a social security number of a valid student. Otherwise, some enrollments can be meaningless, possibly resulting in students denied enrollment because non- existing students took their places.

8. What is the relationship between the referential integrity rule and foreign keys? Ans: Referential integrity involves the allowable values in foreign keys. A foreign key can store a value matching a candidate key value in some row of the table containing the associated candidate key or a null value. 9. How are candidate keys that are not primary keys indicated in the CREATE TABLE statement? Ans: The CREATE TABLE statement has a UNIQUE constraint for candidate keys that are not primary keys. 10. What is the advantage of using constraint names when defining primary key, candidate key, or referential integrity constraints in CREATE TABLE statements? Ans: The advantage of using a constraint name is that the constraint is easy to identify when a violation occurs. 11. When is it not permissible for foreign keys to store null values? Ans: When a foreign key is part of a primary key, null values are not permitted. 12. What is the purpose of a database diagram such as the Oracle database diagram? Ans: To make referential integrity easier to define and understand than the text representation in the CREATE TABLE statement. In addition, a graphical representation supports nonprocedural data access. 13. How is a 1-M relationship represented in the Relational Model?

Ans: In the CREATE TABLE statement, primary keys and related foreign keys along with referential integrity constraints represent 1-M relationships. In an Oracle database diagram, a line connecting two tables represents a 1-M relationship. The relationship line connects the parent or “1” table (the primary key table) with the child or “M” table (the foreign key table). The symbol of is presented at the end of the line connected to the parent table. The symbol of is presented at the other end of the line connected to the child table. 14. How is an M-N relationship represented in the Relational Model? Ans: An M-N relationship cannot be directly represented in the Relational Model. Two 1-M relationships and a linking or associative table represent an M-N relationship. 15. What is a self-referencing relationship? Ans: A self-referencing relationship is a relationship in which a foreign key refers to the same table. Self-referencing relationships represent associations among members of the same set. 16. How is a self-referencing relationship represented in the Relational Model? Ans: In the CREATE TABLE statement, a foreign key referring to the primary key of the same table along with a referential integrity constraint represents a self-referencing relationship.

17. What is a referenced row? Ans: Referenced rows are rows in a parent table of a 1-M relationship. A row is referenced if there are rows in a child table with foreign key values identical to the primary key value of the parent table row. 18. What two actions on referenced rows can affect related rows in a child table? Ans: The two actions are deleting a referenced row and updating the primary key of a referenced row. 19. What are the possible actions on related rows after a referenced row is deleted or its primary key is updated?