CS490 All final Exams True False MCQ- Updated.doc

50
CS490 – All Final Exams T/F - MCQ Solutions Page 1 of 50 Contents CS490 Fall 2006 Final 2 Part I, True/False Questions:............................................. 2 Part II, Multiple Choice Questions:.......................................2 CS490 Spring 2006 Final 5 Part I, True/False Questions:...............................................5 Part II, Multiple Choice Questions:.........................................6 CS490 Fall 2007 Final 8 Part I, True/False Questions :............................................ 9 Part II, Multiple Choice Questions:.........................................9 QUIZ - FALL 2006/2007 13 Part I: True/False Questions...............................................13 Part II Multiple Choice....................................................13 CS490 Spring 2007 Final 13 Part I, True/False Questions:..............................................14 Part II, Multiple Choice Questions:........................................14 CS490 Summer 2007 Final 17 Part I, True/False Questions:..............................................17 Part II, Multiple Choice Questions:........................................18 CS490 Fall 2008 Final 22 Part I, True/False Questions:..............................................22 Part II, Multiple Choice Questions:........................................24 CS490 Spring 2008 Final 27 Part I, True/False Questions:..............................................27 Part II, Multiple Choice Questions:........................................28 CS490 Fall 2009 Final 31 Part I, True/False Questions :.............................................31 Part II, Multiple Choice Questions:........................................32 CS490 Spring 2009 Final 36 Part I, True/False Questions:..............................................36 Part II, Multiple Choice Questions:........................................37 CS490 Fall 2010 Final 41

Transcript of CS490 All final Exams True False MCQ- Updated.doc

Page 1: CS490 All final Exams True False MCQ- Updated.doc

CS490 – All Final Exams T/F - MCQ Solutions Page 1 of 33

Contents

CS490 Fall 2006 Final 2

Part I, True/False Questions:..................................................................................................................................2

Part II, Multiple Choice Questions:.......................................................................................................................2

CS490 Spring 2006 Final 5

Part I, True/False Questions:..........................................................................................................................................5

Part II, Multiple Choice Questions:...............................................................................................................................6

CS490 Fall 2007 Final 8

Part I, True/False Questions :.................................................................................................................................9

Part II, Multiple Choice Questions:...............................................................................................................................9

QUIZ - FALL 2006/2007 13

Part I: True/False Questions.........................................................................................................................................13

Part II Multiple Choice................................................................................................................................................13

CS490 Spring 2007 Final 13

Part I, True/False Questions:........................................................................................................................................14

Part II, Multiple Choice Questions:.............................................................................................................................14

CS490 Summer 2007 Final 17

Part I, True/False Questions:........................................................................................................................................17

Part II, Multiple Choice Questions:.............................................................................................................................18

CS490 Fall 2008 Final 22

Part I, True/False Questions:........................................................................................................................................22

Part II, Multiple Choice Questions:.............................................................................................................................24

CS490 Spring 2008 Final 27

Part I, True/False Questions:........................................................................................................................................27

Part II, Multiple Choice Questions:.............................................................................................................................28

CS490 Fall 2009 Final 31

Part I, True/False Questions :.......................................................................................................................................31

Part II, Multiple Choice Questions:.............................................................................................................................32

CS490 Spring 2009 Final 36

Part I, True/False Questions:........................................................................................................................................36

Part II, Multiple Choice Questions:.............................................................................................................................37

CS490 Fall 2010 Final 41

Page 2: CS490 All final Exams True False MCQ- Updated.doc

CS490 – All Final Exams T/F - MCQ Solutions Page 2 of 33

CS490 Fall 2006 Final

Part I, True/False Questions:

1. Properties of an object are stored as rows in a table. False

2. It is not possible to access data stored in a database using a program written in Visual Basic or COBOL. False

3. De Morgan's Law is used to simplify complex constraints. True

4. DBMS stores data efficiently with little wasted space. True

5. If a table is in 1NF and does not have a composite key, then it is in 2NF. True

6. A primary goal of a database system is to share data with multiple users. True

7. Multiple constraints can be included in a single query. True

8. Specifying an asterisk (*) for the association multiplicity on a class diagram indicates that the item is required. False

