all exersice
15 Pages

all exersice

Course Number: COMPUTER S Database, Spring 2009

College/University: University of Tech - Iraq

Word Count: 8033

Rating:

Document Preview

1.1. Define the following terms: data, database, DBMS, database system, database catalog, program-data independence, user view, DBA, end user, canned transaction, deductive database system, persistent object, meta-data, transaction processing application. What three main types of actions involve databases? Briefly discuss each. Discuss the main characteristics of the database approach and how it differs from...

Unformatted Document Excerpt
Coursehero >> Iraq >> University of Tech - Iraq >> COMPUTER S Database

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

the 1.1. Define following terms: data, database, DBMS, database system, database catalog, program-data independence, user view, DBA, end user, canned transaction, deductive database system, persistent object, meta-data, transaction processing application. What three main types of actions involve databases? Briefly discuss each. Discuss the main characteristics of the database approach and how it differs from traditional file systems. What are the responsibilities of the DBA and the database designers? What are the different types of database end users? Discuss the main activities of each. Discuss the capabilities that should be provided by a DBMS. Identify some informal queries and update operations that you would expect to apply to the database shown in Figure 01.02. What is the difference between controlled and uncontrolled redundancy? Illustrate with examples. Name all the relationships among the records of the database shown in Figure 01.02. Give some additional views that may be needed by other user groups for the database shown in Figure 01.02. Cite some examples of integrity constraints that you think should hold on the database shown in Figure 01.02. Define the following terms: data model, database schema, database state, internal schema, conceptual schema, external schema, data independence, DDL, DML, SDL, VDL, query language, host language, data sublanguage, database utility, catalog, client-server architecture. Discuss the main categories of data models. What is the difference between a database schema and a database state? Describe the three-schema architecture. Why do we need mappings between schema levels? How do different schema definition languages support this architecture? What is the difference between logical data independence and physical data independence? What is the difference between procedural and nonprocedural DMLs? Discuss the different types of user-friendly interfaces and the types of users who typically use each. With what other computer system software does a DBMS interact? Discuss some types of database utilities and tools and their functions. Think of different users for the database of Figure 01.02. What types of applications would each user need? To which user category would each belong, and what type of interface would each need? Choose a database application with which you are familiar. Design a schema and show a sample database for that application, using the notation of Figure 02.01 and Figure 01.02. What types of additional information and constraints would you like to represent in the schema? Think of several users for your database, and design a view for each. Discuss the role of a high-level data model in the database design process. List the various cases where use of a null value would be appropriate. Define the following terms: entity, attribute, attribute value, relationship instance, composite attribute, multivalued attribute, derived attribute, complex attribute, key attribute, value set (domain). What is an entity type? What is an entity set? Explain the differences among an entity, an entity type, 1.2. 1.3. 1.4. 1.5. 1.6. 1.7. 1.8. 1.9. 1.10. 1.11. 2.1. 2.2. 2.3. 2.4. 2.5. 2.6. 2.7. 2.8. 2.9. 2.10. 2.11. 3.1. 3.2. 3.3. 3.4. and an entity set. 3.5. 3.6. 3.7. 3.8. 3.9. 3.10. 3.11. 3.12. 3.13. 3.14. 3.15. 3.16. Explain the difference between an attribute and a value set. What is a relationship type? Explain the differences among a relationship instance, a relationship type, and a relationship set. What is a participation role? When is it necessary to use role names in the description of relationship types? Describe the two alternatives for specifying structural constraints on relationship types. What are the advantages and disadvantages of each? Under what conditions can an attribute of a binary relationship type be migrated to become an attribute of one of the participating entity types? When we think of relationships as attributes, what are the value sets of these attributes? What class of data models is based on this concept? What is meant by a recursive relationship type? Give some examples of recursive relationship types. When is the concept of a weak entity used in data modeling? Define the terms owner entity type, weak entity type, identifying relationship type, and partial key. Can an identifying relationship of a weak entity type be of a degree greater than two? Give examples to illustrate your answer. Discuss the conventions for displaying an ER schema as an ER diagram. Discuss the naming conventions used for ER schema diagrams. Consider the following set of requirements for a university database that is used to keep track of students transcripts. This is similar but not identical to the database shown in Figure 01.02: a. The university keeps track of each students name, student number, social security number, current address and phone, permanent address and phone, birthdate, sex, class (freshman, sophomore, . . ., graduate), major department, minor department (if any), and degree program (B.A., B.S., . . ., Ph.D.). Some user applications need to refer to the city, state, and zip code of the students permanent address and to the students last name. Both social security number and student number have unique values for each student. b. Each department is described by a name, department code, office number, office phone, and college. Both name and code have unique values for each department. c. Each course has a course name, description, course number, number of semester hours, level, and offering department. The value of course number is unique for each course. d. Each section has an instructor, semester, year, course, and section number. The section number distinguishes sections of the same course that are taught during the same semester/year; its values are 1, 2, 3, . . ., up to the number of sections taught during each semester. e. A grade report has a student, section, letter grade, and numeric grade (0, 1, 2, 3, or 4). Design an ER schema for this application, and draw an ER diagram for that schema. Specify key attributes of each entity type and structural constraints on each relationship type. Note any unspecified requirements, and make appropriate assumptions to make the specification complete. 3.17. Composite and multivalued attributes can be nested to any number of levels. Suppose we want to design an attribute for a STUDENT entity type to keep track of previous college education. Such an attribute will have one entry for each college previously attended, and each such entry will be composed of college name, start and end dates, degree entries (degrees awarded at that college, if any), and transcript entries (courses completed at that college, if any). Each degree entry contains the degree name and the month and year the degree was awarded, and each transcript entry contains a course name, semester, year, and grade. Design an attribute to hold this information. Use the conventions of Figure 03.05. 3.18. 3.19. Show an alternative design for the attribute described in Exercise 3.17 that uses only entity types (including weak entity types, if needed) and relationship types. Consider the ER diagram of Figure 03.16, which shows a simplified schema for an airline reservations system. Extract from the ER diagram the requirements and constraints that produced this schema. Try to be as precise as possible in your requirements and constraints specification. In Chapter 1 and Chapter 2, we discussed the database environment and database users. We can consider many entity types to describe such an environment, such as DBMS, stored database, DBA, and catalog/data dictionary. Try to specify all the entity types that can fully describe a database system and its environment; then specify the relationship types among them, and draw an ER diagram to describe such a general database environment. Design an ER schema for keeping track of information about votes taken in the U.S. House of Representatives during the current two-year congressional session. The database needs to keep track of each U.S. STATEs Name (e.g., Texas, New York, California) and includes the Region of the state (whose domain is {Northeast, Midwest, Southeast, Southwest, West}). Each CONGRESSPERSON in the House of Representatives is described by their Name, and includes the District represented, the StartDate when they were first elected, and the political Party they belong to (whose domain is {Republican, Democrat, Independent, Other}). The database keeps track of each BILL (i.e., proposed law), and includes the BillName, the DateOfVote on the bill, whether the bill PassedOrFailed (whose domain is {YES, NO}), and the Sponsor (the congressperson(s) who sponsoredi.e., proposedthe bill). The database keeps track of how each congressperson voted on each bill (domain of vote attribute is {Yes, No, Abstain, Absent}). Draw an ER schema diagram for the above application. State clearly any assumptions you make. A database is being constructed to keep track of the teams and games of a sports league. A team has a number of players, not all of whom participate in each game. It is desired to keep track of the players participating in each game for each team, the positions they played in that game, and the result of the game. Try to design an ER schema diagram for this application, stating any assumptions you make. Choose your favorite sport (soccer, baseball, football, . . .). Consider the ER diagram shown in Figure 03.17 for part of a BANK database. Each bank can have multiple branches, and each branch can have multiple accounts and loans. a. List the (nonweak) entity types in the ER diagram. b. Is there a weak entity type? If so, give its name, partial key, and identifying relationship. c. What constraints do the partial key and the identifying relationship of the weak entity type specify in this diagram? d. List the names of all relationship types, and specify the (min, max) constraint on each participation of an entity type in a relationship type. Justify your choices. e. List concisely the user requirements that led to this ER schema design. f. Suppose that every customer must have at least one account but is restricted to at most two loans at a time, and that a bank branch cannot have more than 1000 loans. How does this show up on the (min, max) constraints? 3.24. Consider the ER diagram in Figure 03.18. Assume that an employee may work in up to two departments, but may also not be assigned to any department. Assume that each department must have one and may have up to three phone numbers. Supply (min, max) constraints on this diagram. State clearly any additional assumptions you make. Under what conditions would the relationship HAS_PHONE be redundant in the above example? Consider the ER diagram in Figure 03.19. Assume that a course may or may not use a textbook, but that a text by definition is a book that is used in some course. A course may not use more than five books. Instructors teach from two to four courses. Supply (min, max) constraints on this diagram. State clearly any additional assumptions you make. If we add the relationship ADOPTS between 3.20. 3.21. 3.22. 3.23. 3.25. INSTRUCTOR and TEXT, what (min, max) constraints would you put on it? Why? 3.26. Consider an entity type SECTION in a UNIVERSITY database, which describes the section offerings of courses. The attributes of SECTION are: SectionNumber, Semester, Year, CourseNumber, Instructor, RoomNo (where section is taught), Building (where section is taught), Weekdays (domain is the possible combinations of weekdays in which a section can be offered {MWF, MW, TT, etc.}), and Hours (domain is all possible time periods during which sections are offered {99.50 A.M., 1010.50 A.M., . . ., 3.304.50 P.M., 5.306.20 P.M., etc.}). Assume that SectionNumber is unique for each course within a particular semester/year combination (that is, if a course is offered multiple times during a particular semester, its section offerings are numbered 1, 2, 3, etc.). There are several composite keys for SECTION, and some attributes are components of more than one key. Identify three composite keys, and show how they can be represented in an ER schema diagram. What is a subclass? When is a subclass needed in data modeling? Define the following terms: superclass of a subclass, superclass/subclass relationship, IS-A relationship, specialization, generalization, category, specific (local) attributes, specific relationships. Discuss the mechanism of attribute/relationship inheritance. Why is it useful? Discuss user-defined and predicate-defined subclasses, and identify the differences between the two. Discuss user-defined and attribute-defined specializations, and identify the differences between the two. Discuss the two main types of constraints on specializations and generalizations. What is the difference between a specialization hierarchy and a specialization lattice? What is the difference between specialization and generalization? Why do we not display this difference in schema diagrams? How does a category differ from a regular shared subclass? What is a category used for? Illustrate your answer with examples. For each of the following UML terms, discuss the corresponding term in the EER model, if any: object, class, association, aggregation, generalization, multiplicity, attributes, discriminator, link, link attribute, reflexive association, qualified association. Discuss the main differences between the notation for EER schema diagrams and UML class diagrams by comparing how common concepts are represented in each. Discuss the two notations for specifying constraints on n-ary relationships, and what each can be used for. List the various data abstraction concepts and the corresponding modeling concepts in the EER model. What aggregation feature is missing from the EER model? How can the EER model be further enhanced to support it? What are the main similarities and differences between conceptual database modeling techniques and knowledge representation techniques. Design an EER schema for a database application that you are interested in. Specify all constraints that should hold on the database. Make sure that the schema has at least five entity types, four relationship types, a weak entity type, a superclass/subclass relationship, a category, and an n-ary (n > 2) relationship type. Consider the BANK ER schema of Figure 03.17, and suppose that it is necessary to keep track of different types of ACCOUNTS (SAVINGS_ACCTS, CHECKING_ACCTS, . . .) and LOANS (CAR_LOANS, HOME_LOANS, . . .). Suppose that it is also desirable to keep track of each accounts TRANSACTIONs (deposits, withdrawals, checks, . . .) and each loans PAYMENTs; both of these include the amount, date, and time. Modify the BANK schema, using ER and EER concepts of specialization and generalization. State any assumptions you make about 4.1. 4.2. 4.3. 4.4. 4.5. 4.6. 4.7. 4.8. 4.9. 4.10. 4.11. 4.12. 4.13. 4.14. 4.15. 4.16. 4.17. the additional requirements. 4.18. The following narrative describes a simplified version of the organization of Olympic facilities planned for the 1996 Olympics in Atlanta. Draw an EER diagram that shows the entity types, attributes, relationships, and specializations for this application. State any assumptions you make. The Olympic facilities are divided into sports complexes. Sports complexes are divided into one-sport and multisport types. Multisport complexes have areas of the complex designated to each sport with a location indicator (e.g., center, NE-corner, etc.). A complex has a location, chief organizing individual, total occupied area, and so on. Each complex holds a series of events (e.g., the track stadium may hold many different races). For each event there is a planned date, duration, number of participants, number of officials, and so on. A roster of all officials will be maintained together with the list of events each official will be involved in. Different equipment is needed for the events (e.g., goal posts, poles, parallel bars) as well as for maintenance. The two types of facilities (one-sport and multisport) will have different types of information. For each type, the number of facilities needed is kept, together with an approximate budget. Identify all the important concepts represented in the library database case study described below. In particular, identify the abstractions of classification (entity types and relationship types), aggregation, identification, and specialization/generalization. Specify (min, max) cardinality constraints, whenever possible. List details that will impact eventual design, but have no bearing on the conceptual design. List the semantic constraints separately. Draw an EER diagram of the library database. Case Study: The Georgia Tech Library (GTL) has approximately 16,000 members, 100,000 titles, and 250,000 volumes (or an average of 2.5 copies per book). About 10 percent of the volumes are out on loan at any one time. The librarians ensure that the books that members want to borrow are available when the members want to borrow them. Also, the librarians must know how many copies of each book are in the library or out on loan at any given time. A catalog of books is available on-line that lists books by author, title, and subject area. For each title in the library, a book description is kept in the catalog that ranges from one sentence to several pages. The reference librarians want to be able to access this description when members request information about a book. Library staff is divided into chief librarian, departmental associate librarians, reference librarians, check-out staff, and library assistants. Books can be checked out for 21 days. Members are allowed to have only five books out at a time. Members usually return books within three to four weeks. Most members know that they have one week of grace before a notice is sent to them, so they try to get the book returned before the grace period ends. About 5 percent of the members have to be sent reminders to return a book. Most overdue books are returned within a month of the due date. Approximately 5 percent of the overdue books are either kept or never returned. The most active members of the library are defined as those who borrow at least ten times during the year. The top 1 percent of membership does 15 percent of the borrowing, and the top 10 percent of the membership does 40 percent of the borrowing. About 20 percent of the members are totally inactive in that they are members but do never borrow. To become a member of the library, applicants fill out a form including their SSN, campus and home mailing addresses, and phone numbers. The librarians then issue a numbered, machine-readable card with the members photo on it. This card is good for four years. A month before a card expires, a notice is sent to a member for renewal. Professors at the institute are considered automatic members. When a new faculty member joins the institute, his or her information is pulled from the employee records and a library card is mailed to his or her campus address. Professors are allowed to check out books for three-month intervals and have a two-week grace period. Renewal notices to professors are sent to the campus address. The library does not lend some books, such as reference books, rare books, and maps. The librarians must differentiate between books that can be lent and those that cannot be lent. In addition, the librarians have a list of some books they are interested in acquiring but cannot obtain, such as rare or out-of-print books and books that were lost or destroyed but have not been replaced. The librarians must have a system that keeps track of books that cannot be lent as well as books that they are interested in acquiring. Some books may have the same title; therefore, the title cannot be used as a means of identification. Every book is identified by its International Standard Book Number (ISBN), a unique international code assigned to all books. Two books with the same title can have different ISBNs if they are in different languages or have different bindings (hard cover or soft cover). Editions of the same book have different ISBNs. The proposed database system must be designed to keep track 4.19. of the members, the books, the catalog, and the borrowing activity. 4.20. Design a database to keep track of information for an art museum. Assume that the following requirements were collected: The museum has a collection of ART_OBJECTs. Each ART_OBJECT has a unique IdNo, an Artist (if known), a Year (when it was created, if known), a Title, and a Description. The art objects are categorized in several ways as discussed below. ART_OBJECTs are categorized based on their type. There are three main types: PAINTING, SCULPTURE, and STATUE, plus another type called OTHER to accommodate objects that do not fall into one of the three main types. A PAINTING has a PaintType (oil, watercolor, etc.), material on which it is DrawnOn (paper, canvas, wood, etc.), and Style (modern, abstract, etc.). A SCULPTURE has a Material from which it was created (wood, stone, etc.), Height, Weight, and Style. An art object in the OTHER category has a Type (print, photo, etc.) and Style. ART_OBJECTs are also categorized as PERMANENT_COLLECTION that are owned by the museum (which has information on the DateAcquired, whether it is OnDisplay or stored, and Cost) or BORROWED, which has information on the Collection (from which it was borrowed), DateBorrowed, and DateReturned. ART_OBJECTs also have information describing their country/culture using information on country/culture of Origin (Italian, Egyptian, American, Indian, etc.), Epoch (Renaissance, Modern, Ancient, etc.). The museum keeps track of ARTISTs information, if known: Name, DateBorn, DateDied (if not living), CountryOfOrigin, Epoch, MainStyle, Description. The Name is assumed to be unique. Different EXHIBITIONs occur, each having a Name, StartDate, EndDate, and is related to all the art objects that were on display during the exhibition. Information is kept on other COLLECTIONs with which the museum interacts, including Name (unique), Type (museum, personal, etc.), Description, Address, Phone, and current ContactPerson. Draw an EER schema diagram for this application. Discuss any assumptions you made, and that justify your EER design choices. 4.21. Figure 04.17 shows an example of an EER diagram for a small private airport database that is used to keep track of airplanes, their owners, airport employees, and pilots. From the requirements for this database, the following information was collected. Each airplane has a registration number [Reg#], is of a particular plane type [OF-TYPE], and is stored in a particular hangar [STORED-IN]. Each plane type has a model number [Model], a capacity [Capacity], and a weight [Weight]. Each hangar has a number [Number], a capacity [Capacity], and a location [Location]. The database also keeps track of the owners of each plane [OWNS] and the employees who have maintained the plane [MAINTAIN]. Each relationship instance in OWNS relates an airplane to an owner and includes the purchase date [Pdate]. Each relationship instance in MAINTAIN relates an employee to a service record [SERVICE]. Each plane undergoes service many times; hence, it is related by [PLANE-SERVICE] to a number of service records. A service record includes as attributes the date of maintenance [Date], the number of hours spent on the work [Hours], and the type of work done [Workcode]. We use a weak entity type [SERVICE] to represent airplane service, because the airplane registration number is used to identify a service record. An owner is either a person or a corporation. Hence, we use a union category [OWNER] that is a subset of the union of corporation [CORPORATION] and person [PERSON] entity types. Both pilots [PILOT] and employees [EMPLOYEE] are subclasses of PERSON. Each pilot has specific attributes license number [Lic-Num] and restrictions [Restr]; each employee has specific attributes salary [Salary] and shift worked [Shift]. All person entities in the database have data kept on their social security number [Ssn], name [Name], address [Address], and telephone number [Phone]. For corporation entities, the data kept includes name [Name], address [Address], and telephone number [Phone]. The database also keeps track of the types of planes each pilot is authorized to fly [FLIES] and the types of planes each employee can do maintenance work on [WORKS-ON]. Show how the SMALL AIRPORT EER schema of Figure 04.17 may be represented in UML notation. (Note: We have not discussed how to represent categories (union types) in UML so you do not have to map the categories in this and the following question). 4.22. 6.1. 6.2. Show how the UNIVERSITY EER schema of Figure 04.10 may be represented in UML notation. Define the following terms: indexing field, primary key field, clustering field, secondary key field, block anchor, dense index, and non-dense (sparse) index. What are the differences among primary, secondary, and clustering indexes? How do these differences affect the ways in which these indexes are implemented? Which of the indexes are dense, and which are not? Why can we have at most one primary or clustering index on a file, but several secondary indexes? How does multilevel indexing improve the efficiency of searching an index file? What is the p order of a B-tree? Describe the structure of B-tree nodes. What is the order p of a -tree? Describe the structure of both internal and leaf nodes of a -tree? Why is a -tree. 6.3. 6.4. 6.5. 6.6. 6.7. 6.8. 6.9. 6.10. 6.11. 6.12. 6.13. 6.14. How does a B-tree differ from a data file? -tree usually preferred as an access structure to a Explain what alternative choices exist for accessing a file based on multiple search keys. What is partitioned hashing? How does it work? What are its limitations? What is a grid file? What are its advantages and disadvantages? Show an example of constructing a grid array on two attributes on some file. What is a fully inverted file? What is an indexed sequential file? How can hashing be used to construct an index? What is the difference between a logical index and a physical index? Consider a disk with block size B = 512 bytes. A block pointer is P = 6 bytes long, and a record pointer is = 7 bytes long. A file has r = 30,000 EMPLOYEE records of fixed length. Each record has the following fields: NAME (30 bytes), SSN (9 bytes), DEPARTMENTCODE (9 bytes), ADDRESS (40 bytes), PHONE (9 bytes), BIRTHDATE (8 bytes), SEX (1 byte), JOBCODE (4 bytes), SALARY (4 bytes, real number). An additional byte is used as a deletion marker. a. Calculate the record size R in bytes. b. Calculate the blocking factor bfr and the number of file blocks b, assuming an unspanned organization. c. Suppose that the file is ordered by the key field SSN and we want to construct a primary index on SSN. Calculate (i) the index blocking factor (which is also the index fan-out fo); (ii) the number of first-level index entries and the number of first-level index blocks; (iii) the number of levels needed if we make it into a multilevel index; (iv) the total number of blocks required by the multilevel index; and (v) the number of block accesses needed to search for and retrieve a record from the filegiven its SSN valueusing the primary index. d. Suppose that the file is not ordered by the key field SSN and we want to construct a secondary index on SSN. Repeat the previous exercise (part c) for the secondary index and compare with the primary index. e. Suppose that the file is not ordered by the nonkey field DEPARTMENTCODE and we want to construct a secondary index on DEPARTMENTCODE, using option 3 of Section 6.1.3, with an extra level of indirection that stores record pointers. Assume there are 1000 distinct values of DEPARTMENTCODE and that the EMPLOYEE records are evenly distributed among these values. Calculate (i) the index blocking factor (which is also the index fan-out fo); (ii) the number of blocks needed by the level of indirection that stores record pointers; (iii) the number of first-level index entries and the number of first-level index blocks; (iv) the number of levels needed if we make it into a multilevel index; (v) the total number of blocks required by the multilevel index and the blocks used in the extra level of indirection; and (vi) the approximate number of block accesses needed to search for and retrieve all records in the file that have a specific DEPARTMENTCODE value, using the index. f. Suppose that the file is ordered by the nonkey field DEPARTMENTCODE and we want to construct a clustering index on DEPARTMENTCODE that uses block anchors (every new value of DEPARTMENTCODE starts at the beginning of a new block). Assume there are 1000 distinct values of DEPARTMENTCODE and that the EMPLOYEE records are evenly distributed among these values. Calculate (i) the index blocking factor (which is also the index fan-out fo); (ii) the number of first-level index entries and the number of first-level index blocks; (iii) the number of levels needed if we make it into a multilevel index; (iv) the total number of blocks required by the multilevel index; and (v) the number of block accesses needed to search for and retrieve all records in the file that have a specific DEPARTMENTCODE value, using the clustering index (assume that multiple blocks in a cluster are contiguous). g. Suppose that the file is not ordered by the key field SSN and we want to construct a -tree access structure (index) on SSN. Calculate (i) the orders p and of the -tree; (ii) the number of leaf-level blocks needed if blocks are approximately 69 percent full (rounded up for convenience); (iii) the number of levels needed if internal nodes are also 69 percent full (rounded up for convenience); (iv) the total number of blocks required by the -tree; and (v) the number of block accesses needed to search for and retrieve a record from the filegiven its SSN valueusing the -tree. h. Repeat part g, but for a B-tree rather than for a for the -tree. 6.15. -tree. Compare your results for the B-tree and A PARTS file with Part# as key field includes records with the following Part# values: 23, 65, 37, 60, 46, 92, 48, 71, 56, 59, 18, 21, 10, 74, 78, 15, 16, 20, 24, 28, 39, 43, 47, 50, 69, 75, 8, 49, 33, 38. Suppose that the search field values are inserted in the given order in a -tree of order p = 4 and = 3; show how the tree will expand and what the final tree will look like. Repeat Exercise 6.15, but use a B-tree of order p = 4 instead of a -tree. 6.16. 6.17. Suppose that the following search field values are deleted, in the given order, from the -tree of Exercise 6.15; show how the tree will shrink and show the final tree. The deleted values are 65, 75, 43, 18, 20, 92, 59, 37. Repeat Exercise 6.17, but for the B-tree of Exercise 6.16. Algorithm 6.1 outlines the procedure for searching a nondense multilevel primary index to retrieve a file record. Adapt the algorithm for each of the following cases: a. A multilevel secondary index on a nonkey nonordering field of a file. Assume that option 3 of Section 6.1.3 is used, where an extra level of indirection stores pointers to the individual records with the corresponding index field value. b. A multilevel secondary index on a nonordering key field of a file. c. A multilevel clustering index on a nonkey ordering field of a file. 6.18. 6.19. 6.20. Suppose that several secondary indexes exist on nonkey fields of a file, implemented using option 3 of Section 6.1.3; for example, we could have secondary indexes on the fields DEPARTMENTCODE, JOBCODE, and SALARY of the EMPLOYEE file of Exercise 6.14. Describe an efficient way to search for and retrieve records satisfying a complex selection condition on these fields, such as (DEPARTMENTCODE = 5 AND JOBCODE = 12 AND SALARY = 50,000), using the record pointers in the indirection level. Adapt Algorithms 6.2 and 6.3, which outline search and insertion procedures for a It is possible to modify the -tree, to a B-tree. 6.21. 6.22. -tree insertion algorithm to delay the case where a new level is produced by checking for a possible redistribution of values among the leaf nodes. Figure 06.15 illustrates how this could be done for our example in Figure 06.12; rather than splitting the leftmost leaf node when 12 is inserted, we do a left redistribution by moving 7 to the leaf node to its left (if there is space in this node). Figure 06.15 shows how the tree would look when redistribution is considered. It is also possible to consider right redistribution. Try to modify the -tree insertion algorithm to take redistribution into account. 6.23. 6.24. 7.1. 7.2. 7.3. 7.4. 7.5. 7.6. 7.7. 7.8. 7.9. 7.10. 7.11. 7.12. 7.13. 7.14. 7.15. 7.16. 7.17. 7.18. Outline an algorithm for deletion from a Repeat Exercise 6.23 for a B-tree. Define the following terms: domain, attribute, n-tuple, relation schema, relation state, degree of a relation, relational database schema, relational database state. Why are tuples in a relation not ordered? Why are duplicate tuples not allowed in a relation? What is the difference between a key and a superkey? Why do we designate one of the candidate keys of a relation to be the primary key? Discuss the characteristics of relations that make them different from ordinary tables and files. Discuss the various reasons that lead to the occurrence of null values in relations. Discuss the entity integrity and referential integrity constraints. Why is each considered important? Define foreign key. What is this concept used for? How does it play a role in the join operation? Discuss the various update operations on relations and the types of integrity constraints that must be checked for each update operation. List the operations of relational algebra and the purpose of each. What is union compatibility? Why do the UNION, INTERSECTION, and DIFFERENCE operations require that the relations on which they are applied be union compatible? Discuss some types of queries for which renaming of attributes is necessary in order to specify the query unambiguously. Discuss the various types of JOIN operations. Why is theta join required? What is the FUNCTION operation? What is it used for? How are the OUTER JOIN operations different from the (inner) JOIN operations? How is the OUTER UNION operation different from UNION? Show the result of each of the example queries in Section 7.6 as it would apply to the database of Figure 07.06. Specify the following queries on the database schema shown in Figure 07.05, using the relational operators discussed in this chapter. Also show the result of each query as it would apply to the database of Figure 07.06. a. Retrieve the names of all employees in department 5 who work more than 10 hours per week on the ProductX project. b. List the names of all employees who have a dependent with the same first name as themselves. c. Find the names of all employees who are directly supervised by Franklin Wong. d. For each project, list the project name and the total hours per week (by all employees) spent on that project. e. Retrieve the names of all employees who work on every project. f. Retrieve the names of all employees who do not work on any project. g. For each department, retrieve the department name and the average salary of all employees -tree. working in that department. h. Retrieve the average salary of all female employees. i. Find the names and addresses of all employees who work on at least one project located in Houston but whose department has no location in Houston. j. List the last names of all department managers who have no dependents. 7.19. Suppose that each of the following update operations is applied directly to the database of Figure 07.07. Discuss all integrity constraints violated by each operation, if any, and the different ways of enforcing these constraints. a. Insert <Robert, F, Scott, 943775543, 1952-06-21, 2365 Newcastle Rd, Bellaire, TX, M, 58000, 888665555, 1> into EMPLOYEE. b. Insert <ProductA, 4, Bellaire, 2> into PROJECT. c. Insert <Production, 4, 943775543, 1998-10-01> into DEPARTMENT. d. Insert <677678989, null, 40.0> into WORKS_ON. e. Insert <453453453, John, M, 1970-12-12, SPOUSE> into DEPENDENT. f. Delete the WORKS_ON tuples with ESSN = 333445555. g. Delete the EMPLOYEE tuple with SSN = 987654321. h. Delete the PROJECT tuple with PNAME = ProductX. i. Modify the MGRSSN and MGRSTARTDATE of the DEPARTMENT tuple with DNUMBER = 5 to 123456789 and 1999-10-01, respectively. j. Modify the SUPERSSN attribute of the EMPLOYEE tuple with SSN = 999887777 to 943775543. k. Modify the HOURS attribute of the WORKS_ON tuple with ESSN = 999887777 and PNO = 10 to 5.0. 7.20. Consider the AIRLINE relational database schema shown in Figure 07.19, which describes a database for airline flight information. Each FLIGHT is identified by a flight NUMBER, and consists of one or more FLIGHT_LEGS with LEG_NUMBERs 1, 2, 3, etc. Each leg has scheduled arrival and departure times and airports and has many LEG_INSTANCESone for each DATE on which the flight travels. FARES are kept for each flight. For each leg instance, SEAT_RESERVATIONS are kept, as are the AIRPLANE used on the leg and the actual arrival and departure times and airports. An AIRPLANE is identified by an AIRPLANE_ID and is of a particular AIRPLANE_TYPE. CAN_LAND relates AIRPLANE_TYPEs to the AIRPORTs in which they can land. An AIRPORT is identified by an AIRPORT_CODE. Specify the following queries in relational algebra: a. For each flight, list the flight number, the departure airport for the first leg of the flight, and the arrival airport for the last leg of the flight. b. List the flight numbers and weekdays of all flights or flight legs that depart from Houston Intercontinental Airport (airport code IAH) and arrive in Los Angeles International Airport (airport code LAX). c. List the flight number, departure airport code, scheduled departure time, arrival airport code, scheduled arrival time, and weekdays of all flights or flight legs that depart from some airport in the city of Houston and arrive at some airport in the city of Los Angeles. d. List all fare information for flight number CO197. e. Retrieve the number of available seats for flight number CO197 on 1999-10-09. 7.21. Consider an update for the AIRLINE database to enter a reservation on a particular flight or flight leg on a given date. a. Give the operations for this update. b. What types of constraints would you expect to check? c. Which of these constraints are key, entity integrity, and referential integrity constraints, and which are not? d. Specify all the referential integrity constraints on Figure 07.19. 7.22. Consider the relation CLASS(Course#, Univ_Section#, InstructorName, Semester, BuildingCode, Room#, TimePeriod, Weekdays, CreditHours). This represents classes taught in a university, with unique Univ_Section#. Identify what you think should be various candidate keys, and write in your own words the constraints under which each candidate key would be valid. 7.23. Consider the LIBRARY relational schema shown in Figure 07.20, which is used to keep track of books, borrowers, and book loans. Referential integrity constraints are shown as directed arcs in Figure 07.20, as in the notation of Figure 07.07. Write down relational expressions for the following queries on the LIBRARY database: a. How many copies of the book titled The Lost Tribe are owned by the library branch whose name is Sharpstown? b. How many copies of the book titled The Lost Tribe are owned by each library branch? c. Retrieve the names of all borrowers who do not have any books checked out. d. For each book that is loaned out from the Sharpstown branch and whose DueDate is today, retrieve the book title, the borrowers name, and the borrowers address. e. For each library branch, retrieve the branch name and the total number of books loaned out from that branch. f. Retrieve the names, addresses, and number of books checked out for all borrowers who have more than five books checked out. g. For each book authored (or coauthored) by Stephen King, retrieve the title and the number of copies owned by the library branch whose name is Central. 7.24. Consider the following six relations for an order processing database application in a company: CUSTOMER(Cust#, Cname, City) ORDER(Order#, Odate, Cust#, Ord_Amt) ORDER_ITEM(Order#, Item#, Qty) ITEM(Item#, Unit_price) SHIPMENT(Order#, Warehouse#, Ship_date) WAREHOUSE(Warehouse#, City) Here, Ord_Amt refers to total dollar amount of an order; Odate is the date the order was placed; Ship_date is the date an order is shipped from the warehouse. Assume that an order can be shipped from several warehouses. Specify the foreign keys for the above schema, stating any assumptions you make. Then specify the following queries in relational algebra: a. List the Order# and Ship_date for all orders shipped from Warehouse number W2. b. List the Warehouse information from which the Customer named Jose Lopez was supplied his orders. Produce a listing: Order#, Warehouse#. c. Produce a listing: CUSTNAME, #OFORDERS, AVG_ORDER_AMT, where the middle column is the total number of orders by the customer and the last column is the average order amount for that customer. d. List the orders that were not shipped within 30 days of ordering. e. List the Order# for orders that were shipped from all warehouses that the company has in New York. 7.25. Consider the following relations for a database that keeps track of business trips of salespersons in a sales office: SALESPERSON(SSN, Name, Start_Year, Dept_No) TRIP(SSN, From_City, To_City, Departure_Date, Return_Date, Trip_ID) EXPENSE(Trip_ID, Account#, Amount) Specify the foreign keys for the above schema, stating any assumptions you make. Then specify the following queries in relational algebra: a. Give the details (all attributes of TRIP relation) for trips that exceeded $2000 in expenses. b. Print the SSN of salesman who took trips to Honolulu. c. Print the total trip expenses incurred by the salesman with SSN = 234-56-7890. 7.26. Consider the following relations for a database that keeps track of student enrollment in courses and the books adopted for each course: STUDENT(SSN, Name, Major, Bdate) COURSE(Course#, Cname, Dept) ENROLL(SSN, Course#, Quarter, Grade) BOOK_ADOPTION(Course#, Quarter, Book_ISBN) TEXT(Book_ISBN, Book_Title, Publisher, Author) Specify the foreign keys for the above schema, stating any assumptions you make. Then specify the following queries in relational algebra: a. List the number of courses taken by all students named John Smith in Winter 1999 (i.e., Quarter = W99). b. Produce a list of textbooks (include Course#, Book_ISBN, Book_Title) for courses offered by the CS department that have used more than two books. c. List any department that has all its adopted books published by BC Publishing. 7.27. Consider the two tables T1 and T2 shown in Figure 07.21. Show the results of the following operations: a. b. c. d. e. f. 7.28. Consider the following relations for a database that keeps track of auto sales in a car dealership (Option refers to some optional equipment installed on an auto): CAR (Serial-No, Model, Manufacturer, Price) (Serial-No, Option-Name, Price) OPTIONS SALES (Salesperson-id, Serial-No, Date, Sale-price) (Salesperson-id, Name, Phone) SALESPERSON First, specify the foreign keys for the above schema, stating any assumptions you make. Next, populate the relations with a few example tuples, and then show an example of an insertion in the SALES and SALESPERSON relations that violates the referential integrity constraints and another insertion that does not. Then specify the following queries in relational algebra: a. For the salesperson named Jane Doe, list the following information for all the cars she sold: Serial#, Manufacturer, Sale-price. b. List the Serial# and Model of cars that have no options. c. Consider the natural join operation between SALESPERSON and SALES. What is the meaning of a left outer join for these tables (do not change the order of relations). Explain with an example. d. Write a query in relational algebra involving selection and one set operation and say in words what the query does. 8.1. How do the relations (tables) in SQL differ from the relations defined formally in Chapter 7? Discuss the other differences in terminology. Why does SQL allow duplicate tuples in a table or in a query result? List the data types that are allowed for SQL2 attributes. How does SQL allow implementation of the entity integrity and referential integrity constraints described in Chapter 7? What about general integrity constraints? What is a view in SQL, and how is it defined? Discuss the problems that may arise when one attempts to update a view. How are views typically implemented? Describe the six clauses in the syntax of an SQL query, and show what type of constructs can be specified in each of the six clauses. Which of the six clauses are required and which are optional? Describe conceptually how an SQL query will be executed by specifying the conceptual order of executing each of the six clauses. Consider the database shown in Figure 01.02, whose schema is shown in Figure 02.01. What are the referential integrity constraints that should hold on the schema? Write appropriate SQL DDL statements to define the database. Repeat Exercise 8.7, but use the AIRLINE database schema of Figure 07.19. Consider the LIBRARY relational database schema of Figure 07.20. Choose the appropriate action (reject, cascade, set to null, set to default) for each referential integrity constraint, both for delete of a referenced tuple, and for update of a primary key attribute value in a referenced tuple. Justify your choices. Write appropriate SQL DDL statements for declaring the LIBRARY relational database schema of Figure 07.20. Use the referential actions chosen in Exercise 8.9. Write SQL queries for the LIBRARY database queries given in Exercise 7.23. How can the key and foreign key constraints be enforced by the DBMS? Is the enforcement technique 8.2. 8.3. 8.4. 8.5. 8.6. 8.7. 8.8. 8.9. 8.10. 8.11. 8.12. you suggest difficult to implement? Can the constraint checks be executed efficiently when updates are applied to the database? 8.13. 8.14. Specify the queries of Exercise 7.18 in SQL. Show the result of each query if it is applied to the COMPANY database of Figure 07.06. Specify the following additional queries on the database of Figure 07.05 in SQL. Show the query results if each query is applied to the database of Figure 07.06. a. For each department whose average employee salary is more than $30,000, retrieve the department name and the number of employees working for that department. b. Suppose that we want the number of male employees in each department rather than all employees (as in Exercise 08.14a). Can we specify this query in SQL? Why or why not? 8.15. 8.16. Specify the updates of Exercise 7.19, using the SQL update commands. Specify the following queries in SQL on the database schema of Figure 01.02. a. Retrieve the names of all senior students majoring in CS (computer science). b. Retrieve the names of all courses taught by Professor King in 1998 and 1999. c. For each section taught by Professor King, retrieve the course number, semester, year, and number of students who took the section. d. Retrieve the name and transcript of each senior student (Class = 5) majoring in CS. A transcript includes course name, course number, credit hours, semester, year, and grade for each course completed by the student. e. Retrieve the names and major departments of all straight-A students (students who have a grade of A in all their courses). f. Retrieve the names and major departments of all students who do not have a grade of A in any of their courses. 8.17. Write SQL update statements to do the following on the database schema shown in Figure 01.02. a. Insert a new student <Johnson, 25, 1, MATH> in the database. b. Change the class of student Smith to 2. c. Insert a new course <Knowledge Engineering,CS4390, 3,CS>. d. Delete the record for the student whose name is Smith and whose student number is 17. 8.18. Specify the following views in SQL on the COMPANY database schema shown in Figure 07.05. a. A view that has the department name, manager name, and manager salary for every department. b. A view that has the employee name, supervisor name, and employee salary for each employee who works in the Research department. c. A view that has project name, controlling department name, number of employees, and total hours worked per week on the project for each project. d. A view that has project name, controlling department name, number of employees, and total hours worked per week on the project for each project with more than one employee working on it. 8.19. Consider the following view DEPT_SUMMARY, defined on the COMPANY database of Figure 07.06: CREATE VIEW AS SELECT FROM GROUP BY DEPT_SUMMARY (D, C, TOTAL_S, AVERAGE_S) DNO, COUNT (*), SUM (SALARY), AVG (SALARY) EMPLOYEE DNO; State which of the following queries and updates would be allowed on the view. If a query or update would be allowed, show what the corresponding query or update on the base relations would look like, and give its result when applied to the database of Figure 07.06. a. b. SELECT * FROM DEPT_SUMMARY; SELECT D, C FROM DEPT_SUMMARY WHERE TOTAL_S > 100000; SELECT D, AVERAGE_S FROM DEPT_SUMMARY WHERE C > (SELECT C FROM DEPT_SUMMARY WHERE D=4); UPDATE DEPT_SUMMARY SET D=3 WHERE D=4; DELETE FROM DEPT_SUMMARY WHERE C > 4; c. d. e. 8.20. Consider the relation schema CONTAINS(Parent_part#, Sub_part#); a tuple in CONTAINS means that part contains part as a direct component. Suppose that we choose a part that contains no other parts, and we want to find the part numbers of all parts that contain , directly or indirectly at any level; this is a recursive query that requires computing the transitive closure of CONTAINS. Show that this query cannot be directly specified as a single SQL query. Can you suggest extensions to SQL to allow the specification of such queries? Specify the queries and updates of Exercises 7.20 and 7.21, which refer to the AIRLINE database, in SQL. Choose some database application that you are familiar with. a. b. c. d. Design a relational database schema for your database application. Declare your relations, using the SQL DDL. Specify a number of queries in SQL that are needed by your database application. Based on your expected use of the database, choose some attributes that should have indexes specified on them. 8.21. 8.22. e. Implement your database, if you have a DBMS that supports SQL. 8.23. Specify the answers to Exercises 7.24 through 7.28 in SQL.

Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

University of Tech - Iraq - COMPUTER S - Database
University of Tech - Iraq - COMPUTER S - Database
University of Tech - Iraq - COMPUTER S - Database
Index of /~alp/db1/samplesName Last modified Size DescriptionParent Directory DrDasGuestLecture.pdf SampleFinal.pdf SampleFinalQ2Q4.pdf SampleMT2.pdf29-Nov-2004 13:01 02-Dec-2004 14:43 29-Nov-2004 13:08 24-Apr-2004 17:33 24-Apr-2004 17:33178k 12k 13k
University of Tech - Iraq - COMPUTER S - Database
University of Tech - Iraq - COMPUTER S - Database
University of Tech - Iraq - COMPUTER S - Database
Using Oracle on OmegaOracle accounts on Omega are created at the beginning of each semester to students enrolled in a database classes offererd by CSE and INSY departments. The Oracle accounts will be created at the instructors' request only, because of
University of Tech - Iraq - COMPUTER S - Database
University of Tech - Iraq - COMPUTER S - Database
University of Tech - Iraq - COMPUTER S - Database
Database Systems I ProjectA Database Driven Web SiteDescription A database-driven web site. The project will give you an opportunity to exercise the techniques and tools you learn in this class. The three main functions expected from the database-driven
University of Tech - Iraq - COMPUTER S - Database
Entity Relationship modeling from an ORM perspective: Part 3Terry Halpin Microsoft Corporation IntroductionThis article is the third in a series of articles dealing with Entity Relationship (ER) modeling from the perspective of Object Role Modeling (ORM
University of Tech - Iraq - COMPUTER S - Database
Solutions for Homework 3 &amp; 4 Combo8.9 Consider the LIBRARY relational database schema of Figure 7.20. Choose the appropriate action (reject (restrict), cascade, set to null, set to default) for each referential integrity constraint, both for d e l e t e
University of Tech - Iraq - COMPUTER S - Database
CSE 5330: Database Systems I Fall 2001 Homework #2Due on Monday, October 1st, at beginning of class. Worth 3% of the final gradeAnswer KeySuppose we have a database consisting of the following four relations:serves(restaurant,meal,price) likes(patron,
University of Tech - Iraq - COMPUTER S - Database
CSE 5330: Database Systems I Fall 2001 Homework #1Due on Wednesday September 20 Worth 3% of the final grade Answer key for Q1 Answer key for Q2(a) EER is posted on Instructor's bulletin board (306 NH) Answer key for Q2(b) UML Directions for this homework
University of Tech - Iraq - COMPUTER S - Database
Sample SQL query with the &quot;having&quot; clause (adapted from LAN Times Guide to SQL by James R. Groff and Paul N. Weinberg, Mc Graw Hill, 1994). Given the schema salesreps(empl_num,name,age,rep_office,title,hire_date,manager,quota,sales) orders(order_num,order
University of Tech - Iraq - COMPUTER S - Database
University of Tech - Iraq - COMPUTER S - Database
University of Tech - Iraq - COMPUTER S - Database
Index of /~alp/db1/erwinName Last modified Size DescriptionParent Directory IEvsORM.pdf29-Nov-2004 13:01 17-Sep-2003 16:4155k 180k 17k 20k 19k 18k 20k 19kaf_erwin_datamodeler.&gt; 10-Sep-2003 13:56 erwinIDEF1Xattribute.&gt; 10-Sep-2003 13:56 erwinIDEF1Xlog
University of Tech - Iraq - COMPUTER S - Database
Chapter 23Database Security and AuthorizationCopyright 2004 Pearson Education, Inc.Chapter Outline1 Database Security and Authorization 1.1 Introduction to Database Security Issues 1.2 Types of Security 1.3 Database Security and DBA 1.4 Access Protect
University of Tech - Iraq - COMPUTER S - Database
Copyright 2004 Pearson Education, Inc.Chapter 17Introduction to Transaction Processing Concepts and TheoryCopyright 2004 Pearson Education, Inc.Introduction to Transaction Processingl A transaction is a groups of read/write operations that constitute
University of Tech - Iraq - COMPUTER S - Database
Chapter 16 Practical Database Design and TuningCopyright 2004 Pearson Education, Inc.Chapter Outline1. Physical Database Design in Relational Databases 2. An Overview of Database Tuning in Relational Systems.Elmasri/Navathe, Fundamentals of Database S
University of Tech - Iraq - COMPUTER S - Database
Chapter 15Algorithms for Query Processing and OptimizationCopyright 2004 Pearson Education, Inc.Chapter Outline (1)0. Introduction to Query Processing 1. Translating SQL Queries into Relational Algebra 2. Algorithms for External Sorting 3. Algorithms
University of Tech - Iraq - COMPUTER S - Database
Chapter 14Indexing Structures for FilesCopyright 2004 Ramez Elmasri and Shamkant NavatheChapter Outlinel Types of Single-level Ordered Indexes Primary Indexes Clustering Indexes Secondary Indexes l Multilevel Indexes l Dynamic Multilevel Indexes Using
University of Tech - Iraq - COMPUTER S - Database
Copyright 2004 Pearson Education, Inc.Chapter 12Practice Database Design Methodology and Use of UML DiagramsCopyright 2004 Pearson Education, Inc.FIGURE 12.1 Phases of database design and implementation for large databases.Elmasri and Navathe, Fundam
University of Tech - Iraq - COMPUTER S - Database
Chapter 11Relational Database Design Algorithms and Further DependenciesCopyright 2004 Ramez Elmasri and Shamkant NavatheChapter Outline0. Designing a Set of Relations 1. Properties of Relational Decompositions 2. Algorithms for Relational Database Sc
University of Tech - Iraq - COMPUTER S - Database
Chapter 10Functional Dependencies and Normalization for Relational DatabasesCopyright 2004 Pearson Education, Inc.Chapter Outline1 Informal Design Guidelines for Relational Databases 1.1Semantics of the Relation Attributes 1.2 Redundant Information in
University of Tech - Iraq - COMPUTER S - Database
Chapter 9SQL: Assertions, Views, and Programming TechniquesCopyright 2004 Pearson Education, Inc.Chapter Outline9.1 General Constraints as Assertions 9.2 Views in SQL 9.3 Database Programming 9.4 Embedded SQL 9.5 Functions Calls, SQL/CLI 9.6 Stored Pr
University of Tech - Iraq - COMPUTER S - Database
Copyright 2004 Pearson Education, Inc.Chapter 8SQL-99: Schema Definition, Basic Constraints, and QueriesCopyright 2004 Pearson Education, Inc.l Used to CREATE, DROP, and ALTER the descriptions of the tables (relations) of a databaseData Definition, C
University of Tech - Iraq - COMPUTER S - Database
Chapter 7Relational Database Design by ER- and EERR-to-Relational MappingCopyright 2004 Pearson Education, Inc.Chapter Outlinel ER-to-Relational Mapping AlgorithmStep 1: Mapping of Regular Entity Types Step 2: Mapping of Weak Entity Types Step 3: Map
University of Tech - Iraq - COMPUTER S - Database
Chapter 6The Relational Algebra and CalculusCopyright 2004 Ramez Elmasri and Shamkant NavatheChapter Outlinel Example Database Application (COMPANY) l Relational Algebra Unary Relational Operations Relational Algebra Operations From Set Theory Binary
University of Tech - Iraq - COMPUTER S - Database
Chapter 5The Relational Data Model and Relational Database ConstraintsCopyright 2004 Pearson Education, Inc.Chapter Outlinel Relational Model Concepts l Relational Model Constraints and Relational Database Schemas l Update Operations and Dealing with
University of Tech - Iraq - COMPUTER S - Database
Chapter 3Data Modeling Using the Entity-Relationship (ER) ModelCopyright 2004 Pearson Education, Inc.Chapter Outlinel Example Database Application (COMPANY) l ER Model Concepts Entities and Attributes Entity Types, Value Sets, and Key Attributes Rela
University of Tech - Iraq - COMPUTER S - Database
Copyright 2004 Pearson Education, Inc.Chapter 2Database System Concepts and ArchitectureCopyright 2004 Pearson Education, Inc.Data Modelsl Data Model: A set of concepts to describe the structure of a database, and certain constraints that the databas
University of Tech - Iraq - COMPUTER S - Database
Copyright 2004 Pearson Education, Inc.Chapter 1Introduction and Conceptual ModelingCopyright 2004 Pearson Education, Inc.Types of Databases and Database Applicationsl Numeric and Textual Databases l Multimedia Databases l Geographic Information Syste
USC - EE - 357
Fall09 SyllabusBasic Organization of Computer SystemsAbstractEE 357NazarianThis course introduces the basics of computer architecture and organization with a focus on embedded systems. Instruction set architecture and assembly language programming is
USC - EE - 357
EE 357 Homework 1Fall 2009 Nazarian Name: _ Assigned Tue. Sep. 1st Due: Friday Sep. 11th at 1pm (RTH109) Score: _Data Representation 1) (25 pts) Each C declaration of the variable x is initialized to a value in decimal. Show that value represented in he
USC - EE - 357
EE 357 Homework 1Fall 2009 Nazarian Solutions Assigned Tue. Sep. 1st Due: Friday Sep. 11th at 1pm (RTH109) 1) a. b. c. d. e. f. short int x = 13; 0x000D short int x = -32,767; 0x8001 unsigned char = 246; 0xF6 int x = -4096; 0xFFFFF000 unsigned char x = 1
USC - EE - 357
EE 357 Homework 2 SolutionsFall 2009 Assigned Friday, Sep. 18 Due: Friday, Sep. 25 at 1pm (RTH109) Nazarian Score: _Instruction Set Architecture 1. a. T / F: Instruction Set Architecture must define HW implementation details like clock speed. b. T / F:
USC - EE - 357
EE 357 Homework 2Fall 2009 Nazarian Name: _ Assigned Friday, Sep. 18 Due: Friday, Sep. 25 at 1pm (RTH109) Instruction Set Architecture 1. (3 pts.) Enter T or F for each question below. a. T / F: Instruction Set Architecture must define HW implementation
USC - EE - 357
EE 357 Homework 3 SolutionsFall 2009 Nazarian Name: _ Assigned Friday, Oct. 2 Due: Tuesday, Oct. 13 in class (RTH109) Score: _For problems Error! Reference source not found. and Error! Reference source not found. and Error! Reference source not found. c
USC - EE - 357
EE 357 Homework 3Fall 2009 Nazarian Name: _ Assigned Friday, Oct. 2 Due: Tuesday, Oct. 13 in class (RTH109) For problems 1) and 2) and 3) consider the following assembly code. Instructions: Enter all register and memory values in hexadecimal (with a prec
USC - EE - 357
EE 357 Homework 4Fall 2009 Nazarian Name: _ Assigned Tuesday, Nov. 3 Due: Thursday, Nov. 12 in class (RTH 105) Score: _1) (12 pts.) A certain memory controller connects a processor with a 32-bit address bus (A31-A0) and 64-bit data bus to a memory syste
USC - EE - 357
EE 357 Homework 5Fall 2009 Nazarian Name: _ Assigned Tuesday, Nov. 17 Due: Monday, Nov. 30 (EEB340 at 5pm) Score: _1) Performance and Amdahls Law a) Exercises 1.3.1-1.3.3 in CO&amp;D, 4th Ed. page 59: Consider three different processors P1, P2, and P3 execu
USC - EE - 357
EE 357 Sample QuestionsNazarian Fall 09 Name: _ Lecture 11:00 Closed Book / 90 minutes Perfect Score: 100 / 103 Score: _ Note: ADDQ and SUBQ are instructions that are functionally equivalent to ADDI &amp; SUBI 1. Short Answer (12 pts.) a. Use of EVT to get t
USC - EE - 357
EE 357 Sample QuestionsNazarian Fall 09 Name: _ Lecture 11:00 Closed Book / 90 minutes Perfect Score: 100 / 103 Score: _ Note: ADDQ and SUBQ are instructions that are functionally equivalent to ADDI &amp; SUBI 1. Short Answer (12 pts.) a. Name one difference
USC - EE - 357
EE357 Midterm exam guidelines 1) The midterm exam for EE357 will be on Tuesday October 20, 2009 at THH210. 2) The exam is closed book and calculators are not allowed. 3) It will cover the lecture slide units 0 to 10 (excluding slides titled as [Optional])
USC - EE - 357
University University of Southern California Viterbi School of EngineeringEE357 Basic Organization of Computer Systems Organization of Computer Systems IntroductionReferences: 1) 2) Textbook Mark Redekopps slide series Redekopp slide seriesShahin Nazar
USC - EE - 357
University University of Southern California Viterbi School of EngineeringEE357 Basic Organization of Computer Systems Organization of Computer Systems Fixed Point Systems and Arithmetic Point Systems and ArithmeticReferences: 1) 2) Textbook Mark Redeko
USC - EE - 357
University University of Southern California Viterbi School of EngineeringEE357 Basic Organization of Computer Systems Organization of Computer Systems Multiplication and Division TechniquesReferences: 1) 2) Textbook Mark Redekopps slide series Redekopp
USC - EE - 357
University University of Southern California Viterbi School of EngineeringEE357 Basic Organization of Computer Systems Organization of Computer Systems IEEE 754 Floating Point Representation Point Floating Point ArithmeticReferences: 1) 2) Textbook Mark
USC - EE - 357
University University of Southern California Viterbi School of EngineeringEE357 Basic Organization of Computer Systems Organization of Computer Systems Instruction Set ArchitectureReferences: 1) 2) Textbook Mark Redekopps slide series Redekopp slide ser
USC - EE - 357
University University of Southern California Viterbi School of EngineeringEE357 Basic Organization of Computer Systems Organization of Computer Systems CF Assembly BasicsReferences:1) 2) 3) Textbook Mark Redekopps slide series Freescale documents on CF
USC - EE - 357
University University of Southern California Viterbi School of EngineeringEE357 Basic Organization of Computer Systems Organization of Computer Systems Assembler Directives and ProgrammingReferences: 1) 2) 3) Textbook Mark Redekopps slide series Freesca
USC - EE - 357
University University of Southern California Viterbi School of EngineeringEE357 Basic Organization of Computer Systems Organization of Computer Systems Compare and Branch Instructions Branch TranslationReferences: 1) 2) 3) Textbook Mark Redekopps slide
USC - EE - 357
University University of Southern California Viterbi School of EngineeringEE357 Basic Organization of Computer Systems Organization of Computer Systems Subroutines StacksReferences: 1) 2) 3) Textbook Mark Redekopps slide series Freescale documents on CF
USC - EE - 357
University of Southern California Viterbi School of Engineering ViterbiEE357 Basic Organization of Computer Systems (Embedded) Systems Programming OverviewReferences: 1) 2) 3) Textbook Mark Redekopps slide series Freescale documents on CFShahin Nazaria
USC - EE - 357
University University of Southern California Viterbi School of EngineeringEE357 Basic Organization of Computer Systems Organization of Computer Systems Interrupts TimersReferences: 1) 2) 3) Textbook Mark Redekopps slide series Freescale documents on CF
USC - EE - 357
University University of Southern California Viterbi School of EngineeringEE357 Basic Organization of Computer Systems Organization of Computer Systems Serial I/O A-to-D Converter DMAFall 2009References: 1) 2) 3) TextbookMark Redekopps slide series Fr
USC - EE - 357
University University of Southern California Viterbi School of EngineeringEE357 Basic Organization of Computer Systems Organization of Computer Systems Memory System Overview SRAM SRAM vs. DRAM DRAM DMA &amp; Endian-nessReferences: 1) 2) Textbook Mark Redek
USC - EE - 357
University University of Southern California Viterbi School of EngineeringEE357 Basic Organization of Computer Systems Organization of Computer Systems Cache: Definitions Address Mapping Performance References:1) 2) Textbook Mark Redekopps slide series
USC - EE - 357
University University of Southern California Viterbi School of EngineeringEE357 Basic Organization of Computer Systems Organization of Computer Systems MIPS ISAReferences: 1) 2) Textbook Mark Redekopps slide seriesShahin NazarianFall 2009Components o
USC - EE - 357
University University of Southern California Viterbi School of EngineeringEE357 Basic Organization of Computer Systems Organization of Computer Systems Performance ModelingReferences: 1) 2) Textbook Mark Redekopps slide seriesShahin NazarianFall 2009