HANDSOMEROOT

BSQL - FINAL EXAM (THEORY)




BSQL - FINAL EXAM (THEORY) 


1. Which of the following is expressed by an E-R diagram?
A. Relation between process and relationship
B. Relation between entity and process
C. Relation between processes
D. Relation between entities



2. Which of the following indicates the maximum number of entities that can be involved in a relationship?
A. Minimum cardinality
B. Maximum cardinality
C. ERD
D. Greater Entity Count (GEC)



3. The following are functions of a DBMS except _______ .
A. creating and processing forms
B. creating databases
C. processing data
D. administrating databases



4. Which of these characteristics does normalize database posses
A.All fields must contain small data
B.Each table must have a key field
C.A table can contain repeating fields
D.All non-key fields must be mutually independent.


5. The identifier of an entity will become the ___________ of the new table. 
A.foreign key
B.main attribute
C.primary key
D.identity key


6. A relation is considered a: 
A.Column.
B.one-dimensional table.
C.two-dimensional table.
D.three-dimensional table.


7. Which of the following column properties would be used to specify that cells in a column must contain a monetary value that is less than another monetary value in the same row? 
A.Null status
B.Data type
C.Default value
D.Data constraints


8. Row is synonymous with the term: 
A.record.
B.relation.
C.column.
D.field.


9. If a relationship has a cascade updates constraint, then if ___________ in the parent table is changed, then the same change will automatically be made to any corresponding foreign key value. 
A.the primary key
B.any alternate key
C.a surrogate key
D.a foreign key


10. Entities of a given type are grouped into a(n): 
A.database.
B.entity class.
C.attribute.
D.ERD.


11. In which of the following is a single-entity instance of one type related to many entity instances of another type? 
A.One-to-One Relationship
B.One-to-Many Relationship
C.Many-to-Many Relationship
D.Composite Relationship


12. Which of the following appropriately describes a domain (defined area), a term used for relational databases? 
A.It is a relationship derived by applying the relational operations to the basic relationship.
B.It is a set of values that attributes can hold.
C.It is a specification for copying the real world to a database.
D.It is the general term for data insertion, updating, deletion, and search in a database.


13. In a one-to-many relationship, the entity that is on the one side of the relationship is called a(n) _______ entity. 
A.parent
B.child
C.instance
D.subtype


14. Which normal form specifies that non-key field in a table must relate to the key fields in the table 
A.First Normal form
B.Second Normal form
C.Third Normal form


15. In which of the following is a single-entity instance of one type of related to a single-entity instance of another type? 
A.One-to-One Relationship
B.One-to-Many Relationship
C.Many-to-Many Relationship
D.Composite Relationship


16. RDBMS stands for…? 
A.Real Database Management System
B.Relational Database Management System
C.Read Database Master System
D.Realtime Database Management System


17. Which of the following column properties would be used to specify that cells in a column must contain a monetary value? 
A.Null status
B.Data type
C.Default value
D.Data constraints


18. Which of the following appropriately describes a schema in a relational database management system? 
A.It is a set of data definitions such as the data properties, format, relationship with other data, etc.
B.It is not an actual table but a virtual table from the perspective of the user.
C.It is the general term for database operations such as data insertion, updating, deletion, search, et
D.It is the general term for various conditions and constraints that are used to maintain the database in absolutely perfect condition.


19. The following data model has been created as a part of a library reservation system. Which is the correct description for it? In this question, 1 * means one-to-many cardinality and the underlined attributes in the table definition are primary keys

User(User_ID, User_Name, Address)
Reservation(User_ID, Book_Title_ID, Reservation_Date)
Book_Title(Book_Title_ID, Category_Code, Book_Title, Author)
Stocked_Book(Stocked_Book_ID, Book_Title_ID, Purchase_Date, Cumulative_Lending_Count)

A.It is redundant to separate the Book_Title entity and Stocked_Booked entity
B.The Book_Title entity is an abstract entity that has no physical substance
C.The cardinality between the Book_Title entity and Stocked_Book entity is opposite
D.The Stocked_Book to be lent can be decided at the time of reservation


20. Which of the following refers to something that can be identified in the users' work environment, something that the users want to track? 
A.Entity
B.Attribute
C.Identifier
D.Relationship


21. With SQL, how can you delete the records where the "FirstName" is "Peter" in the Persons Table? 
A.DELETE FROM Persons WHERE FirstName = 'Peter'
B.DELETE FirstName='Peter' FROM Persons
C.DELETE ROW FirstName='Peter' FROM Persons


22. Given below data in the Leased_Apartment_Table table


If the following statement is executed, which data group is extracted?
SELECT Property FROM Leased_Apartment_Table WHERE (District=’Tu Liem’ OR Time_From_The_Station<15) AND (Floor_Space>60)

A.A
B.A, C
C.A, C, D, E
D.B, D, E


23. SQL is: 
A.a programming language.
B.an operating system.
C.a data sublanguage.
D.a DBMS.


24. Identify the correct syntax for IDENTITY property? 
A.Column-name Data type IDENTITY(SEED, INCREMENT)
B.Column-name Data type IDENTITY (???)
C.Column-name IDENTITY(SEED, INCREMENT)
D.Column-name Data type IDENTITY(INCREMENT)


25. The SQL statement to create a view is: 
A.CREATE VIEW.
B.MAKE VIEW.
C.SELECT VIEW.
D.INSERT VIEW.


