Database Questions PDF
Document Details

Uploaded by OticMoldavite3813
FSEGA
Tags
Summary
This document contains a series of questions related to database management systems, potentially including questions on MS Access and SQL. The questions cover various relational database concepts at a high school level. It is likely a practice paper to enhance understanding of database principles.
Full Transcript
1. In MS Access, may we create a query based on an existing query? a. True b. False 2. Assuming there has been established restrict deletion, as rule to preserve referential integrity between STUDENTS and REGISTER, may we delete record #2 from REGISTER? a. True b...
1. In MS Access, may we create a query based on an existing query? a. True b. False 2. Assuming there has been established restrict deletion, as rule to preserve referential integrity between STUDENTS and REGISTER, may we delete record #2 from REGISTER? a. True b. False 3. What kind of relationship do we have between PRODUCTS and CUSTOMERS in the real world? a. 1:1 b. 1:N c. N:M d. N:1 4. Considering the following tables: For outputting the total sales for each person what kind of queries would you use? a. Right join + Select b. Union + Select c. Select only d. Left join + Select e. Union only 5. Let’s assume there has been established “Cascade Update Related Fields”, as rule to preserve the referential integrity between STUDENTS and REGISTER, in MS Access. What happens if we update in STUDENTS the StudId from the value 1 to value of 5? a. Records #1, #3 and #4 from REGISTER will be automatically updated to value 5 as for StudId b. Nothing c. This action is prohibited 6. The database architecture has the following layers: a. External, conceptual and internal levels b. External, internal and user levels c. Internal, conceptual and user levels 7. Two tables with the same structure – US_Banks: B1, B2, B3, B4 and EU_Banks: B1, B4, B5 – contain the list of the banks operating in US and Europe, respectively. What relational operator has to be used in order to obtain the list of the banks from both continents listed once (B1, B2, B3, B4, B5)? Note that B1, B2, B3, B4 and B5 are example of banks. a. Union b. Outer join c. Inner join d. Minus e. Full join f. Cartesian product g. Intersect h. None 8. If in a “User Profile” table you would like to suggest to the user that the telephone number needs to contain the country code, area code and personal number, which field property would you set? a. Default value b. Input mask c. Format d. Indexes 9. Consider the FOLLOWING Register & STUDENTS tables. How many records would be outputted by a right join? a. 1 b. 2 c. 3 d. 4 e. 5 f. 7 g. 12 10. Objects having the same properties and behaviors to the same events belong to the same… a. Program b. Attribute c. Method d. Class 11. The Record Source property for an Access form indicates that a. The record from a specific table that will be shown in that form b. The name of a field that will be placed in that form c. The table on the query used data source for this form 12. “A list of commands or potions that user can choose during his interactive work on a screen” is definition for a: a. Report b. Program c. Table d. Form e. Menu f. Query g. Database 13. If in a Students table, a new record cannot be saved if the name of the student is not inputted, which property would you set? a. Default value b. Required c. Primary key d. Input mask 14. Assume there has been established restrict for insert, as rule to preserve referential integrity between STUDENTS and REGISTER, may we insert in REGISTER a record having StudId=5? a. True b. False 15. Considering there is a relationship between STUDENTS and REGISTER, which one is the parent-table? a. None b. STUDENTS c. REGISTER 16. What does represent the following query? a. The marks obtained by each student b. The average of all marks obtained by a discipline c. The average of all marks obtained by each student 17. What assertion describe better an index: a. Into indexes, the records are in natural order b. An index is a map for the records, according to a search criterion c. An index requires a physical restructuration of the records 18. What kind of relationship could be between REGISTER and STUDENTS? a. One to one b. Many to many c. Many to one d. One to many 19. Is the referential integrity between STUDENTS and REGISTER accomplished? a. No, because the student having StudId equal to 3 has no related entries in REGISTER b. Yes c. No, because in REGISTER there are duplicated entries for the same student. Eg. StudId=1 20. The primary key from a table is: a. The minimal combination of NOT NULLS fields which assure the unique identification of a record b. The field or group pf fields that are used for sorting c. Always the first field from a table 21. If the database designer wants to order records alphabetically by some fields, which table property should be changed? a. Foreign key b. Primary key c. Input mask d. Indexes 22. If the user adds a new record to a table and he sees a value already filled-in for a cell of his new record, this is the effect of which table property? a. Format b. Input mask c. Validation rule d. Default value 23. Which one is the primary/candidate key from STUDENTS table from our example? a. StudId, Birth_Date b. StudId c. StudId, First _Name d. StudId, First _Name, Last _Name, Birth_Date e. StudId, Last _Name f. Birth_Date g. Last _Name h. First _Name 24. The DBMS (DataBase Management System) is: a. Database b. None of these c. Software component d. Hardware component 25. Which is the most appropriate field type to store phone numbers in Access database? a. Text b. Date c. Currency d. Logical e. Number 26. Employees table contains info regarding our current employees’ contact and identification data, monthly wages and department name. In order to compute monthly salary subtotals by each department we will create a query where: a. We are sorting the employees by department and we sum up the salaries b. We cannot solve this problem with a single query c. We are grouping the employees by department and we sum up the salaries d. We are grouping the employees by salary and then sum up the salary 27. A report is based on Products table, a table that contains 7 records. What happens if in Report Design mode we place a label control in Detail area? a. We cannot place a label in Detail area b. In Report View mode the content of the label will be displayed once at the beginning of the report c. In Report View mode the content of the label will be displayed once at the beginning of ea ch pa ge d. In Report View mode the content of the label will be displayed for 7 times 28. How many records would output a left join? a. 4 b. 1 c. 12 d. 2 e. 7 f. 3 29. Let’s assume there has been established “Cascade Update Related Fields”, as rule to preserve the referential integrity between STUDENTS and REGISTER, in MS Access. May we update in STUDENTS the StudId from the value 3 to 5? a. True b. False 30. Why should a database create a primary key in a table? a. To suggest to the user to always input some value in that particular field, and only unique values b. To help the user to always input some value in that particular field, and only unique values c. To forbid the user to always input some value in that particular field, and only unique values d. To force the user to always input some value in that particular field, and only unique values 31. Which of the following is not a characteristic for candidate keys? a. Irreducibility b. No NULLs allowance c. Unique identification d. Consistency 32. Let’s assume there has been established “Cascade Update Related Fields”, as rule to preserve the referential integrity between STUDENTS and REGISTER, in MS Access. What happens if we update in STUDENTS the StudId from the value 1 to value of 5 in REGISTER? a. This action is prohibited b. All records from STUDENTS having StudId=1 will be automatically updated to 5 c. Nothing 33. Let’s consider 2 tables with different structures, but having a related attribute that stores the code of the bank – US_Banks: B1, B2, B3, B4 and EU_Banks: B1, B4, B5 – containing the list of the banks operating in US and Europe, respectively. What relational operator has to be used in order to obtain the list of the banks from US, operating in Europe, too (B1, B4)? Note that B1, B2, B3, B4 and B5 are example of bank codes. a. Intersect b. Minus c. Union d. Outer join e. Inner join f. None 34. Given the following scenario, which referential integrity property would you set in Access: “A person (stored in Customers table) can deposit money in a bank (this kind of transactions are recorded in Deposits) only if he has previously updated his account number” a. Set the Cascade Update property on the relationship between Customers and Deposits b. This has nothing to do with referential integrity rules c. Set both the Enforce referential integrity and the Cascade Delete properties of the relationship between Customers and Deposits d. Set the Enforce referential integrity property of the relationship between Customers and Deposits e. Set both the Enforce referential integrity and the Cascade Update properties of the relationship between Customers and Deposits 35. Which one is NOT one of the main clauses into a SELECT statement? a. ORDER BY b. FILTER BY c. GROUP BY d. FROM e. HAVING f. WHERE 36. Assuming it has been established restrict deletion, as rule to preserve referential integrity between STUDENTS and REGISTER, may we delete record #2 from Students? a. True b. False 37. What does represent the following query? a. The student which got marks higher than 8 to those disciplines whose names are coded with letter “M” b. The student which got marks higher than 8 to those disciplines whose names are containing letter “M” c. The student which got marks higher than 8 to those disciplines whose names are starting with letter “M” 38. Is it possible to run a Union query? a. Yes b. No 39. Assuming there has been established restrict for insert, as rule to preserve referential integrity between STUDENTS and REGISTER, can we insert in STUDENTS a record having StudId=5? a. True b. False 40. Can we create an Access table outside an Access database? a. True b. False 41. What does represent the following query? a. The marks obtained by each student b. The sum of the marks at each discipline c. The number of disciplines d. The number of exams given by each student 42. If the user needs to see the Invoice Date in a Purchase Invoices table as a medium date (i.e. dd- mmm-yyyy), which property would you set? a. Input mask b. Validation rule c. Format d. Default value 43. According to the relational database theory, cardinality is a. The number of the tables in a database b. The number of attributes in a relation c. The number of tuples in a relation 44. Which of the following fields in a table containing the students from English line is more suitable to be a grouping criterion? a. Name b. Gender c. Birth_Date 45. In a Purchase Report, in which section would you place the average purchase price for all purchases (based on a field containing the purchase price) a. Report header or report footer b. Detail c. Page footer d. Page header 46. Let’s assume there has been established “Cascade Update Related Fields”, as rule to preserve the referential integrity between STUDENTS and REGISTER in MS Access. What happens if we update in STUDENTS the StudId from the value of 3 to value of 5? a. Nothing b. This action is restricted c. It will be automatically created a record in REGISTER having 5 in StudId 47. Consider the following REGISTER & STUDENT table Which one is the primary/candidate key from REGISTER table from our example a. StudId, Discipline, Ex_Date, Mark b. StudId c. Discipline d. StudId, Mark e. StudId, Discipline f. Mark g. Ex_Date h. StudId, Ex_Date 48. What is a primary key? a. A pair of fields of a table b. One or a group of fields (attributes) from a table c. Property of a table records d. Property of a relationship between two tables 49. The external data level from database architecture represents a. None of these b. The database administrator’s view c. The user’s view d. The conceptual schema of the database 50. Assuming there has been established restrict for insert, as rule to preserve referential integrity between STUDENTS and REGISTER, may we insert in REGISTER a record having StudId=5? a. True b. False 51. Given the following scenario, which referential integrity options are MANDATORY to be set in Access: “A person (stored in Customers table) can deposit money in a bank (this kind of transactions are recorded in Deposits) only if he has previously updated his account number” a. Set both the Enforce referential integrity and the Cascade Update properties of the relationship between Customers and Deposits b. Set the Enforce referential integrity, Cascade Update, and the Cascade Delete properties of the relationship between Customers and Deposits c. Set both the Enforce referential integrity and the Cascade Update properties of the relationship between Customers and Deposits d. Set the Cascade Update property of the relationship between Customers and Deposits e. Set the Enforce referential integrity property of the relationship between Customers and Deposits