Beruflich Dokumente
Kultur Dokumente
Page 1 of 33
Contents
CS490 Fall 2006 Final
13
13
22
27
31
36
41
A) the data contained in the two tables are related to each other in some way
B) the structure of the one table is inherited from the other table
C) information from both tables is always used together
D) the data from one table is inherited from the other table
24. The fields in one table that 1i11k to the primary key in another table are called ______ .
A) metadata
B) composite key
C) dependent key
D) foreign key
25. The purpose of an N-Ary association is ______ .
A) To deal with relationships that involves more than two tables
B) to capture a parent-child relationship
C) to represent an inheritance relationship
D) to deal with one to many relationships
26. What is the purpose of the SQL operator IN?
A) Specifies that the sort order should be increasing
B) Used to test if one value appears in a set of values
C) Indicates which table each field can be found
D) Used in the GROUP BY statement to indicate sub-groups
27. A table on the many side of a one to many or many to many relationship must______ .
A) Be in Third Normal Form (3NF)
B) have a composite key
C) be in domain-key normal form (DKNF)
D) be in Boyce-Codd Normal Form (BCNF)
28. Which of the following is an example where an Online Transaction Processing system would not be used?
A) Clerk recording your purchases at the grocery checkout
B) Checking the current order status
C) The inventory warehouse pulling parts to till an order
D) None of the above. All of the above applications would use Online Transaction Processing.
29. The process that stores copies of a table and stores it in several different locations at the same time is called
______ ?
A) Partitioning
B) Segmentation
C) Data mirroring
D) Replication
30. The definition of primary and foreign key relationships are set using SQL ______ .
A) Keys
B) Assignments
C) Rules
D) Constraints
31. Advantages of a DBMS include all but which of the following?
A) Ease of application development
B) Data Independence
C) Uniform security, privacy and integrity
D) Decentralized administration of the data
32. What is the impact of not including a JOIN command when using multiple tables in a query?
A) The primary keys in each table are joined together
B) The query will not work - an error is generated
C) The foreign keys in each table are linked to the primary keys in the other tables
D) All records in each table are associated with all records in the other tables
33. How does an outer join differ from an inner join?
A) Inner joins involve only one table while an outer join involves multiple tables.
B) Inner joins are processed with the irmer most command first, while the outer join processes the outer most
command first.
C) Inner joins only connects records that have matching values in each table, where as an outer join includes
records without a match in the other table
D) Inner joins connect tables within the database while outer joins forms a connect to a table outside the database
34. A Database Cursor _______.
25. A SQL keyword that is commonly used to answer questions involving some reference to 'every' item in a
certain field (i.e., such a students that have taken every MIS class offered, or who has had every Accounting
faculty for at least one c1ass)?
A) EVERY
B) EXISTS
C) IN
D) ALL
26. When creating a query, what is the purpose of including a column Alias?
A) To control the sort order
B) To give the query designer control over the column name
C) To maintain anonymity
D) The real name is not known
27. The tool which assists in generating input screens is referred to as.
A) Input screen tool
B) data dictionary
C) report generator
D) forms generator
35. After conceptually designing your database, the information contained in a single class would normally be
stored in a ______.
A) Field
B) property
C) table
D) database
36. The purpose of am N-ary Association is
A) to deal with one to many relationships
C) to capture a parent-child relationship
15. In a university database, the normal multiplicity for a relationship between courses and students would be one
to many. False
16. SQL does not permit a given table from being included in a query more than once. False
17. The employee manager association is an example of a reflexive relationship. True
18. The solution to the problems created with a correlated subquery is to reference previously-saved data rather use
a subquery. True
19. It is always possible to properly design a database and avoid using composite keys. False
20. It is a good idea to wait until data is entered into the database before normalizing the tables False.
21. A good choice for a primary key for the university's student database is the student phone number. False
22. If a table does not have a composite key, then it is in 2NF. False
23. Specifying a zero (0) for the lower bound for the association multiplicity on a class diagram indicates that the
item is required. False
24. Database systems are traditionally designed to support the individual user (in contrast to multiple, simultaneous
users). False
25. The primary key must be unique for a given table. True
Part II, Multiple Choice Questions:
26. To implement a join where records in two tables are linked based on one value falling within a range of
values rather than exactly matches between the two tables, you would use a(n) ________________.
A) Outer Join
B) Equi-Join
C) Reflexive Join
D) Inequality Join
27. The primary difference between the Relational Data Base (RDB) and Object Oriented Data Base (OODB)
models is ____________________.
A) OODB supports multiple objects in the same database while RDB only supports a single table per database
B) RDB supports indexes, while OODB does not support indexes
C) OODB incorporates methods in with the definition of the data structure, while RDB does not
D) RDB allows the definition of the relationships between the different tables, while OODB does not allow the
relationships to be defined between objects
28. The modern database report writer __________________.
A) provides the tools for database designer to display information in the desired format
B) provides the tools for the database administrator to monitor and report on database use and activity
C) provide limited control over how information is displayed and reported.
D) is a career path that focuses on creating, managing and supporting the reports generated from databases
29. Not all queries can be constructed in a single SELECT statement. They have to be built up using the results
of one query as building blocks for the larger query. What is the term used for these smaller queries that are
integrated together to build the final query?
A) Query By Example
B) Sub-Schema
C) Schema
D) Subquery
30. How does an outer join differ from an inner join?
A) Inner joins involve only one table while an outer join involves multiple tables.
B) Inner joins only connects records that have matching values in each table, where as an outer join includes
records without a match in the other table
C) Inner joins connect tables within the database while outer joins forms a connect to a table outside the database
D) Inner joins are processed with the inner most command first, while the outer join processes the outer most
command first.
31. The type of form that acts like a meny and directs the user to other forms and reports is called a
A) Dropdown form
B) Menu form
C) Popup form
D) Switchboard form
32. In a university environment, what is the appropriate multiplicity for an association linking courses with
their list of pre-requisite courses? Focus on the numbers placed next to the 'Pre-requisite courses' side of the
association.
A) 1..*
B) 0..1
C) 1..1
D) 0..*
23. A transaction always involves at least two operations on the database. False
24. Ideally, a DBMS will guarantee the properties of Atomicity, Consistency, Isolation and Durability for each
transaction, but this may be relaxed for better performance. True
25. The most common database event types are business events, data events and user events. True
D) DISTINCT
35. The type of form that displays data from two tables that have a one-to-many relationship is called a
A) Relational form
B) Crosstab form
C) Subform
D) Referential form
36. Cascade delete in referential integrity means that:
A) If a record is deleted in the referenced relation, then all matching records in the referring table will be
deleted also
B) If a record having a foreign key is deleted, then all matching records in referenced relation are deleted also
C) A delete in the referring relation results in other deletes in the same table
D) None of the above
37. If you want to include a page number at the bottom of each page, this would be specified in the
A) Report gutter
B) Gutter
C) Page footer
D) Page setup
38. If a table had multiple identical records, then this table would be said to:
A) Have no primary key
B) Have no foreign key
C) Have multiple foreign keys
D) Have multiple primary keys
39. Database application developers should maximize the time spent on which of the following activities
A) Design
B) Programming
C) SQL
D) Both A and C above?
40. A table that is in ith normal form is:
A) Also in i-1 (or the next lower) normal form
C) Also in i+1 (or the next higher) normal form
48. Which DBMS component is responsible for data storage, retrieval and update?
A) The application generator
B) The query processor
C) The security subsystem
D) The database engine
49. Compared to the old file approach, the DBMS offers these unique advantages:
A) Access to data through application programs
B) The ability to store and retrieve data
C) Minimal data redundancy and ease of application development D) Fastest response time
50. The type of form that acts like a menu and directs the user to other forms and reports is called a
A) Menu form
B) Switchboard form
C) Dropdown form
D) Popup form
CS490 Summer 2007 Final
Part I, True/False Questions:
1. Procedural code is often placed within forms and reports. False
2. The goal of the feasibility study is to determine whether a proposed project is worth pursuing. True
3. A subquery uses the same syntax as a regular query True.
4. UML diagrams are very similar to ER (Entity Relation) diagrams, but are superior in several ways. True
5. Page headers are important sections for both reports and forms False.
6. A table alias is a way to change table names for presentation purposes in reports only but is not essential to answer
any type of query. False
7. DML is a set of commands that are used to define data. False
8. Abstract data types and sub-tables are relational features that are related to the object-oriented approach. True
9. The process of creating well-behaved sets of tables to efficiently store data, and minimize redundancy is called data
integrity. False
10. A class diagram is a graph of classes connected together through relationships. True
11. Aggregated functions are SQL functions that operate across the selected rows like Between, IN, and LIKE. False
12. An alias is a temporary name for a table or a column, often used when you need to refer to the same table more
than once. True
13. WHERE is a SQL clause used with the Group By statement. It restricts the output to only those groups that meet
the specified condition. False
14. The ASC and DESC keywords control the sort order of SQL query results. True
15. The primary key can have any value including a null value False
16. A tabular Form presents a single record at a time. False
17. A form that takes priority on the screen and forces the user to deal with it before continuing is known as modal
form. True
18. The definition of inheritance in a class hierarchy means each new class inherits methods from the prior classes and
can override these definitions and assign a new method with the same name to the new class. False
19. A function is a procedure designed to perform a specific computation. True
20. A relation is in 3NF if and only if it is in 1NF and some keys are dependent on the primary key. False
21. As long as you create all the indexes you need, a Hierarchical database systems will provide you with all the
answers and information you are searching for. True
22. A relational database system can easily support many-to-many relationship between two tables. False
23. All the changes defined in a transaction must be made together. True
24. Long trigger chains are usually difficult to debug, might loop on themselves, and can slow down the system. True
25. According to human factors design, the user must NOT be given control over the system and shouldn't be able to
customize it. Otherwise, the stability of the system will be lost. False
B) In single records
D) None of the answers is correct
28. To which normal form(s) does the following Fathers relation comply?
Fathers( PersonID, PersonName, FatherID, FatherName)
A) 1NF, 2NF
B) 1NF
C) 1NF, 2NF, 3NF, BCNF, 4NF
D) 1NF, 2NF, 3NF
29. Which of the following queries lists racing bikes which in 2003 sold more than the average price of racing
bikes in 2002?
A) SELECT Bicycle.SerialNumber, Bicycle.ModelType, Bicycle.OrderDate, Bicycle.SalePrice,
Avg(Bicycle.SalePrice) AS AvgOfSalePrice
FROM Bicycle
WHERE (((Bicycle.ModelType)="race") AND ((Bicycle.OrderDate) Between #1/1/2003# And #12/31/2003#) AND
Avg(Bicycle.SalePrice> AvgOfSalePrice WHERE (((Bicycle.ModelType)="race") AND ((Bicycle.OrderDate)
Between #1/1/2002# And #12/31/2002#))
GROUP BY Bicycle.SalePrice
ORDER BY Bicycle.SalePrice DESC
B) SELECT Bicycle.SerialNumber, Bicycle.ModelType, Bicycle.OrderDate, Bicycle.SalePrice,
Max(Bicycle.SalePrice) AS MaxOfSalePrice
FROM Bicycle
WHERE (((Bicycle.ModelType)="race") AND ((Bicycle.OrderDate) Between #1/1/2002# And #12/31/2003#))
ORDER BY Bicycle.SalePrice DESC
C) SELECT Bicycle.SerialNumber, Bicycle.ModelType, Bicycle.OrderDate, Bicycle.SalePrice
FROM Bicycle
WHERE (((Bicycle.ModelType)="race") AND ((Bicycle.OrderDate) Between #1/1/2003# And #12/31/2003#)
AND ((Bicycle.SalePrice)>
(SELECT Avg(Bicycle.SalePrice) AS AvgOfSalePrice
FROM Bicycle
WHERE (((Bicycle.ModelType)="race") AND ((Bicycle.OrderDate)
Between #1/1/2002# And #12/31/2002#))
))) ORDER BY Bicycle.SalePrice DESC;
D) SELECT Bicycle.SerialNumber, Bicycle.ModelType, Bicycle.OrderDate, Bicycle.SalePrice,
Max(Bicycle.SalePrice) AS MaxOfSalePrice
FROM Bicycle
WHERE (((Bicycle.ModelType)="race") AND ((Bicycle.OrderDate) Between #1/1/2002# And #12/31/2003#))
GROUP BY Bicycle.SalePrice
ORDER BY Bicycle.SalePrice DESC
30. Study the following class diagram, which of the following is/are true?
49. Compared to the old file approach, the DBMS offers these unique advantages:
A) Access to data through application programs
B) The ability to store and retrieve data
C) Minimal data redundancy and ease of application development D) Fastest response time
50. The type of form that acts like a menu and directs the user to other forms and reports is called a
A) Menu form
B) Switchboard form
C) Dropdown form
D) Popup form
CS490 Fall 2008 Final
Part I, True/False Questions:
1. The ORDER BY clause is used to sort query results based on any column or combination of columns. True
2. The UNION operator combines two differently structured tables like Animals and Sales, or like Employees and
Products in a single table. False
3. A Tabular Form presents several records in a single screen. True
4. A reflexive association links a class to itself using two different roles. True
5. Unlike the INSERT INTO Statement, the contents of VIEW will change in response to changes in the underlying
tables. True
6. In the relational model, composite attributes, multi-valued attributes and sub-tables can all be used in normalized
relations. False
7. The number of records returned by a query joining two tables together may exceed the number of records of the
largest of the two tables being joined. True
8. SELECT *
FROM Employee
GROUP BY DepartmentID;
is a valid SQL query False
9. A host language allows database application developers to develop user-defined functions and procedures. True
10. To design a database one MUST start from existing user forms and convert them into a set of tables and then
normalize the tables and finally produce the class diagram False
11. A poorly designed Form can result in inefficient and error prone data entry. True
12. A table alias is a way to change a column name for presentation purposes. False
13. The data stored in the database should be organized in a user-friendly way and must match exactly the way it
appears to the user in forms and reports False
14. A Subform is another term used to indicate a Modal Form. False
15. To develop database applications, one must choose either SQL or a traditional language such as C++ or Java, but
not both at the same time False
16. Business events, data events and user events can all be used in databases to trigger further actions. True
17. Providing feedback to the database user through multiple means in a form (for example visual, text and sound) is
good practice from a human factors design perspective. True
Use the following to answer questions 18-20:
The following functional dependencies apply to a patient operations relation:
Patient-Operation (PatientID, OperationType, Surgeon, Result)
(PatientID, OperationType) -> Surgeon, Result
Surgeon -> OperationType
18. Given the provided information, can a surgeon perform many operation types? False
19. Can a patient undergo the same operation type with more than one surgeon? False
20. Can a single operation type be performed by more than one surgeon? True
21. There can be no common elements among different subclasses in a Generalization association False
22. A desirable feature of database technology is the ability to change the storage structures or access techniques in
response to changing requirements without having to modify existing applications True
23. To represent an employee-supervisor situation, we can use a reflexive association to link each employee to his/her
supervisor True
24. The query:
SELECT *
FROM A INNER JOIN B
ON A.w = B.x AND A.y=B.z
is illegal because it will result in joining tables A and B by matching two columns. False
25. A relation that has a simple primary key (non-composite) is not necessarily in 3NF True
D) 1NF
27. Which set of functional dependencies will put the following student course registration table in 3NF?
Student-Course (StudentID, Course, Teacher, Grade)
A) (StudentID, Course) Teacher, Grade Course Teacher B) (StudentID, Course) Teacher, Grade Teacher Course
C) (StudentID, Course) Teacher, Grade Teacher Grade D) None of the above
28. Which of the following statements can be used to append one table to another?
A) ADD TABLE ......
B) ADD ROWS ...... TO ......
C) APPEND TABLE ....
D) INSERT ...... INTO .....
29. Which of the following are SQL DDL commands?
A) DROP TABLE, ALTER TABLE, DROP INDEX
C) All of the above
B) UNION, INTERSECT
D) SELECT, DIFFERENCE
D) referential form
36. To which normal form(s) does the following marriage relation comply?
Marriage(BrideID, GroomID, BrideFirstName, GroomFirstName, MarriageDate)
A) 1NF, 2NF and 3NF
B) 2NF only
C) 1NF and 2NF
D) 1NF only
D) page footer
13. Data triggers only activate after a value in a row is changed. False
14. A limitation of database systems is that no application outside of the DBMS can gain access to the data. False
15. Specifying a one (1) for the lower bound for the association multiplicity on a class diagram indicates that the item
is required. True
16. Using an IN operator is an alternative to using a group of OR clauses in a WHERE statement. True
17. SQL provides visually oriented tools for developing applications. False
18. To get subtotals for different grouped data, use the SQL GROUP BY and SUBTOTAL commands. False
19. It is always possible to properly design a database and avoid using composite keys. False
20. In a university database, the normal multiplicity for a relationship between courses and students would be many to
many. True
21. In procedural languages the developer specifies what is to be done and the system figures out how to do it. False
22. Including the DISTINCT operator in a query will always result it less than or equal to the number of records
returned when the DISTINCT operator is not used. True
23. Database cursor is used to indicate your current position in a database. False
24. Many to Many associations solve many problems in database designs. False
25. There is no specific set of procedures and rules to ensure that a table is in DKNF. True
B) DROP TABLE
C) SEQUENCE BY
D) GROUP BY
27. The Table T (A, B, C), where A -> B,C and B -> C is in
A) 2NF
B) 3NF
C) 4NF
D) BCNF
28. A SQL keyword that is commonly used to answer questions involving some reference to 'every' item in a
certain field (i.e., such a students that have taken every MIS class offered, or who has had every Accounting
faculty for at least one class)?
A) EXISTS
B) ALL
C) IN
D) EVERY
29. The process of defining and bundling all of the properties and functions into a class is called _________.
A) Encapsulation
B) inheritance
C) polymorphism
D) database design
30. The term for information that describes what type of data is available in a database is _________.
A) Index data
B) data dictionary
C) metadata
D) data repository
31. Which of the following is the most appropriate approach to automatically generate purchase order when the
inventory level drops to a predetermined level?
A) Input mask
B) Data Trigger
C) Referential Integrity constraint
D) Database Cursor
32. Which SQL command is used to indicate how tables are to be linked together in a query?
A) TABLES
B) GROUP
C) LINK
D) INNER JOIN
33. What is the SQL command to change the structural design of a table?
A) CHANGE STRUCTURE
B) STRUCTURE
C) ALTER TABLE
D) MODIFY DATABASE
34. Which component of the database management system (DBMS) most affects the performance (speed)?
A) Query Processor
B) Security Subsystem
C) Database Engine
D) Data Storage Subsystem
35. The ability to modify the data structure and not have to change the programs using that data is called
A) Data independence
D) data integrity
B) TABLES
C) FROM
D) SOURCE
39. Why is it a good idea to use special associations when drawing class diagrams?
A) Specialized tools are available to create these special associations.
B) They hide the detail concerning the database structure, making them easier to understand
C) It is necessary. It is impossible to draw some diagrams without using these special structures.
D) They convey more information about the underlying structure of the database, making them easier to
understand.
40. What negative effect can triggers have on a database?
A) Makes it more complicated for the end user
B) Since the execution order is only defined at run time, results can be unpredictable
C) They can create security holes if not done properly
D) Cascading triggers can slow down the database
41. Tables in second normal form (2NF) _________.
A) have a composite key
B) have all non-key fields depend on the whole primary key
C) eliminate the possibility of a insertion anomalies
D) eliminate all hidden dependencies
42. A reflexive association is drawn using which symbol _________.
A) Small triangle at the end of a line connecting the aggregated item and multiple component items
B) small open diamond at the end of a line connecting two tables
C) small closed diamond at the end of a line connecting two tables
D) a line which loops back onto the same table
43. Which type of join would you use to join two tables based on one value in one table falling within a range of
values from the second table rather than exact matches between the two tables?
A) Outer Join
B) Reflexive Join
C) Range Join
D) Inequality Join
44. A table is in Boyce-Codd Normal Form (BCNF) if the table is in 3NF and ________.
A) Referential integrity is enforced
B) the table is indexed
C) no hidden dependencies exist between non-key fields and key fields
D) data integrity is enforced
45. Which of the following best illustrates the principle of consistency as related to transactions?
A) The process by which Ann transfers money from her checking to saving account is the same as the process Bob
uses to transfers money from his checking to saving account (where each use their own account numbers)
B) Access to the account balances using an ATM is always done in the same way
C) If no money is deposited or withdrawn from a no interest account, the balance today will be the same as the
balance tomorrow.
D) The amount of money withdrawn from a checking account equal the amount transferred to the saving
account
46. One approach used by databases to handle the differences in fonts used by different languages (i.e., English,
Russian, Chinese, etc.) is the support of ______________?
A) UNIX
B) Unicode
C) ASCII
D) Perl
B) WHERE
C) RULE
D) CONDITION
49. Assume you are creating a database to handle the data associated with instruction at a university. What is
the most appropriate special association to model degree requirements (for example, required number of credit
hours in general university requirements, specialty requirements, and electives)?
A) Reflexive association
C) generalization association
B) composition association
D) n-ary association
50. A key distinction between abstract data types and subtables is that _________.
A) abstract data types aggregate multiple fields from the base table into a single column, while subtables will
keep the fields in separate columns
B) abstract data types support the use of methods while subtables do not
C) subtables support inheritance and abstract data types do not
D) abstract data types support inheritance and subtables do not
21. In procedural languages the developer specifies what is to be done and the system figures out how to do it. False
22. A tabular form would be appropriate for a banking application where you only want to display a single user's
record at one time. False
23. A relation that has a simple primary key (non-composite) must be in BCNF False
24. From a Human Factors Design perspective, it is good practice for forms to provide Feedback only visually. False
25. The Object oriented database model is the most common database model in use today. False relational database
B) Delete All
C) Delete-Matching
D) UNIQUE
B) command button
C) unbound control
B) One to Many
34. What is the order of processing if both a BEFORE UPDATE row trigger and BEFORE UPDATE
table trigger are activated by the same event?
A) It is indeterminate, and will vary depending on system activity
B) Row trigger followed by table trigger
C) Table Trigger followed by Row Trigger
D) It depends on how the triggers are defined
35. You would use this SQL command to remove a table and all its contents from the database schema?
A) SEQUENCE BY
B) ERASE TABLE
C) DROP TABLE
D) DELETE FROM
36. Which type of query combines every row from the left table with every row from the right table and inserts
a NULLs where appropriate?
A) INNER JOIN
B) OUTER JOIN
C) FULL JOIN
D) THETA JOIN
B) 1..1
C) *..*
D) 0..1
C) Tools
D) Beans
B) 1NF
C) 4NF
D) 2NF
A) Prevent actions that would violate business rules that have been defined in the database
B) Examine changes/updates to the database and ensure they conform to business rules before they are implemented
C) Execute required actions that are necessary after data has been changed/updated in the database implemented
D) All of the above can be done using triggers
47. Which of the following are not SQL Data Definition Commands?
A) CREATE SCHEMA
B) SELECT FROM
C) ALTER TABLE
D) CREATE TABLE
48. A simple class diagram for a university database has only three classes: Teachers, Students and Courses.
How many binary associations will be sufficient to establish whether Teacher X is teaching Course Y to student
A) 2
B) 3
C) 1
D) None of the above
49. The following query is supposed to List the Items that have sold for a price higher than the average for
Items of the same Type:
SELECT A1.ItemID, A1.ItemName, A1.Type, SaleItem.SalePrice
FROM Items As A1 INNER JOIN SaleItem
ON A1.ItemID = SaleItem.ItemID
WHERE (SaleItem.SalePrice >
Which of the following correctly completes this query?
A) (SELECT Avg(SaleItem.SalePrice)
FROM Items AS A2 INNER JOIN SaleItem ON Items.ItemID = SaleItem.ItemID
WHERE (Items.Type = Items.Type) ) );
B) (SELECT Avg(SaleItem.SalePrice)
FROM Items As A2 INNER JOIN SaleItem
ON A2.ItemID = SaleItem.ItemID
WHERE (A2.Type = A1.Type) ) );
C) (SELECT Avg(SaleItem.SalePrice)
FROM Items INNER JOIN SaleItem ON Items.ItemID = SaleItem.ItemID
WHERE (Items.Type = Items.Type) ) );
D) (SELECT Avg(SaleItem.SalePrice)
FROM Items AS A1 INNER JOIN SaleItem
ON A1.ItemID = SaleItem.ItemID
WHERE (A2.Type = A1.Type) ) );
50. The data dictionary is:
A) A glossary of technical terms used in the database technology
B) A spell checker for the database
C) A description of the contents of the database
D) A language reference to locate definitions of words used in the database
6. Data triggers can only be set to activate after a change occurs in a value in a row. False
7. Views can be used exactly like tables in any retrieval query. True
8. When a class participates in a reflexive relationship, it should always use the same role on both ends of the
association. False
9. The primary key can never have the null value but may be duplicated if necessary False
10. A class should never be linked back to itself as this creates endless loops in class diagrams. False
11. The Relations in a relational database should be designed to appeal to the end user since the user may use them
directly without forms False
12. Normalization usually results in fewer tables in the database and therefore a simpler and better design. False
13. Including computed attributes in database tables is always a good idea as they save computation time True
14. If a user wishes to print a category name next to each row of output of a SQL query depending on certain
classification criteria, the CASE function can be used. True
15. Overlapping subclasses in a class diagram result in the same object appearing in more than one subclass, and
therefore should not be allowed. False
16. The UNION operation requires the operand tables to be union-compatible, while the INTERSECT command does
not require them to have this property. False
17. A view cannot be used exactly like a table when there is a need to update the view. True
18. A Row alias is a well-known mechanism to control the naming of rows in query results False
19. In database technology, existing applications should always be re-coded in response to changes in storage
structures and/or access techniques. False
20. Dependency information can never be accidentally lost in a table through deletion anomaly, even if the table is not
in 2NF. False
21. Columnar forms differ form Tabular forms in the way they present the data to the user. True
22. 2NF does not necessarily require the table to have a simple primary key. True
23. Class diagrams used in relational modeling are related to the object-oriented approach True
24. Report headers differ from page headers in the frequency and locations in which the headers will appear in the
final report. True
Use the following to answer question 25:
The following functional dependencies apply to an assembly line relation in a factory database:
Functional Dependency 1: Supervisor Task
Functional Dependency 2: (EmpID, Task) Supervisor, Supervisor-Evaluation
Relation: Employee-Task (EmpID, Task, Supervisor, Supervisor-Evaluation)
25. An employee can be assigned to the same task under many supervisors. False
B) Un-normalized
D) Redundant
B) Java
D) Relational databases
33. If you wish to allow the user to enter a value on a form or choose from a list, you should use:
A) A combo box control
C) An edit (text) box
34. Which of the following are characteristics of Graphical User Interfaces (GUIs)?
A) Is user friendly for most users
B) Limits access for users facing some physical challenge
C) Slows down professional users who can use command line interface efficiently
D) All of the above
35. BCNF requires that:
A) The relation must be in 2NF
C) The relation must be in 1NF
36. Which of the following reasons best describe the reason why the following query will not run against the
Student table shown?
SELECT * FROM Student WHERE StudentCity = "Amman" GROUP BY DepartmentID;
Student (StudentID, StudentName, StudentAddress, StudentCity, StudentTel, DepartmentID)
A) It selects attributes outside the grouping attributes
C) There is a type mismatch in the query
37. According to DeMorgan's Law, the boolean expression NOT ((NOT A) OR (NOT B)) is equivalent to:
A) NOT (A AND NOT B)
C) (A AND B)
B) NOT(A OR B)
D) (NOT A) AND (NOT B)
ON A2.AnimalID = SaleAnimal.AnimalID
WHERE (A2.Category = A1.Category) ) );
A) The animals that have sold for a price higher than the average "SalePrice" of "SaleAnimals".
B) The query will not run correctly. It contains syntax errors.
C) The query will run but will produce an empty result.
D) The animals that have sold for a price higher than the average for animals in that Category.
39. A marriage relation is said to be in third normal form when:
A) All attributes are dependent only on the bride (wife) ID
B) All attributes are dependent on a third attribute other than the groom ID or the bride ID
C) All attributes are dependent only on the groom (husband) ID
D) All attributes are dependent only on both the groom and bride IDs
40. Which of the following best describes the need for N-ary associations?
A) They cannot be easily replaced by binary associations
B) They are essential in reducing redundancy in the tables
C) They simplify the class diagram
D) None of the above
41. Many-to-Many associations are only permitted in high-level class diagrams because:
A) They cannot be implemented directly in a relational database
B) They cannot be translated into a pair of one to many associations
C) They complicate the class diagram
D) None of the above
42. Which SQL keyword is used to sort the query results?
A) ORDER BY
B) GROUP BY
C) SORT
D) DISTINCT
B) CREATE VIEW
D) All of the above
50. Compared to the database approach, the old file system approach offers these unique advantages:
A) Simplicity and occasionally faster response time
B) Minimal data redundancy and ease of application development
C) The ability to store and retrieve data
D) Access to data through application programs and user queries
A) If a record is deleted in the referenced relation, then all matching records in the referring table will be
deleted also
B) If a record having a foreign key is deleted, then all matching records in referenced relation are deleted also
C) A delete in the referring relation results in other deletes in the same table
D) None of the above
3. The ability to modify the data structure and not have to change the programs using that data is called
A) data integrity
B) data dictionary
C) referential integrity
D) data independence
4. Which SQL command is used to indicate how tables are to be linked together?
A) TABLES
5.
B) GROUP
D) JOIN
A table on the many side of a one to many or many to many relationship must______ .
C) LINK
What is the impact of not including a JOIN command when using multiple tables in a query?
9. In a university environment, what is the appropriate multiplicity for an association linking courses with
their list of pre-requisite courses? Focus on the numbers placed next to the 'Pre-requisite courses' side of
the association.
A) 1..*
10.
A.
B.
C.
D.
B) 0..1
C) 1..1
D) 0..*
5. A shopping mall has three movie theaters. Each theater has 100 seats. Theater 1 is assigned seat
numbers 1-100, theater 2 from 101-200, and theater 3 from 201-300.
Tickets used have serial numbers that are unique for each theater, but not unique across theaters. To
which normal forms would the following ticket booking relation comply?
TicketsSold(TicketSerialNumber,Theater, Date, StartTime, SeatNumber)
A) 1NF, 2NF, 3NF, BCNF, 4NF
B) 1NF, 3NF
C) 1NF, 2NF, 3NF
D) 1NF, 2NF
6. Which of the following is true when a known dependency is not captured by the table (hidden
dependencies)?
A) Could result in unnecessary duplication
B) Is an issue with BCNF and 4NF
C) Could result in lost data
D) All of the above
7. What is wrong with the following query:
SELECT EmployeeID, AVG(DISTINCT salary) AS average_salary
FROM employee emp
WHERE AVG(DISTINCT salary) > 50,000
A) We cannot use the keyword DISTINCT in the AVG function
B) We cannot use the AVG function in the WHERE clause
C) There is a missing comma between employee and emp in the FROM clause
Could produce different results
D) There is a missing GROUP BY clause
8. Which of the following is not true about the SQL language
A) It can be embedded into a host language
B) It allows the user to change the contents and structure of the database
C) It allows the user to define the sequence of operations on the database precisely
D) It is the dominant relational data language today
9. Which of the following is true about the Inner Join operation
A) It results in a table that is wider than either of its operands
B) It results in a table that has more tuples than either of its operands
C) It will show all tuples of both tables
D) Its operands must have the same number and types of attributes
10. Which of the following is true about deadlocks?
A) Occurs when the computer is down
B) Cannot occur if a locking mechanism is used
C) Cannot be resolved unless the system is shut down and restarted
D) Can be resolved by applying random wait times
""