Computer Science > EXAM > University of the People. CS2203 FINAL EXAM With All Correct Answers, Top Rated 100%. (All)

University of the People. CS2203 FINAL EXAM With All Correct Answers, Top Rated 100%.

Document Content and Description Below

Which view of information deals with how the information is physically arranged, stored, and accessed? Select one: a. Physical View b. Logical View c. Information View d. None of the Above Ques tion 2... Answer saved Marked out of 1.00 Flag question Question text A lack of normalisation can lead to which one of the following problems Select one: a. Lost Updates b. Deletion of data c. Insertion problems d. Deadlock conditions Question 3 Answer saved Marked out of 1.00 Flag question Question text Foreign keys uniquely identify records. Select one: True False Question 4 Answer saved Marked out of 1.00 Flag question Question text In one-to-many relationship the table in ‘one’ side is called _______ and on ‘many’ side is called _______ Select one: a. Child , Parent b. Parent , Child c. Brother , Sister d. Father , Son Question 5 Answer saved Marked out of 1.00 Flag question Question text Select the BEST answer. In a real relational database system, if you try to join (natural join) tables R and S and R is empty (that is, it has no tuples), Select one: a. the system reports an error. b. the answer set is an empty table. c. the answer set is the same as table S. d. the answer set consists of just one row. e. an answer set is returned; however, the results are system dependent. Question 6 Answer saved Marked out of 1.00 Flag question Question text Foreign keys are not necessary in relational databases. Select one: True False Question 7 Answer saved Marked out of 1.00 Flag question Question text Consider the following relation: Repayment(borrower_id,name,address,loanamount,requestdate,repayment_ date,repayment_amount) Which of the following SQL statements will return all the tuples with information on repayments from borrower_id equal to 42, and where the lent amount exceeds 1000 USD. Choice 1: SELECT sum(repayment_amount) FROM Repayment WHERE borrower_id=42 AND loanamount>1000; Choice 2: SELECT * FROM Repayment WHERE borrower_id=42 AND loanamount>1000; Choice 3: SELECT sum(loanamount) FROM Repayment WHERE borrower_id==42 AND loanamount>1000; Choice 4: SELECT * FROM r.Repayments WHERE r.borrower_id=42 AND r.loanamount<1000; Select one: a. Choice 1 b. Choice 2 c. Choice 3 d. Choice 4 e. None of the Above Question 8 Answer saved Marked out of 1.00 Flag question Question text With SQL, how can you return all the records from a table named "Persons" sorted descending by "FirstName"? Select one: a. SELECT * FROM Persons SORT BY 'FirstName' DESC b. SELECT * FROM Persons ORDER BY FirstName DESC c. SELECT * FROM Persons ORDER FirstName DESC d. SELECT * FROM Persons SORT 'FirstName' DESC Question 9 Answer saved Marked out of 1.00 Flag question Question text If a piece of data is stored in two places in the database, then Select one: a. storage space is wasted b. changing the data in one spot will cause data inconsistency c. it can be more easily accessed d. both a and b Question 10 Answer saved Marked out of 1.00 Flag question Question text Consider the table (Relation) STUDREC SR EF (Key Fiel d) INITI AL SURN AME DATEOFB IRTH GEND ER RESIDE NCE KI DS HOMET OWN DISTA NCE The key is SREF (student reference number). This table is in Select one: a. first normal form b. second normal form c. third normal form d. None of the above What does a view allow you to do? Select one: a. See the contents of a database table b. Make changes to a database table c. Sort a database table d. All of the above Question 12 Answer saved Marked out of 1.00 Flag question Question text Which of the following statements is true concerning subqueries? Select one: a. Involves the use of an inner and outer query. b. Cannot return the same result as a query that is not a subquery. c. Does not start with the word SELECT. d. All of the above. Question 13 Answer saved Marked out of 1.00 Flag question Question text With SQL, how do you select a column named "FirstName" from a table named "Persons"? Select one: a. EXTRACT FirstName FROM Persons b. SELECT FirstName FROM Persons c. SELECT Persons.FirstName d. UNION Persons.FirstName Question 14 Answer saved Marked out of 1.00 Flag question Question text Which SQL statement is used to delete data from a database? Select one: a. delete b. remove c. collapse d. truncate Question 15 Answer saved Marked out of 1.00 Flag question Question text A Database Language Concerned With The Definition Of The Whole Database Structure And Schema Is ________ Select one: a. DCL b. DML c. DDL d. All of the above Question 16 Answer saved Marked out of 1.00 Flag question Question text If we write a program in a programming language and switch to SQL when we require to use the database, then the SQL environment in use is know as _______ SQL. Select one: a. Real - time b. Dynamic c. PL - d. Embedded Question 17 Answer saved Marked out of 1.00 Flag question Question text The rule that requires that each non-key field (attribute) should be fully functionally dependent on the primary key is Select one: a. first normal form b. second normal form c. third normal form d. None of the Above Question 18 Answer saved Marked out of 1.00 Flag question Question text Consider the table (STUDREC). STUDREC SRE F INI T SNAME DOB GENDE R RES KIDS TNAME 1 TJ OSMAN 29/09/195 3 M 0 0 Millhouse Green 2 S LANGLEY 21/08/195 F 0 0 HUDDERSFIEL 7 D 3 H WILSON 07/07/196 2 M 1 1 HUDDERSFIEL D 4 J CARTER 21/03/195 4 F 1 2 BARNSLEY 5 A jones 10/11/194 8 F 1 2 SHEFFIELD 6 S ISHEMO 05/12/195 0 M 0 0 LEEDS 7 K ARNOTT 01/08/196 0 F 1 2 SHEFFIELD 8 B ARNOTT 23/05/196 2 F 1 1 Leeds 9 N GREEN 30/09/195 8 M 1 1 SHEFFIELD 10 H JACKSO N 21/04/194 1 M 1 0 SHEFFIELD 11 A ARNOTT 23/08/195 4 M 1 2 BARNSLEY 12 N HEY 10/10/195 5 F 0 0 SILKSTONE 13 K WILSON 13/03/196 5 M 0 2 BARNSLEY 14 J BROWN 29/09/195 3 F 1 1 BARNSLEY 15 A ARNOTT 23/08/195 4 F 0 1 BARNSLEY 16 G WHITE 03/03/196 5 M 1 3 BARNSLEY 17 J GREEN 06/08/196 9 F 0 0 BARNSLEY 18 J GREEN 09/08/194 5 M 0 0 BARNSLEY 19 F WATSON 03/03/195 8 M 1 1 THURLSTONE 20 L HARVEY 03/08/195 4 F 0 2 THURLSTONE 21 T MOSLEY 31/10/197 5 M 1 2 Silkstone 22 J POWERS 30/08/194 5 M 1 0 HENDON 23 J CHESTE R 15/03/196 0 M 0 0 BARNSLEY Which of the following statements will list all students born between 1953 and 1959 Select one: a. Select * from studrec where studrec.DOB > 01/01/1953 AND studrec.DOB > 31/12/1959; b. Select * from studrec where studrec.DOB > 01/01/1953 OR studrec.DOB < 31/12/1959 c. Select * from studrec where studrec.DOB >= 01/01/1953 AND studrec.DOB <= 31/12/1959 d. All of the above Question 19 Answer saved Marked out of 1.00 Flag question Question text How can you change "Hansen" into "Nilsen" in the "LastName" column in the Persons table? Select one: a. UPDATE Persons SET LastName='Hansen' INTO LastName='Nilsen' b. UPDATE Persons SET LastName='Nilsen' WHERE LastName='Hansen' c. MODIFY Persons SET LastName='Hansen' INTO LastName='Nilsen d. MODIFY Persons SET LastName='Nilsen' WHERE LastName='Hansen' Question 20 Answer saved Marked out of 1.00 Flag question Question text Primary keys perform the unique identification function in the relational model. Select one: True False An atomic field is Select one: a. a single valued field b. a key field c. a numerical field d. a key that contains only a single field Question 22 Answer saved Marked out of 1.00 Flag question Question text Which of the following are valid CREATE statements in the world of DDL? Select one: a. CREATE SCHEMA b. CREATE TABLE c. CREATE DOMAIN d. CREATE INDEX e. All of the above Question 23 Answer saved Marked out of 1.00 Flag question Question text The unique constraint specifies that the value of an attribute must be different from all other values of the same attribute that exist within a relation. Select one: True False Question 24 Answer saved Marked out of 1.00 Flag question Question text The left outer join is one type of outer join. Another one is the. Select one: a. right b. full c. right outer d. full outer e. All of the above Question 25 Answer saved Marked out of 1.00 Flag question Question text To transform a relation from second normal form to third normal form we must remove which one of the following? Select one: a. All partial-key dependencies b. All inverse partial-key dependencies c. All repeating groups d. All transitive dependencies Question 26 Answer saved Marked out of 1.00 Flag question Question text A unary relationship describes a table that joins to itself (True/False)? Select one: True False Question 27 Answer saved Marked out of 1.00 Flag question Question text With SQL, how can you delete the records where the "FirstName" is "Peter" in the Persons Table? Select one: a. DELETE FROM Persons WHERE FirstName = 'Peter' b. DELETE ROW FirstName='Peter' FROM Persons c. DELETE FirstName='Peter' FROM Persons d. None of the above Question 28 Answer saved Marked out of 1.00 Flag question Question text The inner join is typically the most common form of join used in application queries (true/false)? Select one: True False Question 29 Answer saved Marked out of 1.00 Flag question Question text The result of a SELECT statement can contain duplicate rows. Select one: True False Question 30 Answer saved Marked out of 1.00 Flag question Question text Referential integrity means Select one: a. Do not enter a value in the foreign key field of a child table if that value does not exist in the primary key of the parent table b. Do not enter a value in the primary key field of chield table if that value does not exist in the primary key of the parent table c. Do not enter a value in the foreign key field of a parent table if that value does not exist in the primary key of the child table d. All of above An athletics meeting involves several competitors who participate in a number of events. The database is intended to record who is to take part in which event and to record the outcome of each event. As results become available the winner attribute will be updated with the cid of the appropriate competitor. Competitor(cid, name, nationality) Event(eid, description, winner) Competes(cid, eid) Competitor Event Competes ci d name nationality ei d description winner 01 01 01 Pat British 02 Hilary British 03 Sven Swedish 04 Pierre French 01 running 02 jumping 03 throwing cid eid 02 01 03 02 04 02 04 03 Select one: a. A numeric attribute should be added to the Competes table b. A numeric attribute should be added to the Event table c. A numeric attribute should be added to the Competitor table d. Three numeric attribute should be added to the Competitor table e. Two numeric attributes should be added to the Competitor table Question 32 Answer saved Marked out of 1.00 Flag question Question text cascade update option (in the context of referential integrity) Select one: a. means do not change the value in the primary key field if that record has related records in another table b. means change all the related records in child tables if the record in parent table is changed c. Both of above d. None of above Question 33 Answer saved Marked out of 1.00 Flag question Question text What SQL structure is used to limit column values of a table? Select one: a. The LIMIT constraint b. The CHECK constraint c. The VALUE constraint d. None of the above is correct. Question 34 Answer saved Marked out of 1.00 Flag question Question text A user is setting up a join operation between tables EMP and DEPT. There are some employees in the EMP table that the user wants returned by the query, but the employees are not assigned to departments yet. Which SELECT statement is most appropriate for this user? Select one: a. select e.empid, d.head from emp e, dept d; b. Select e.empid, d.head from emp e, dept d where e.dept# = d.dept#; c. Select e.empid, d.head from emp e, dept d where e.dept# (+) = d.dept#; d. Select e.empid, d.head from emp e right outer join dept d on e.dept# = d.dept#; Question 35 Answer saved Marked out of 1.00 Flag question Question text The JDBC API is a Java API that can access any kind of tabular data, especially data stored in a relational database. Select one: True False Question 36 Answer saved Marked out of 1.00 Flag question Question text A publishing company produces academic books on various subjects. Books are written by authors who specialise in one or more particular subject. The company employs a number of editors who do not have particular specialisations but who take sole responsibilty for for editing one or more publications. A publication covers a single subject area but may be written by one or more author - the contribution of each author is recorded as a percentage for the purposes of calculating royalties. The following ER diagram is intended to represent the above specification: Indicate the relation which has an incorrect cardinality shown: Select one: a. specialises in b. makes c. is about d. to e. None of the Above Question 37 Answer saved Marked out of 1.00 Flag question Question text With SQL, how do you select all the records from a table named "Persons" where the value of the column "FirstName" is "Peter"? Select one: a. SELECT [all] FROM Persons WHERE FirstName='Peter' b. SELECT * FROM Persons WHERE FirstName LIKE 'Peter' c. SELECT [all] FROM Persons WHERE FirstName LIKE 'Peter' d. SELECT * FROM Persons WHERE FirstName='Peter' Question 38 Answer saved Marked out of 1.00 Flag question Question text User JANKO would like to insert a row into the EMPLOYEE table, which has three columns: EMPID,LASTNAME, and SALARY. The user would like to enter data for EMPID 59694, LASTNAME Harris, but no salary. Which statement would work best? Select one: a. INSERT INTO employee VALUES (59694,’HARRIS’, NULL); b. INSERT INTO employee VALUES (59694,’HARRIS’, SALARY); c. INSERT INTO employee (EMPID, LASTNAME, SALARY) VALUES (59694,’HARRIS’); d. INSERT INTO employee (SELECT 59694 FROM ‘HARRIS’); Question 39 Answer saved Marked out of 1.00 Flag question Question text Which SQL statement is used to remove data from a database? Select one: a. DELETE b. REMOVE c. TRUNCATE d. DEL Question 40 Answer saved Marked out of 1.00 Flag question Question text Which of the following statements best decribes the function of an entity relation model? Select one: a. An ER model is concerned primarily with a physical implementation of the data and secondly with the logical view b. An ER model is concerned primarily with a logical view of the data and secondly with the physical implementation c. An ER model provides a view of the logic of the data and not the physical implementation d. An ER model is entirely concerned with modelling the physical implemetation The left outer join is one type of outer join. Another one is the. Select one: a. right b. full c. right outer d. full outer e. all of the above Question 42 Answer saved Marked out of 1.00 Flag question Question text Which of the Following Is Not A Database Model? Select one: a. Network Database Model b. Relational Database Model c. Object Oriented Database Model d. None of the above Question 43 Answer saved Marked out of 1.00 Flag question Question text Given a relation country(name, continent, population) which of the following is a valid SQL statement? Select one: a. SELECT continent, population FROM country GROUP BY continent b. SELECT continent, SUM(population) FROM country GROUP BY continent c. SELECT name, population FROM country GROUP BY continent d. SELECT name, SUM(population) FROM country GROUP BY continent e. None of the above OR more than one of the above Question 44 Answer saved Marked out of 1.00 Flag question Question text Which of the following is NOT a type of SQL constraint? Select one: a. PRIMARY KEY b. FOREIGN KEY c. ALTERNATE KEY d. UNIQUE Question 45 Answer saved Marked out of 1.00 Flag question Question text In the right outer join, all of the rows of all of the tables are included in the output regardless of whether they matched or not (True/False)? Select one: True False Question 46 Answer saved Marked out of 1.00 Flag question Question text This Key Uniquely Identifies Each Record Select one: a. Primary Key b. Key Record c. Unique Key d. Field Name Question 47 Answer saved Marked out of 1.00 Flag question Question text SQL stands for Select one: a. Sequential Query Language b. Structured Question Language c. Structured Query Language d. Sequential Question Language Question 48 Answer saved Marked out of 1.00 Flag question Question text If an attribute depends on only part of a multi-valued key, then it should be removed to a separate relation. This is an action that is taken during normalization to which normal form? Select one: a. 1NF (First normal form) b. 2NF (second normal form) c. 3NF (3rd Normal Form) d. None of the above Question 49 Answer saved Marked out of 1.00 Flag question Question text How many tables may be included with a join? Select one: a. One b. Two c. Three d. All of the above Question 50 Answer saved Marked out of 1.00 Flag question Question text With SQL, how can you insert "Olsen" as the "LastName" in the "Persons" table? Select one: a. INSERT INTO Persons (LastName) VALUES ('Olsen') b. INSERT ('Olsen') INTO Persons (LastName) c. INSERT INTO Persons ('Olsen') INTO LastName d. None of the above Question 51 Answer saved Marked out of 1.00 Flag question Question text What do you mean by one to many relationship between Student and Class table? Select one: a. One student can have many classes b. One class may have many student c. Many classes may have many students d. Many students may have many classes Question 52 Answer saved Marked out of 1.00 Flag question Question text Consider the table (Relation) CLASSES CLASSREF (Key Field) CLASS_TITLE TUTOR_ID ROOM_ID Why is the class title not suitable as a key field? Select one: a. The key field needs to be a unique number b. The key field has to be an extra field to the actual data that we store about classes c. It is likely that as time passes, we'll need to add more classes with different names to our CLASSES table. d. It is possible to have more than one class with the same name (e.g. a database design class could run on Monday for one group and on Tuesday for another group) Question 53 Answer saved Marked out of 1.00 Flag question Question text It is impossible to represent a one-to-one relationship in a relational schema. Select one: True False Question 54 Answer saved Marked out of 1.00 Flag question Question text According to the entity integrity constraint, primary keys can take on any value from the set {null, 0 ... infinity} Select one: True False Question 55 Answer saved Marked out of 1.00 Flag question Question text An entity is Select one: a. a real physical "thing" or a conceptual "thing" that is specific to a particular database management system b. a "thing" which has either a real physical existence (e.g. a car or a student) or a conceptual existence (e.g. a course) c. a real physical "thing" that is specific to a particular database management system d. any physical "thing" that exists in the real world [Show More]

Last updated: 1 year ago

Preview 1 out of 26 pages

Reviews( 0 )

$15.50

Add to cart

Instant download

Can't find what you want? Try our AI powered Search

OR

GET ASSIGNMENT HELP
94
0

Document information


Connected school, study & course


About the document


Uploaded On

Jan 12, 2022

Number of pages

26

Written in

Seller


seller-icon
Academia1434

Member since 3 years

210 Documents Sold


Additional information

This document has been written for:

Uploaded

Jan 12, 2022

Downloads

 0

Views

 94

Document Keyword Tags

Recommended For You


$15.50
What is Browsegrades

In Browsegrades, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.

We are here to help

We're available through e-mail, Twitter, Facebook, and live chat.
 FAQ
 Questions? Leave a message!

Follow us on
 Twitter

Copyright © Browsegrades · High quality services·