9. Specifying a zero) 0(for the lower bound for the association multiplicity on a class diagram indicates that the item is required False

10. SQL does not allow you to use the same table in a subquery as is being used in the outer query (i.e., the query that includes the subquery). False

11. If a table is in 3NF, it is also in 2N`F. True

12. The primary key does not necessarily have to be unique for a given table. False

13. A subquery uses the same syntax as a regular query. True

14. Procedural code is often placed within forms and reports. True

15. A View is a saved query. True

16. If you use a GROUP BY command, you cannot see the non-aggregated data in the same query. True

17. Including the DISTINCT operator in a query will always result it less than or equal to the number of records retuned when the DISTINCT operator is not used. True

18. A bad choice for a primary key for the university's student database is the student phone number. True

19. The employee - manager association is an example of a reflexive relationship True

20. Specifying a one (1) for the lower bound forth association multiplicity on a class diagram indicates that the item is required. True

Part II, Multiple Choice Questions:

21. When creating a query, what is the purpose of assigning a table Alias?A) To prevent correlated sub queriesB) The real name is not knownC) To distinguish between two instances of the same tableD) To maintain anonymity اسمه ذكر عدم طلب

22. The database design that uses a hierarchical data structure, but incorporates multiple data entry points is called a ______ .A) Object oriented databaseB) Hierarchical databaseC) Relational databaseD) Network database

23. If there is a relationship between two tables, this indicates that ______ .

Page 3: CS490 All final Exams True False MCQ- Updated.doc

CS490 – All Final Exams T/F - MCQ Solutions Page 3 of 33

A) the data contained in the two tables are related to each other in some wayB) the structure of the one table is inherited from the other tableC) information from both tables is always used togetherD) the data from one table is inherited from the other table24. 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 tablesB) to capture a parent-child relationshipC) to represent an inheritance relationshipD) 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 increasingB) Used to test if one value appears in a set of valuesC) Indicates which table each field can be foundD) 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 keyC) 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 checkoutB) Checking the current order statusC) The inventory warehouse pulling parts to till an orderD) 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 IndependenceC) 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 togetherB) The query will not work - an error is generatedC) The foreign keys in each table are linked to the primary keys in the other tablesD) 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 tableD) Inner joins connect tables within the database while outer joins forms a connect to a table outside the database

34. A Database Cursor _______.

Page 4: CS490 All final Exams True False MCQ- Updated.doc

CS490 – All Final Exams T/F - MCQ Solutions Page 4 of 33

A) Tracks all concurrency locks for the databaseB) Defines a Select statement and allows you to loop through the set of data and execute instructions on each rowC) Identities where you are in the database much like a bookmarkD) Manages the isolation level controls for the database35. What is the purpose of the serialization process?A) Forces the operations within a transaction to be run in a specific, predefined sequenceB) In a two-phase commit scheme, it ensures that everyone has obtained locks on resources before committing to the change.C) Allocates access time to the database to make sure it is fairD) Forces transactions to run separately so that result consistency is maintained

36. If indexes speed data retrieval, then why don't we index all fields in a database?A) It would take a lot of disk spaceB) The overhead of maintaining the index may outweigh the benefits derived.C) This is actually commonly done in industry.D) Indexing some fields would violate data integrity constraints

37. With regards to system maintenance, what is the purpose of defining database roles?A) Decision Support Systems will have different operational characteristics than Expert SystemsB) Simplifies the assignment of access privileges by creating logical groups with consistent access needsC) Categorizes the purpose and administrative requirements of the databaseD) Defining database roles helps in the system development process

38. What is metadata?A) The specifics about the DBMS (i.e., publisher, version number, copyright information, etc.)B) Operational metrics dealing with the database (i.e., number of users, average response time, number of records accessed, etc.)C) Database information that is made available on the intenet.D) Descriptive information about the data stored in the database

39. The type of form that displays data from two tables that have a one-to-many relationship is called a ______ .A) Referential form B) relational form C) subform D) crosstab form

40. The most popular distributed database configuration, where users (typically using desktop computers) request and receive data from a powerful computer is called _______ .A) File server system B) Terminal system C) Client/ server system D) Local area network

As a reference, the following are the standard definitions of 1NF, 2NF, 3NF, and BCNF: A relation is in first normal form (1NF) if and only if all attributes are atomic.(Atomic attributes are single valued, and cannot be composite, multi-valued or nested relations.) A relation is in second normal form (2NF) if it is in 1NF and each non-key attribute is fully functionally dependent on the primary key. A relation is in third normal form (3NF) if and only if it is in 2NF and no non-key attributes are transitively dependent on the primary key. A relation is in Boyce-Codd Normal Form (BCNF) if and only if it is in 3NF and every determinant is a candidate key (or K is a superkey).47. The ultimate goal in designing a database is to get all the tables into what normal form? A) First Normal Form B) Boyce Codd Normal Form C) Dependency Free Normal Form D) Domain Key Normal Form

48. Assume you want to create a contact list, and include all your contact's phone numbers, which fall into different categories (i.e., home/work, primary/secondary/emergency, mobile /pager/voice/fax). Not all contacts have all categories.The following Contact table is in what normal form?Contact (ID, Name, Hphone1, Hphone2, Hfax1, Hfax2, MobilePhone, Pager, Wphone1, Wphone2, Wfax1, Wfax2, EmergencyPhone)A) First Normal only B) Second Normal Form only C) First & Second Normal Form D) First, Second & third Normal Form

Page 5: CS490 All final Exams True False MCQ- Updated.doc

CS490 – All Final Exams T/F - MCQ Solutions Page 5 of 33

CS490 Spring 2006 Final

Part I, True/False Questions:1. If a table does not have a composite key, then it is in 2NF. True

2. It is always possible to properly design a database and avoid using composite keys. False

3. The SQL keyword DISTINCT is used to indicate that an attribute must have unique values in the original table used in the query. False row

4. A subtable is a just portion of a larger table. False

5. From a Human Factors Design perspective, it is good practice for forms to provide Feedback through visual, text, sound or a combination of media. True

6. In procedural languages the developer specifies what is to be done and the system figures out how to do it. False Database Managment Systems

7. It is possible to change a method or proper1y inherited from a higher level class. True

8. 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

9. All data triggers only activate after a value in a row is changed. False some

10. All queries can be designed to avoid subqueries. False

11. The relational database model is the predominant method of storing data today. True

12. The SQL UPDATE operation changes the table structure while leaving the data intact. False

13. In a university database, the normal multiplicity for a relationship between courses and students would be one to many. False many

14. The employee - manager association is an example of an inheritance relationship. False reflexive relationship

15. WHERE is used to place a constraint on aggregated properties. False Having

16. A View is a saved query and can be used in other queries. True

17. A single-row form would be appropriate for a banking application where you only want to display a single user's record at one time. True

18. The employee - manager association is an example of a reflexive relationship. True

19. SQL is not a procedural language. True

20. A reflexive join means that a table is joined to itself. True

Part II, Multiple Choice Questions:21. Which of the following types of isolation levels provides the MOST protection against concurrency problems?A) SERIALIZABLE B) REPEATABLE READC) READ COMMITTED D) READ UNCOMMITTED

22. Procedural code can often be placed in which of the following?A) Only in forms and reports B) Only in the query systemC) Only in external programs D) All of the above

23. Which of the following is not one of the primary tasks of a query language?A) Define the structure of the databaseB) Locate and retrieve data contained in the databaseC) Change and manage the information stored in the databaseD) All the above are primary tasks of a query language

24. What is the component of a DBMS that is responsible for storing, retrieving, and updating data?A) Database engine B) Query engine C) Data management engine D) Data dictionary

Page 6: CS490 All final Exams True False MCQ- Updated.doc

CS490 – All Final Exams T/F - MCQ Solutions Page 6 of 33

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) ALL26. 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 nameC) 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

28. What is the purpose of the SQL operator IN?A) Specifies that the sort order should be increasing B) Used in the GROUP BY statement to indicate sub-groupsC) Used to test if one value appears in a set of values D) Indicates which table each field can be found

Assume that you are dealing with a database dealing with a university curriculum and have created the table Schedule to capture which instructor is teaching each course under the following business rules:Schedule (CourseNo, Discipline, Instructor)Business rules:

1) CourseNo uniquely defines each course offering2) Faculty have a single discipline area (i.e., Finance, Marketing, or Information Systems), and only teach classes in that area3) There are many faculty in each discipline4) Students can have more than one faculty for classes in a certain discipline (you can have different instructors for Accounting l and Accounting 2).

29. Assume you want to add student registration information to the database, capturing which student is enrolled in which course. What is the best way to incorporate this data?A) Add another table with only two colurrms, CourseNo, StudentlD, which is then associated with the Schedule tableB) Add another table with Student infonnation including all courses they are taking (i.e.,Student(ID, Name, address, (other personal information fields), Coursel, Course2, ...,CourseN)C) Add another table which list the CourseNo, followed by a column for each student (i.e.,CourseNo, Studentl, Student2, , StudentN)D) Add a column in the schedule table for each student (i.e., CourseNo, Discipline,Instructor, Studentl, Student2, , StudentN)

30. Assume that you have a Customer table and an Order table, where Referential Integrity constraints require that a customer record be entered before an order can be entered. Also Cascade on delete is enforced. If you delete a Customer record, ______.A) The Customer id in the order table will be set to null for those records which previously referred to the now deleted customer.B) The system will prevent you from deleting the customer until the orders placed by that customer are deleted first by the user.C) Orders by that customer will be deleted.D) Nothing will happen to the order table (it will be unchanged).

31. Assume you are creating a database to handle the data associated with assembling PCs from components (The PC itself is not considered a component). What is the most appropriate special association to model the PCS' makeup (for example, motherboard,case, power supply, hard disk drive, CD reader, monitor, ....etc.) ?A) Reflexive association B) composition associationC) generalization association D) n-ary association

32. The type of form that displays data from two tables that have a one-to-many relationship is called a ______.A) Referential form B) relational form C) subform D) crosstab form33. In some SQL systems you can create your own data types with what command?A) DEFINE DATA B) CREATE DATA C) DEFINE VARIABLE D) CREATE DOMAIN

Page 7: CS490 All final Exams True False MCQ- Updated.doc

CS490 – All Final Exams T/F - MCQ Solutions Page 7 of 33

34. What does a Null value represent in a database?A) Missing data B) A negative or false value C) A text string full of spaces D) An error, such as 'illegal value'

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 isA) to deal with one to many relationships B) to represent an inheritance relationshipC) to capture a parent-child relationship D) to deal with relationships that involve more than two tables

37. A hidden dependency exists if ______.A) the defining and dependent columns are in the same table B) there is no composite key definedC) the dependency is not explicitly صراحة captured in a table D) there is no foreign key defined

38. In a database context, what is a transaction?A) Any process which either accesses or changes the contents of one or more records in a databaseB) Any interaction with the database (insertion, deletion, update, creation of new tables, etc.)C) A set of changes that must all be made togetherD) Any database action that involves the exchange of information between two users of the database

39. Human factors design research has found all of the following important factors to consider when building forms and reports EXCEPT which of the following?A) Confirmation of deletions and changes to existing data B) Integrated feedback in response to user actionsC) Support of multiple operating systems D) Ability to customize form to user's preference

40. Direct manipulation of objects is a consequence of what advancement in computer systems.A) Increase emphasis of graphical user interfaces B) The world wide webC) Faster and more poweriiil processors D) Increased connectivity through networks

CS490 Fall 2007 Final

Part I, True/False Questions :

1. All queries can be designed to avoid subqueries. False

2. If you use a GROUP BY command, you cannot see the non-aggregated data in the same query. True

3. To use the SQL HAVING keyword you must also use the GROUP BY keyword. True

4. The relational database model is the predominant الغالبة method of storing data today. True

5. It is possible to use a WHERE if the query contains a GROUP BY. True

6. Network database systems tend to be more flexible in their ability to access data than Hierarchical database systems. True

7. Many to Many associations create problems and should be avoided in database designs True.

8. DBMS stores data efficiently with little wasted space. True

9. A reflexive join means that a table is joined to itself. True

10. A benefit of database systems is that applications outside of the DBMS can gain access to the data. True

11. Using an IN operator is an alternative to using a group of OR clauses in a WHERE statement. True

12. If a table is in 3NF, it is also in 2NF. True

13. A subquery uses the same syntax as a regular query. True

14. Including the DISTINCT operator in a query will always result it more than or equal to the number of records returned when the DISTINCT operator is not used. False

Page 8: CS490 All final Exams True False MCQ- Updated.doc

CS490 – All Final Exams T/F - MCQ Solutions Page 8 of 33

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 databaseB) RDB supports indexes, while OODB does not support indexesC) OODB incorporates methods in with the definition of the data structure, while RDB does notD) 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 formatB) provides the tools for the database administrator to monitor and report on database use and activityC) 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 tableC) Inner joins connect tables within the database while outer joins forms a connect to a table outside the databaseD) 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..*

Page 9: CS490 All final Exams True False MCQ- Updated.doc

CS490 – All Final Exams T/F - MCQ Solutions Page 9 of 33

33. Referential Integrity Constraints are used to ________________. A) enforce one to many relationshipsB) enforce the uniqueness of the values entered as primary keysC) ensure that foreign keys can be entered only if the corresponding value exists in the originating tableD) ensure that values entered for a certain property (i.e., table column) are appropriate

34. What is the benefit of using a query language rather than a natural language to get information out of a database? A) Query languages are more flexible than natural languageB) There is no benefit of query languages over natural languages for getting information out of a database.C) Query languages allow the user to pose unstructured, open ended queriesD) Query languages are more precise so there is less room for misinterpretation

35. Which SQL command would you use to match field values to a template value (i.e., finding all customers with a last name starting with “G”)? A) MASK B) STARTS WITH C) LIKE D) HAVING

36. 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

37. The role of the query system is to __________________. A) support data integrity B) retrieve and manipulate dataC) present the data in a user friendly format D) provide data security

38. What is the purpose of the SQL operator IN?A) Specifies that the sort order should be increasingB) Used in the GROUP BY statement to indicate sub-groupsC) Used to test if one value appears in a set of valuesD) Indicates which table each field can be found

39. The command that indicates that a transaction has successfully completed and that changes must now be made permanent is: _________. A) COMMIT B) END TRANSACTION C) EXECUTE D) UPDATE

40. What is the special association that indicates that one object can be broken down into multiple special cases? A) generalization association B) n-ary associationC) reflexive association D) composition association

41. When creating a query, what is the purpose of including a column Alias?A) To control the sort order B) To maintain anonymityC) The real name is not known D) To give the query designer control over the column name

42. If you wanted to determine which customers have not bought anything from you in the last month, you could do a ___________ JOIN between Sales and Customers, and then sum up all sales to each customer for the desired time period? A) REFLEXIVE B) EQUI- C) RIGHT D) INNER

43. The purpose of an N-Ary association is _______________. A) To deal with one to many relationships B) to represent an inheritance relationshipC) to capture a parent-child relationship D) to deal with relationships that involve more than two tables

44. Tables in third normal form (3NF) _______________. A) Have a composite key B) have all non-key fields depend on nothing but the primary keyC) eliminate the possibility of a insertion anomalies D) do not have any repeating groups

Page 10: CS490 All final Exams True False MCQ- Updated.doc

CS490 – All Final Exams T/F - MCQ Solutions Page 10 of 33

45. What does a Null value represent in a database? A) Missing data B) A negative or false valueC) A text string full of spaces D) An error, such as 'illegal value'

46. Assume you want to create a contact list, and include all your contact's phone numbers, which fall into different categories (i.e., home/work, primary/secondary/emergency, mobile/pager/voice/fax). Not all contacts have all categories.The following Contact table is in what normal form? Contact (ID, Name, Hphone1, Hphone2, Hfax1, Hfax2, MobilePhone, MobilePhoneCompany, Pager, Wphone1, Wphone2, Wfax1, Wfax2, EmergencyPhone)A) First Normal only B) First, Second & third Normal FormC) Second Normal Form only D) First & Second Normal Form

47. Assume that you have a Customer table and an Order table, where Referential Integrity constraints require that a customer record be entered before an order can be entered. Also Cascade on delete is enforced. If you delete a Customer record, ______________.A) the system will prevent you from deleting the customer until the orders placed by that customer are deleted first by the user.B) nothing will happen to the order table (it will be unchanged)C) orders by that customer will be deletedD) the Customerid in the order table will be set to null for those records which previously referred to the now deleted customer

48. if you wanted to include a signature block at the very end of a report, this would be placed in the A) Appendix object B) footer C) Page footer D) Report footer

49. What is the special association that combines different items from multiple classes to build a new object? A) Reflexive association B) n-ary associationC) composition association D) generalization association

50. When creating a query, what is the purpose of assigning a table Alias?A) To maintain anonymity B) To prevent correlated sub queriesC) To distinguish between two instances of the same table D) The real name is not known

QUIZ - FALL 2006/2007

Part I: True/False Questions. 1.The process of determining the proper tables for a database is called Organization. False

2.A primary key can point to more than one object. True

3.Surrogate key is useful when there is some uncertainty with the business key. True

4.One advantage of designing database tables carefully is to ensure data consistency. False

5.The outer join describes what should happen when values in one table do not exist in the second table. True

6.Data engine is responsible for formatting reports and preparing them for printing. False

Part II Multiple Choice. 7.A feasibility study determines whether a project is worth pursuing as it _________. A)Saves cost B( Improves operations C(Decreases programmer time D)All of the above 8.The difference between aggregation and composition (association) is ____________. A(Composition can exist only for one-to-many relationships B(Composition can exist only for one-to-one relationshipsC)Aggregation can exist only for one-to-one relationships D(Aggregation can exist only for one-to-many relationships

Page 11: CS490 All final Exams True False MCQ- Updated.doc

CS490 – All Final Exams T/F - MCQ Solutions Page 11 of 33

9.In Oracle text datatype could be _____________A(Char B)Varchar2 C(Nvarchar2 D(All of the above

10. Joining tables using inner join statement causes A( All rows from both joined table to appear B( Matched rows based on the columns in the Join statement C( Matched rows based on the columns in the Join statement plus all the rows from the table on the right D( Matched rows based on the columns in the Join statement plus all the rows from the table on the left

11. Assume you want to create a contact list, and include all your contact’s phone numbers, which fall into different categories (i.e., home/work, primary/secondary/emergency, mobile/pager/voice/fax). Not all contacts have all categories. The following Contact table is in what normal form?Contact (ID, Name, Hphone1, Hphone2, Hfax1, Hfax2, MobilePhone, Pager, Wphone1, Wphone2, Wfax1, Wfax2, EmergencyPhone)A( First Normal only B(Second Normal Form onlyC( First & Second Normal Form D(First, Second & third Normal Form12. DeMorgan’s Law compound statements are _________________A( Connected using AND instead of OR B(Negated by reversing each item and swapping connectors C(Uses Where and Having D(None of the above

CS490 Spring 2007 Final

Part I, True/False Questions:1. A columnar Form presents the data in a form similar to a spreadsheet. False datasheet

2. The UNION command combines rows of data from two tables.he basic version of the command will not automatically eliminate duplicate rows of data. False

3. In composition, a part can have a maximum of one whole. True

4. All views can be used exactly like tables in any retrieval or update query. False

5. Page headers can be defined 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.

7. When two or more columns need to be matched, simply expand the ON statement by listing all column connections and connecting the statements with an AND. True

8. Abstract data types and sub-tables are relational features that are related to the object-oriented approach. True

9. Indexes improve the performance for both retrieval and update queries. False

10. A relation that has a composite primary key cannot be in 2NF. False

11. The SQL CASE function is used to create output categories based on certain criteria.

12. A Column alias is a way to control the naming of columns in query results. True

13. A class will participate in a reflexive relationship using two different roles. True

14. The ASC and DESC keywords control the sort order of SQL query results.

15. The primary key can have any value including a null value. False

16. A columnar Form presents a single record at a time. True

17. Data triggers only activate after a value in a row is changed. False

18. A form is a Modal Form if it incorporates subforms. False

19. Normalization normally results is faster query performance.

20. A relation that has a simple primary key (non-composite) must be in 2NF. True

21. Hierarchical database systems are less navigational than relational database systems. False

22. The execution of one trigger can cause a different trigger to be executed. True

Page 12: CS490 All final Exams True False MCQ- Updated.doc

CS490 – All Final Exams T/F - MCQ Solutions Page 12 of 33

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

Part II, Multiple Choice Questions:

26. The _______________ controls how the user moves through the different controls using the tab key. A) Tab order B) Name assigned to control objects C) Control order D) Location on the form

27. Which of the following statements apply to foreign keys?A) A Foreign key cannot consist of a composite attribute B) Foreign keys cannot have null valuesC) A table may contain only a single foreign key D) None of the above

28. To which normal form(s) does the following Fathers relation comply? Fathers(PersonID, PersonName, FatherID, FatherName)A) 1NF, 2NF B) 1NFC) 1NF, 2NF, 3NF, BCNF, 4NF D) 1NF, 2NF, 3NF

29. The following query is supposed to list the animals that have sold for a price higher than the average for animals in that Category in Sally’s Pet store database that you have studied in the course:SELECT A1.AnimalID, A1.Name, A1.Category, SaleAnimal.SalePrice FROM Animal As A1 INNER JOIN SaleAnimal ON A1.AnimalID = SaleAnimal.AnimalID WHERE (SaleAnimal.SalePrice > Which of the following correctly completes this query?A) (SELECT Avg(SaleAnimal.SalePrice)FROM Animal AS A2 INNER JOIN SaleAnimal ON Animal.AnimalID = SaleAnimal.AnimalID WHERE (Animal.Category = Animal.Category) ) );B) (SELECT Avg(SaleAnimal.SalePrice) FROM Animal As A2 INNER JOIN SaleAnimal ON A2.AnimalID = SaleAnimal.AnimalID WHERE (A2.Category = A1.Category) ) );C) (SELECT Avg(SaleAnimal.SalePrice)FROM Animal INNER JOIN SaleAnimal ON Animal.AnimalID = SaleAnimal.AnimalID WHERE (Animal.Category = Animal.Category) ) );D) (SELECT Avg(SaleAnimal.SalePrice) FROM Animal AS A1 INNER JOIN SaleAnimal ON A1.AnimalID = SaleAnimal.AnimalID WHERE (A2.Category = A1.Category) ) );

30. A difference between a list box and a combo box is: A) The user cannot select an entry from a list box (it is only for informational purposes) but can with a combo boxB) A list box can be bound to a property in a table, whereas a combo box cannotC) A combo box allows the user to enter a value that is not in the list, which is not allowed in a list boxD) A combo box can be bound to a property in a table, whereas a list box can not

31. According to DeMorgan's Law, the Boolean expression NOT (A AND B) is equivalent to:A) NOT (A AND NOT B) B) (NOT A) OR (NOT B)C) (NOT A) AND (NOT B) D) NOT(A OR B)

32. To which normal form(s) does the following marriage relation comply? Marriage(BrideID, GroomID, BrideName, BrideBirthDate, GroomName, GroomBirthdate)A) BCNF B) 1NF C) 1NF and 2NF D) 3NF

33. Which SQL keyword is used to eliminate duplicates in query results?A) GROUP BY B) SELECT C) ORDER BY D) DISTINCT

34. Which of the following best describes a correlated subquery? A) A select query that contains the correlation function Corr()B) Is a subquery that refers to data rows in the main query.C) Is inefficient because the subquery must be re-evaluated for each row in the main query.D) Both B and C above

Page 13: CS490 All final Exams True False MCQ- Updated.doc

CS490 – All Final Exams T/F - MCQ Solutions Page 13 of 33

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 alsoB) If a record having a foreign key is deleted, then all matching records in referenced relation are deleted alsoC) A delete in the referring relation results in other deletes in the same tableD) 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 keyC) Have multiple foreign keys D) Have multiple primary keys

39. Database application developers should maximize the time spent on which of the following activitiesA) 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 B) Not necessarily in any other normal formC) Also in i+1 (or the next higher) normal form D) None of the above

41. An empty triangle is used to signify which construct in a class diagram?A) Composition B) Reflexive association C) Aggregation D) Generalization

42. 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 Z?A) 3 B) 1 C) 2 D) None of the above

43. What will the following query produce if it is run against the Employee table shown?SELECT * FROM Employee WHERE EmpCity = "Muscat" GROUP BY DepartmentID; Employee(EmployeeID, EmpName, EmpAddress, EmpCity, EmpTel, DepartmentID)A) Will return the details of every employee is Muscat, grouped by DepartmentIDB) Will provide all details of all employees in MuscatC) Will not run D) Will run correctly but will return nothing

44. Which type of query combines every row from the left table with every row from the right table and inserts a NULL value into columns of rows that do not match? A) OUTER JOIN B) FULL JOIN C) INNER JOIN D) THETA JOIN

45. Which of the following are not SQL DDL commands?A) CREATE VIEW B) CREATE SCHEMA, CREATE TABLE, ALTER TABLEC) UNION, INTERSECT and EXCEPT D) DROP TABLE, CREATE INDEX, DROP INDEX

46. Suppose that passports could only be issued from within the country issuing the passport, and assuming that passport numbers are not unique across countries.To which normal form would the following passports relation comply? Passports(Country, PassportNumber, DateOfIssue, ExpirationDate, AddressOfPlaceOfIssue)A) 1NF, 3NF B) 1NF C) 1NF, 2NF, 3NF D) None of the above.

47. New database application development should proceed in what order?A) Feasibility study, Analysis, Design, Development and ImplementationB) Design, Development and ImplementationC) Feasibility study, Design and ImplementationD) Feasibility study, Design. Analysis, Development and Implementation

Page 14: CS490 All final Exams True False MCQ- Updated.doc

CS490 – All Final Exams T/F - MCQ Solutions Page 14 of 33

48. Which DBMS component is responsible for data storage, retrieval and update?A) The application generator B) The query processorC) The security subsystem D) The database engine49. 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 dataC) 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

Part II, Multiple Choice Questions:26. A sub form displays data

Page 15: CS490 All final Exams True False MCQ- Updated.doc

CS490 – All Final Exams T/F - MCQ Solutions Page 15 of 33

A) From two tables that have a one-to-many relationship B) In single recordsC) Which direct the user to other forms and reports in the database D) None of the answers is correct

27. Which of the following statements apply to foreign keys?A) A Foreign key cannot consist of a compositeمركب attribute B) Foreign keys cannot have null valuesC) A table may contain only a single foreign key D) None of the above

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, 3NF29. 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 AvgOfSalePriceFROM BicycleWHERE (((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.SalePriceORDER BY Bicycle.SalePrice DESCB) SELECT Bicycle.SerialNumber, Bicycle.ModelType, Bicycle.OrderDate, Bicycle.SalePrice, Max(Bicycle.SalePrice) AS MaxOfSalePriceFROM BicycleWHERE (((Bicycle.ModelType)="race") AND ((Bicycle.OrderDate) Between #1/1/2002# And #12/31/2003#))ORDER BY Bicycle.SalePrice DESCC) SELECT Bicycle.SerialNumber, Bicycle.ModelType, Bicycle.OrderDate, Bicycle.SalePriceFROM BicycleWHERE (((Bicycle.ModelType)="race") AND ((Bicycle.OrderDate) Between #1/1/2003# And #12/31/2003#) AND ((Bicycle.SalePrice)>(SELECT Avg(Bicycle.SalePrice) AS AvgOfSalePriceFROM BicycleWHERE (((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 MaxOfSalePriceFROM BicycleWHERE (((Bicycle.ModelType)="race") AND ((Bicycle.OrderDate) Between #1/1/2002# And #12/31/2003#))GROUP BY Bicycle.SalePriceORDER BY Bicycle.SalePrice DESC

30. Study the following class diagram, which of the following is/are true?

Page 16: CS490 All final Exams True False MCQ- Updated.doc

CS490 – All Final Exams T/F - MCQ Solutions Page 16 of 33

A) Animal Purchase can only be made by a SupplierB) Animal Purchase can only be made by a Supplier or by an EmployeeC) Animal Purchase can be made by a Supplier, an Employee or by a CustomerD) There is no direct relation between a Customer and an Animal Purchase

31. According to DeMorgan's Law, the Boolean expression NOT (A AND B) is equivalent to:A) NOT (A AND NOT B) B) (NOT A) OR (NOT B)C) (NOT A) AND (NOT B) D) NOT(A OR B)

32. To which normal form(s) does the following marriage relation comply?Marriage(BrideID, GroomID, BrideName, BrideBirthDate, GroomName, GroomBirthdate)A) BCNF B) 1NF C) 1NF and 2NF D) 3NF

33. Review the following class diagram, Which of the following in NOT true?

A) An order can contain 1 or more items but not zeroB) A customer can buy 1 or more items by placing an orderC) A customer will not exist in the DBMS if he/she has not placed an orderD) A quantity of an item available in store cannot be determined from the above diagram

34. What is the purpose of the serialization process?A) Forces transactions to run separately so that result consistency is maintainedB) In a two-phase commit scheme, it ensures that everyone has obtained locks on resources before committing to the change.C) Forces the operations within a transaction to be run in a specific, predefined sequence.D) Allocates access time to the database to make sure it is fair

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 alsoB) If a record having a foreign key is deleted, then all matching records in referenced relation are deleted alsoC) A delete in the referring relation results in other deletes in the same tableD) None of the above

37. If you want to include the date and time at the top of each printed page in a report, this would be specified in the _____________________.A) Report gutter B) Gutter C) Page header D) Page setup

38. It is often best to let the DBMS generate unique values+ Access: AutoNumber+ SQL Server: Identity+ Oracle: Sequences (but require additional programming)Which of the following is true about using above schemes?A) There are no disadvantages of using unique valuesB) Numbers are not related to any business data, so the application needs to hide themC) User has more control because he/she has to manually generate these unique valuesD) B and C39. The definition of primary and foreign key relationships are set using SQL _________.A) Rules B) Keys C) Assignments D) Constraints

40. The fields in one table that link to the primary key in another table are called _________:A) metadata B) foreign key C) composite key D) dependent key

Page 17: CS490 All final Exams True False MCQ- Updated.doc

CS490 – All Final Exams T/F - MCQ Solutions Page 17 of 33

41. A small diamond is used to signify which construct in a class diagram?A) Composition B) Reflexive association C) Aggregation D) Generalization42. 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 Z?A) 3 B) 1 C) 2 D) None of the above

43. What will the following query produce if it is run against the Employee table shown?SELECT * FROM Employee WHERE EmpCity = "Muscat" GROUP BY DepartmentID;Employee(EmployeeID, EmpName, EmpAddress, EmpCity, EmpTel, DepartmentID)

A) Will return the details of every employee is Muscat, grouped by DepartmentIDB) Will provide all details of all employees in MuscatC) Will not runD) Will run correctly but will return nothing

44. Which type of query displays only matching rows from the two classes based on the specified attributes Null values are not included? A) OUTER JOIN B) FULL JOIN C) INNER JOIN D) THETA JOIN

45. Which of the following are not SQL DDL commands?A) CREATE VIEW B) CREATE SCHEMA, CREATE TABLE, ALTER TABLEC) UNION, INTERSECT and EXCEPT D) DROP TABLE, CREATE INDEX, DROP INDEX

46. Review the following SQL statementCREATE TABLE Order( OID NUMBER(9) NOT NULL,Odate DATE,CID NUMBER(9),CONSTRAINT pk_Order PRIMARY KEY (OID),CONSTRAINT fk_OrderCustomerFOREIGN KEY (CID)REFERENCES Customer (CID)ON DELETE CASCADE)A) If an Order is deleted from Order table, customer information will automatically be deleted by DBMSB) If a customer is deleted from Customer table, Order information will automatically be deleted by DBMSC) If the DELETE CASCADE clause was not used, You have to manually delete orders first and then the customer informationD) The delete operation will fail with an error message because of the NOT NULL clause in the Order table

47. What is the problem with the following SQL statement?SELECT Category, Count(AnimalID) AS CountOfAnimalIDFROM AnimalGROUP BY CategoryORDER BY Count(AnimalID);A) The above SQL statement is correctB) The word ASC or DESC is required but missingC) The ORDER BY clause should appear before GROUP BY clauseD) The GROUP BY clause is not required here

48. Which DBMS component holds the definitions of all data tables?A) The application generator B) The query processor C) The security subsystem D) The data dictionary

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 dataC) Minimal data redundancy and ease of application development D) Fastest response time

Page 18: CS490 All final Exams True False MCQ- Updated.doc

CS490 – All Final Exams T/F - MCQ Solutions Page 18 of 33

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 EmployeeGROUP 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, ResultSurgeon -> 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

Page 19: CS490 All final Exams True False MCQ- Updated.doc

CS490 – All Final Exams T/F - MCQ Solutions Page 19 of 33

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 BON A.w = B.x AND A.y=B.zis 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

Part II, Multiple Choice Questions:26. To which normal form(s) does the following Fathers relation comply?Fathers (PersonID, PersonName, FatherID, FatherName)A) 1NF, 2NF B) 1NF, 2NF, 3NF, BCNF, 4NF C) 1NF, 2NF, 3NF 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 CourseC) (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 B) UNION, INTERSECTC) All of the above D) SELECT, DIFFERENCE

30. Specifying CASCADE DELETE results in the following behavior:A) deleting a record in a table R results in other deletes in the same tableB) all matching records in relation R which contains a foreign key are deleted if a record having a matching primary key value in another related relation S is deleted.C) all matching records in a relation R are deleted if a record having a matching foreign key in a another related relation S is deleted.D) None of the above

31. In SQL, the CASE function is used to:A) map the value of an expression into a set of different valuesB) conditionally update the data in the tablesC) test the capitalization of lettersD) change upper case into lower case and vice versa

32. Which SQL operation subtracts (removes) the contents of one table from another?A) OMIT B) EXCEPT C) SUBTRACT D) LEFT JOIN

33. A generalization association is represented by:A) an open diamond B) a line which loops back onto the same tableC) a small triangle D) a closed diamond

34. The type of form that display one record at a time is called a: A) relational form B) crosstab form C) columnar form D) referential form

Page 20: CS490 All final Exams True False MCQ- Updated.doc

CS490 – All Final Exams T/F - MCQ Solutions Page 20 of 33

35. A Table in not in third normal form (3NF) if: A) a non-key field depends on another non-key field B) has a composite keyC) it is in second normal form (2NF) D) it is in fourth normal form (4NF)

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

37. An employee relation is said to be in third normal form when:A) some employee data are dependent on both the employee ID and another field independentlyB) the employee data are not dependent on the employee primary keyC) the employee data are dependent on a field other than the employee IDD) the employee data are dependent only on the employee ID

38. Which type of JOIN can show all the records in the right most table with only the matching records form the left table? A) RIGHT JOIN B) OUTER JOIN C) INNER JOIN D) LEFT JOIN

39. A form that mainly contains buttons that open other forms and reports is called a: A) menu form B) switchboard form C) dropdown form D) popup form

40. Which of the following types of isolation levels provides the MOST protection against concurrency problems? A) REPEATABLE READ B) READ COMMITTED C) SERIALIZABLE D) READ UNCOMMITTED

41. Text that appears on every page of a report should be placed in theA) footer B) report footer C) appendix object D) page footer

42. A correlated subquery is: A) a query whose data is correlated using the correlation function Correlate()B) a subquery that refers to data rows in the main query.C inefficient because calculations in the subquery must be recomputed for each entry in the main table.D) Both B and C above

43. Choosing an inappropriate numeric data type (i.e., byte, integer, long integer, real number, currency, etc.) results in:A) Inability to handle units in the metric system. B) Incorrect table structure.C) Update anomalies. D) Inefficient data storage.

44. The Unified Modeling Language (UML) is: A) an international standard language used to write database application programsB) an important markup language used for developing web sitesC) a general purpose set of standards to visually model various aspects of software systems and business processes.D) None of the above

45. What is the main advantage of relational databases as compared to hierarchical databases? A) Relational databases are more flexible in accessing the dataB) Relational databases incur lower overhead associated with maintaining indexesC) Relational databases are faster than hierarchical databasesD) Relational databases provide higher capacity (holding more data)

46. An aggregation association is represented by. A) an open diamond B) a line which loops back onto the same tableC) a closed diamond D) none of the above

47. The following query is supposed to List the Animals that have sold for the highest price among animals in their Category:

Page 21: CS490 All final Exams True False MCQ- Updated.doc

CS490 – All Final Exams T/F - MCQ Solutions Page 21 of 33

SELECT A1.AnimalID, A1.Name, A1.Category, SaleAnimal.SalePriceFROM Animal As A1 INNER JOIN SaleAnimal ON A1.AnimalID = SaleAnimal.AnimalIDWHERE (SaleAnimal.SalePrice =Which of the following correctly completes this query?A) (SELECT Max(SaleAnimal.SalePrice)FROM Animal INNER JOIN SaleAnimal ON Animal.AnimalID = SaleAnimal.AnimalIDWHERE (Animal.Category = Animal.Category) ) );B) (SELECT Max(SaleAnimal.SalePrice)FROM Animal AS A1 INNER JOIN SaleAnimal ON A1.AnimalID = SaleAnimal.AnimalID WHERE (A2.Category = A1.Category) ) );C) (SELECT Min(SaleAnimal.SalePrice)FROM Animal AS A2 INNER JOIN SaleAnimal ON Animal.AnimalID = SaleAnimal.AnimalIDWHERE (Animal.Category = Animal.Category) ) );D) (SELECT Max(SaleAnimal.SalePrice)FROM Animal As A2 INNER JOIN SaleAnimal ON A2.AnimalID = SaleAnimal.AnimalIDWHERE (A2.Category = A1.Category) ) );

48. Which of the following statements apply to foreign keys?A) A Foreign key is not unique-valued and may have duplicate valuesB) A table may contain only a single foreign keyC) A foreign key cannot consist of more than one attributeD) Foreign keys cannot have null values

49. Assume you are creating a database to handle the data associated with employees in a company. What is the most appropriate special association to represent the details of employees of different types (for example: accountants, engineers, workers, .. .)? A) Reflexive association B) n-ary associationC) aggregation association D) generalization association

50. Assume you are dealing with a purchasing database involving a single table. This table contains information on the customer, sale, and items purchased, where the sales order number is the primary key. If you remove all orders involving a given product, you also lose all information on that product. This is an example of: A ) A deletion anomaly B) referential data integrityC) a hidden dependency D) an update anomaly

CS490 Spring 2008 Final

Part I, True/False Questions:1. The Object oriented database model is the most common database model in use today. False

2. The purpose of class diagrams is to model the interrelationships between the different classes in the database. True

3. Procedural code is often placed within forms and reports. True

4. The inner query in a correlated nested query is evaluated only once. False

5. It is possible to use a WHERE if the query contains a GROUP BY. True

6. To include a title at the top of each page in a report, the required text would be placed in the page header. True

7. A columnar Form presents a single record at a time. True

8. All database forms should be bound to either a table or a query. False

9. The developer can follow a specific set of procedures and rules to ensure that a table is in 1NF, 2NF and 3NF. True

10. The relational database model is a navigational model requiring navigational commands to move from one table to another. False

11. A table with non-atomic values can be in 1NF. False

12. A limitation of the UPDATE operation is that it can only change one column at the same time. False

Page 22: CS490 All final Exams True False MCQ- Updated.doc

CS490 – All Final Exams T/F - MCQ Solutions Page 22 of 33

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

Part II, Multiple Choice Questions:26. You would use this SQL command to remove a table and all its contents from the database schema?

A) INDEX BY 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 repository31. 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 Cursor32. 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 JOIN33. What is the SQL command to change the structural design of a table?A) CHANGE STRUCTURE B) STRUCTURE C) ALTER TABLE D) MODIFY DATABASE34. 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 Subsystem35. The ability to modify the data structure and not have to change the programs using that data is called

A) Data independence B) referential integrity C) data dictionary D) data integrity

36. A hidden dependency exists if _________.

Page 23: CS490 All final Exams True False MCQ- Updated.doc

CS490 – All Final Exams T/F - MCQ Solutions Page 23 of 33

A) The defining and dependent columns are in different tables B) there is no composite key definedC) there is no foreign key defined D) the dependency is not explicitly captured in a table

37. The modern database report writer _________.

A) provides the tools for database designer to display information in the desired formatB) is a career path that focuses on creating, managing and supporting the reports generated from databasesC) provides the tools for the database administrator to monitor and report on database use and activityD) provide limited control over how information is displayed and reported.

38. Which SQL clause is used to specify the tables used in the query?

A) WHERE 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 understandC) 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 userB) Since the execution order is only defined at run time, results can be unpredictableC) They can create security holes if not done properlyD) 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 keyC) 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 itemsB) small open diamond at the end of a line connecting two tablesC) small closed diamond at the end of a line connecting two tablesD) 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 indexedC) 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 wayC) 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

47. What role does the isolation level play in serialization?

Page 24: CS490 All final Exams True False MCQ- Updated.doc

CS490 – All Final Exams T/F - MCQ Solutions Page 24 of 33

A) Deals with the connectivity of transaction to transactionB) Deals with the referential integrity constraints imposed in the databaseC) Determines which data elements must be protected to insure the integrity of the processD) None of the above

48. Which SQL clause is used to specify the criteria for selecting records in the query?

A) WHEN 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 B) composition associationC) generalization 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 columnsB) abstract data types support the use of methods while subtables do notC) subtables support inheritance and abstract data types do notD) abstract data types support inheritance and subtables do not

CS490 Fall 2009 Final

Part I, True/False Questions:1. Form design can impact data entry efficiency. True

2. In a client / server environment, data independence causes client side applications to be essentially independent of the database stored on the server side. True

3. If a table does not have a composite key, then it is in 2NF. True

4. To include a title at the top of each page in a report, the required text would be placed in the report header. False

5. WHERE is used to place a constraint on aggregated properties. False

6. A reflexive association links one class back to itself True

7. If you use a GROUP BY command, you cannot see the non-aggregated data in the same query True.

8. The employee – manager association is an example of a reflexive relationship True

9. A class will participate in a reflexive relationship using two different roles True

10. Data normalization minimizes data redundancy. True

11. SQL does not allow you to use the same table in a subquery as is being used in the outer query (i.e., the query that includes the subquery). False

12. SQL provides visually oriented tools for developing queries. False

13. The data seen by the end-user should be stored in the database in exactly the same format False

14. All queries can be designed to avoid subqueries. False

15. From a Human Factors Design perspective, issues surrounding aesthetics الجمال involves the visual appeal علمof the user form. True

16. To build and manage databases you need to have either a data definition language, a data manipulation language, or a general-purpose host language. False

17. A view will always produce up-to-date results, even if the underlying data changes, but we cannot always update a view directly. True

18. The SQL CASE function is used to create output categories based on certain criteria. True

19. Form design can impact user performance. True

20. The query processor analyses the user queries and produces implementation plans for them with the help of the data dictionary True

Page 25: CS490 All final Exams True False MCQ- Updated.doc

CS490 – All Final Exams T/F - MCQ Solutions Page 25 of 33

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

Part II, Multiple Choice Questions:26. In referential integrity, in order to ensure that all matching records in a referring table are deleted when the matching record is deleted in the referenced relation, we can use:

A) Cascade Delete B) Delete All C) Delete-Matching D) None of the above

27. A hidden dependency exists if ____________________. A) There is no foreign key definedB) The dependency is not explicitly captured in a tableC) There is no composite key definedD) The defining and dependent columns are in different tables

28. Which SQL keyword is used to eliminate duplicates in query results?A) NO-DUPLICATES B) ELIMINATE C) DISTINCT D) UNIQUE

29. What is the purpose of the SQL clause BETWEEN?

A) To modify the JOIN command B) Impose a query constraint covering a range of valuesC) Indicate that two tables have an association D) To establish the sequence of columns for a query30. The part of the database design process concerned with storing the data in tables in the most efficient way is called:A) Defragmentation B) Compression C) Normalization D) Optimisation

31. In some SQL systems you can create your own data types with what command? A) CREATE DOMAIN B) DEFINE VARIABLE C) CREATE DATA D) DEFINE DATA

32. When the user clicks a ______________, a pre-defined event is triggered, and some action will be performed.

A) combo button B) command button C) unbound control D) none of the above

33. The following associations can be dealt with by relational databases:

A) One to One B) One to Many

C) Both A and B above D) One to One, One to Many and Many 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 triggerC) Table Trigger followed by Row Trigger D) It depends on how the triggers are defined35. 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

37. DELETE, coupled with the appropriate modifiers, is used ________________.

Page 26: CS490 All final Exams True False MCQ- Updated.doc

CS490 – All Final Exams T/F - MCQ Solutions Page 26 of 33

A) Only to remove rows or columns from a tableB) Remove rows or columns from a table, as well as replace specific property values with a nullC) Only to remove rows from a table D) Only to remove columns from a table

38. In an Orders database, what is the appropriate min-max multiplicity for an association linking Orders to Items? Focus on the numbers placed next to the 'Orders' side of the association.

A) 1..* B) 1..1 C) *..* D) 0..1

39. What is the purpose of a SAVEPOINT in a transaction?

A) Provides a stable position in the middle of a transactions where the process and data can be 'rolled back' to if the transaction fails mid-processB) Tracks the progress of the transaction from start to finishC) Provides a backup of data in the databaseD) It is the location where intermediate results are stored without impacting the original data

40. A table is in Boyce-Codd Normal Form (BCNF) if ______.

A) It is in 3NF and no hidden dependencies exist between non-key fields and key fieldsB) The table is indexed using a non-key attributeC) It is in 2NF and data integrity is enforced D) Referential integrity is enforced

41. What is the main strength of Relational Databases?

A) Flexibility an efficiency in accessing data B) Do not enforce a rigid navigational structureC) Are widely used D) All of the above

42. A reflexive association is drawn using which symbol __________________.

A) A line which loops back onto the same class with a single role nameB) Small open diamond at the end of a line connecting two classesC) Small triangle at the end of a line connecting the aggregated item and multiple component itemsD) A line which loops back onto the same class with two role names

43. When designing a form, the general term that refers to the objects you place on the form used to display basic text and data is ___________________.

A) Widgets B) Input boxes or text boxes C) Tools D) Beans

Use the following to answer question 44:The following functional dependencies apply to a job training table:Training (StudentID, Training-Course, Trainer, Score)(StudentID, Training-Course) Trainer, ScoreTrainer Training-Course44. What is the highest normal form to which this table conforms?

A) 3NF B) 1NF C) 4NF D) 2NF

45. In a database context, what is a transaction?

A) Any process which either accesses or changes the contents of one or more records in a databaseB) Any interaction with the database (insertion, deletion, update, creation of new tables, etc.)C) A set of changes that must all be made togetherD) Any database action that involves the exchange of information between two users of the database

46. Which of the following cannot be done using Triggers?

Page 27: CS490 All final Exams True False MCQ- Updated.doc

CS490 – All Final Exams T/F - MCQ Solutions Page 27 of 33

A) Prevent actions that would violate business rules that have been defined in the databaseB) Examine changes/updates to the database and ensure they conform to business rules before they are implementedC) Execute required actions that are necessary after data has been changed/updated in the database implementedD) 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.SalePriceFROM Items As A1 INNER JOIN SaleItem ON A1.ItemID = SaleItem.ItemIDWHERE (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.ItemIDWHERE (Items.Type = Items.Type) ) );B) (SELECT Avg(SaleItem.SalePrice)FROM Items As A2 INNER JOIN SaleItem ON A2.ItemID = SaleItem.ItemIDWHERE (A2.Type = A1.Type) ) );C) (SELECT Avg(SaleItem.SalePrice)FROM Items INNER JOIN SaleItem ON Items.ItemID = SaleItem.ItemIDWHERE (Items.Type = Items.Type) ) );D) (SELECT Avg(SaleItem.SalePrice)FROM Items AS A1 INNER JOIN SaleItemON A1.ItemID = SaleItem.ItemIDWHERE (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 databaseC) A description of the contents of the databaseD) A language reference to locate definitions of words used in the database

CS490 Spring 2009 Final

Part I, True/False Questions:

1. In procedural languages the developer must specify the sequence of a set of commands. True

2. The sort order of SQL query results can be changed according to user requirements. True

3. General purpose programming languages, such as Java and C# are still used in relational database application development despite the invention of Structured Query Language (SQL). True

4. There is no way to store procedural code persistently within the database. False

5. Unlike tables created using the INSERT INTO Statement, the output obtained by VIEWs, will always be up-to-date in response to changes in the underlying data. True

Page 28: CS490 All final Exams True False MCQ- Updated.doc

CS490 – All Final Exams T/F - MCQ Solutions Page 28 of 33

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 TaskFunctional Dependency 2: (EmpID, Task) Supervisor, Supervisor-EvaluationRelation: Employee-Task (EmpID, Task, Supervisor, Supervisor-Evaluation)25. An employee can be assigned to the same task under many supervisors. False

Part II, Multiple Choice Questions:

26. Which of the following statements best describes a foreign key?

A) A simple, non-composite attribute B) An attribute that is unrelated to the current tableC) A non-unique attribute linked to a primary key in another table D) None of the above

27. In transaction processing, the term "Atomicity" is used to means that:

A) Other transactions cannot see or access intermediate statesB) Either all of the tasks of a transaction are performed or none of them areC) The transaction consists of many small subtransactionsD) The database remains in a consistent state before and after the transaction is executed

28. Which of the following modeling constructs are most related conceptually, but not identical?

Page 29: CS490 All final Exams True False MCQ- Updated.doc

CS490 – All Final Exams T/F - MCQ Solutions Page 29 of 33

A) Generalization and reflexive association B) Aggregation and reflexive associationC) Composition and aggregation D) None of the above

29. Optimistic متفائل locking is most appropriate when:

A) Most transactions are highly related B) Most transactions are unrelatedC) There is a large number of users D) There is a small number of users

30. Which of the following best applies to feedback in human-computer interactions?

A) Helps users know when the computer has received their inputB) It speeds up system performanceC) Should be avoided because it slows down user entry of dataD) It confuses the user sometimes

31. If there are no repeating attributes or groupings of attributes, a table is said to be:

A) In Boyce-Codd Normal Form B) Un-normalizedC) In first Normal Form D) Redundant

32. SQL is mostly used in

A) Object-Oriented databases B) JavaC) C++ 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 B) A drop-down list controlC) An edit (text) box D) A menu control

34. Which of the following are characteristics of Graphical User Interfaces (GUIs)?

A) Is user friendly for most usersB) Limits access for users facing some physical challengeC) Slows down professional users who can use command line interface efficientlyD) All of the above

35. BCNF requires that:

A) The relation must be in 2NF B) No non-key attribute can determine part of the primary keyC) The relation must be in 1NF D) All of the above

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 B) DepartmentID is not definedC) There is a type mismatch in the query D) It is syntactically incorrect

37. According to DeMorgan's Law, the boolean expression NOT ((NOT A) OR (NOT B)) is equivalent to:

A) NOT (A AND NOT B) B) NOT(A OR B)C) (A AND B) D) (NOT A) AND (NOT B)

38. What will be the result of executing the following query SELECT A1.AnimalID, A1.Name, A1.Category, SaleAnimal.SalePriceFROM Animal As A1 INNER JOIN SaleAnimal ON A1.AnimalID = SaleAnimal.AnimalIDWHERE (SaleAnimal.SalePrice > (SELECT Avg(SaleAnimal.SalePrice)FROM Animal As A2 INNER JOIN SaleAnimal

Page 30: CS490 All final Exams True False MCQ- Updated.doc

CS490 – All Final Exams T/F - MCQ Solutions Page 30 of 33

ON A2.AnimalID = SaleAnimal.AnimalIDWHERE (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) IDB) All attributes are dependent on a third attribute other than the groom ID or the bride IDC) All attributes are dependent only on the groom (husband) IDD) 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 associationsB) They are essential in reducing redundancy in the tablesC) They simplify the class diagramD) 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 databaseB) They cannot be translated into a pair of one to many associationsC) They complicate the class diagramD) 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

43. Which of the following describes triggers in databases?

A) Fire automatically when the condition is satisfiedB) Contain both a condition part and an action partC) Allow the developer to save some of the application logic in the databaseD) All of the above

44. Which of the following best describes a subform?

A) A form that displays data from two tables that have a one-to-many relationshipB) A form that displays data from two tables that have a one-to-one relationshipC) Is a subset of columns and rows in a larger formD) A form that is smaller in size than the original from from which it is derived

45. Which of the following best describes the LEFT OUTER JOIN?

A) Presents all data from the right side of a join and only matching data from the left sideB) Presents data from the left side of a join only and no matching records form the rightC) Presents no data from the left side of a join but presents matching records form the rightD) Presents all data from the left side of a join and matching records from the right side

46. In which of the following situations would you definitely choose the relational database technology over the old file system method?

A) An airline reservation system B) A simple home shopping list applicationC) A missile guidance system which requires speed but with no need for user queries, sharing or data independenceD) A phone book application with one table containing 200 records

Page 31: CS490 All final Exams True False MCQ- Updated.doc

CS490 – All Final Exams T/F - MCQ Solutions Page 31 of 33

47. Which of the following are SQL DDL commands?

A) DROP TABLE, CREATE INDEX, DROP INDEX B) CREATE VIEWC) CREATE SCHEMA, CREATE TABLE, ALTER TABLE D) All of the above

48. A correlated subquery is inefficient because:

A) The subquery syntax is more complicatedB) The user must enter each correlated value manuallyC) Calculations in the subquery must be recomputed for each entry in the main table.D) Both B and C above

49. To specify that all matching records in a referring relation should be deleted whenever the matching record in the referenced relation is deleted, it is best to use:

A) Cascade delete B) Host language programming codeC) SQL delete statement D) None of the above

50. Compared to the database approach, the old file system approach offers these unique advantages:

A) Simplicity and occasionally faster response timeB) Minimal data redundancy and ease of application developmentC) The ability to store and retrieve dataD) Access to data through application programs and user queries

CS490 Fall 2010 Final

1. Human factors design research has found all of the following important factors to consider when building forms and reports EXCEPT which of the following?

A) Confirmation of deletions and changes to existing dataB) Integrated feedback in response to user actionsC) Support of multiple operating systemsD) Ability to customize form to user's preference

2. 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 alsoB) If a record having a foreign key is deleted, then all matching records in referenced relation are deleted alsoC) A delete in the referring relation results in other deletes in the same tableD) 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 B) GROUP C) LINK D) JOIN

5. 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 keyC) be in domain-key normal form (DKNF) D) be in Boyce-Codd Normal Form (BCNF)

6. 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 generatedC) The foreign keys in each table are linked to the primary keys in the other tablesD) All records in each table are associated with all records in the other tables

7. What is the purpose of the SQL operator IN?

Page 32: CS490 All final Exams True False MCQ- Updated.doc

CS490 – All Final Exams T/F - MCQ Solutions Page 32 of 33

A) Specifies that the sort order should be increasing B) Used to test if one value appears in a set of valuesC) Indicates which table each iield can be found D) Used in the GROUP BY statement to indicate sub-groups

8. How does Atomicity relate to transaction integrity?A. All changes should succeed of fail togetherB. The database is viewed as an indivisible unit with regards to data integrityC. The database schema is viewed as an indivisible unit with regards to data integrityD. The table is viewed as an indivisible unit with regards to data integrity

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..* B) 0..1 C) 1..1 D) 0..*

10. Deadlock occurs when __________.A. The capacity of the database has been reached.B. Two or more processes have locks on some data and are waiting for the other's dataC. Users do not have sufficient access privileges to use database.D. The load on the database reaches the point where everything slows down.

CS490 Spring 2010 Final

1. Which of the following specifies a 1:n association with total participation on the 1:side and optional participation on the :n side?A) 0..1-------0..n B) 1..n-------0..nC) 1..1-------n..n D) 1..1-------0..n

2. Which of the following ordering reflects best database design and development practice (1 = most emphasized, 3 = least emphasized)?A) 1. Programming, 2. SQL, 3. Design B) 1. Design, 2. SQL, 3. ProgrammingC) 1. SQL, 2. Programming, 3. Design D) 1. Design, 2. Programming, 3. SQL

3. Which of the following are drawbacks of the old file system approach?A) Uncontrolled duplication B) Excessive program maintenanceC) Limited data sharing D) All of the above

4. In the following client-partner assignment database schema, Each partner can be assigned many clients and each client can be assigned many partners. What would be the most suitable new design for this database if this condition is changed so that each partner can now only have one client?Client(ClientID, Name, Address, BusinessType)Partner(PartnerID, Name, Speciality, Office, Phone)PartnerAssignment(PartnerID, ClientID, DateAcquired)

A) Client(ClientID, Name, Address, BusinessType, DateAcquired)Partner(PartnerID, Name, Speciality, Office, Phone)B) Client(ClientID, Name, Address, BusinessType)Partner(PartnerID, Name, Speciality, Office, Phone)PartnerAssignment(PartnerID, ClientID, DateAcquired)C) Client(ClientID, Name, Address, BusinessType)Partner(PartnerID, Name, Speciality, Office, Phone)PartnerAssignment(PartnerID, ClientID, DateAcquired)D) None of the above

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?

Page 33: CS490 All final Exams True False MCQ- Updated.doc

CS490 – All Final Exams T/F - MCQ Solutions Page 33 of 33

TicketsSold(TicketSerialNumber,Theater, Date, StartTime, SeatNumber)A) 1NF, 2NF, 3NF, BCNF, 4NF B) 1NF, 3NFC) 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 4NFC) 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_salaryFROM employee empWHERE AVG(DISTINCT salary) > 50,000A) We cannot use the keyword DISTINCT in the AVG functionB) We cannot use the AVG function in the WHERE clauseC) There is a missing comma between “employee” and “emp” in the FROM clauseCould produce different resultsD) There is a missing GROUP BY clause

8. Which of the following is not true about the SQL languageA) It can be embedded into a host languageB) It allows the user to change the contents and structure of the databaseC) It allows the user to define the sequence of operations on the database preciselyD) It is the dominant relational data language today

9. Which of the following is true about the Inner Join operationA) It results in a table that is wider than either of its operandsB) It results in a table that has more tuples than either of its operandsC) It will show all tuples of both tablesD) 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 downB) Cannot occur if a locking mechanism is usedC) Cannot be resolved unless the system is shut down and restartedD) Can be resolved by applying random wait times

Best wishes: Designsecrets

" شئتسهال" اذا الحزن تجعل انت و سهال جعلته ما اال سهل ال اللهم