26. Which of the following is the appropriate SQL statement that is used to create Table A from Persons Table?
A.SELECT name FROM Persons WHERE country LIKE '%Korea%' AND gender = 'F' AND age = 26
B.SELECT name FROM Persons WHERE country LIKE '%Korea%' AND gender = 'F' OR age = 26
C.SELECT name FROM Persons WHERE country LIKE '%Korea%' OR gender = ' F' AND age = 26
D.SELECT name FROM Persons WHERE country LIKE '%Korea%' OR gender = 'F' OR age = 26

27. Which of the following product groups can be found when searching the “Product Inventory” table for products with a sales price of 500 dollars or more per unit and an inventory of less than 10 units?
A.Large refrigerator, medium refrigerator, small refrigerator, air purif ier, and air conditioner
B.Large refrigerator, medium refrigerator, small refrigerator, portable refrigerator, air purifier, coffee maker, and air conditioner
C.Medium refrigerator, small refrigerator, and air conditioner
D.Medium refrigerator, small refrigerator, portable refrigerator, coffee maker, and air conditioner


28. Identify correct syntax to create a table with constraint? 
A.CREATE TABLE [table constraint] [table name] ([column_definition] [table_constraint])
B.CREATE TABLE [table name] ([table_constraint] [column_definition] )
C.CREATE TABLE [table name] ([column_definition] [table_constraint] )
D.CREATE TABLE [table name] ([table_constraint] )


29. Identify the different comparison operators, and wild card characters that can be used in a query (choose three)? 
A.%
B.!
C.<> 
D.@


30. The SQL keyword BETWEEN is used: 
A.for ranges.
B.to limit the columns displayed.
C.as a wildcard.
D.None of the above is correct.


31. Which one of the following SQL statements returns the name of the employee receiving the maximum salary in a particular department? 
A.Select employeename, dept_code, salary From employee Where employee.salary =(select Max(salary) from Employee group by dep_code.
B.Select employeename, dept_code, salary From employee Where employee.salary in (select Max(salary) from Employee group by dep_code having Max(salary))
C.Select employeename, dept_code, salary From employee Where employee.salary in (select Max(salary) from Employee group by dep_code )
D.Select employeename, dept_code, salary From employee Where employee.salary in (select (salary) from Employee group by dep_code having Max(salary))


32. There is a table including the data items shown below. Which of the following SQL statements can insert a new row in the “student” table?  
A.INSERT INTO student (stud_id, name, graduation) VALUES (101, ‘Dave’, ‘2001-06-14’);
B.INSERT INTO student VALUES (101, ‘100 Happy Lane’, ‘2001-06-14’, ‘Dave’);
C.INSERT INTO student (stud_id, address, name, graduation) VALUES (101, ‘100 Happy Lane’, ‘Dave’, ‘2001-06-14’);
D.INSERT INTO student VALUES (101, ‘Dave’, ‘100 Happy Lane’, ‘2001-06-14’);


33. With SQL, how do you select all the records from a table named "Persons" where the value of the column "FirstName" is "Peter"? 
A.SELECT [all] FROM Persons WHERE FirstName='Peter'
B.SELECT * FROM Persons WHERE FirstName<>'Peter'
C.SELECT * FROM Persons WHERE FirstName='Peter'
D.SELECT [all] FROM Persons WHERE FirstName LIKE 'Peter'


34. The OR operator displays a record if ANY conditions listed are true. The AND operator displays a record if ALL of the conditions listed are true? 
A.FALSE
B.TRUE


35. With SQL, how can you insert a new record into the "Persons" table? 
A.INSERT VALUES ('Jimmy', 'Jackson') INTO Persons
B.INSERT ('Jimmy', 'Jackson') INTO Persons
C.INSERT INTO Persons VALUES ('Jimmy', 'Jackson')


36. A reason for using an SQL view to hide columns is: 
A.to simplify a result only.
B.to prevent the display of sensitive data only.
C.to accomplish both of the above.
D.None of the above are reasons for using an SQL view.


37. There is a student score table shown below with basic and advanced subject codes which begin with letters B and A respectively. Which of the following SQL statements can be used to retrieve students, from the score table, whose basic subject score is 70 or more and examination date is 2007-05-04?
A.SELECT * FROM score_table WHERE score >=70 AND examination_date = ‘2007-05-04’
B.SELECT student_number FROM score_table WHERE score >=70 AND examination_date = ‘2007-05-04’
C.SELECT * FROM score_table WHERE score >=70 AND examination_date = ‘2007-05-04’ AND subject_code LIKE ‘B_ _’
D.SELECT student_number FROM score_table WHERE score >=70 AND examination_date = ‘2007-05-04’ AND subject_code LIKE ‘B%’


38. When three or more AND and OR conditions are combined, it is easier to use the SQL keyword(s): 
A.LIKE only.
B.IN only.
C.NOT IN only.
D.Both IN and NOT IN.


39. With SQL, how do you select all the records from a table named "Persons" where the "FirstName" is "Peter" and the "LastName" is "Jackson"? 
A.SELECT FirstName='Peter', LastName='Jackson' FROM Persons
B.SELECT * FROM Persons WHERE FirstName='Peter' AND LastName='Jackson'
C.SELECT * FROM Persons WHERE FirstName<>'Peter' AND LastName<>'Jackson'



Nhận xét

Bài đăng phổ biến từ blog này

[Share] CSDL Quản lý Shop Online

Hướng dẫn cài đặt VRML Pad và Cortona 3D Viewer

RANKING in SQL (ROW_NUMBER, RANK, DENSE_RANK,NTILE)