-
Notifications
You must be signed in to change notification settings - Fork 208
/
Copy pathDBI202.txt
1490 lines (1489 loc) · 182 KB
/
DBI202.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
In relational data model, an attribute is a column | False *
A data model is a notation for describing data or information. And the description generally consist of: | 3 parts *
DBMS stands for what? | Database Management System *
Look at this line: MOVIES (Id, Name, Description) What the above represent? | A schema *
Look at the following data for table R: .............. | R is a relation *
Choose all correct statements: | set of rows ,,Data Mode
Choose 3 important data models that we will study in database course | Network ,Hierachical,Relational
In relational data model, a tuple is a record or a row | true
When the Relational Data Model first proposed? | 1970
What is the oldest data model? | Network Data Model
How many data models mentioned in our database course? | 6
XML files are semi-structured data | true
A relation is a list of tuples | false
A relation is a set of tuples | true
What is the father of relational data model? | Adgar Codd
In relational data model, an attribute is a column | false
A data model is a notation for describing data or information. And the description generally consist of: | 3 parts
A weak entity: | both (a) and (b)
Give the relation R(XYZT) with the following FD's: XY -> Z ; XYT -> Z ; XYZ -> T ; XZ -> T | R is not in BCNF
Given the relation schema R(XYZT) and functional dependencies F = {X->Z, T->Y}. | both X->Z and T->Y
The highest normal form for relation schema R(XYZ) with functional dependencies: F = {XY-> Z; Y->X; Z->Y } is: | 3NF
Give the relation R(EFGH) with the following FD's: E -> F ; F -> E ; E -> H ; H -> F | R is in 3NF
Give the relation R(ABCDE) with the following FD's: D -> C, CE-> A, D ->A, and AE ->D | ABE
Which of the following relations is in Third normal form (3NF)? | ACD -> B ; AC -> D ; D -> C ; AC -> B
Let R(ABCDEFGH) satisfies the following functional dependencies: A -> B, CH -> A, B -> E, BD -> C, EG -> H, DE -> F. | ADG -> CH
Which of the following statements are correct? (choose 2) | bo? in 3NF are also in BCNF
Which of the following relations is in Boyce-Codd Normal Form (BCNF)? | BD -> C ; AB -> D ; AC -> B ; BD -> A
How many design principles are there in our course when drawing an ERD? | 5
Which of the following are guidelines for designing the relational schema ? | All of the above
Choose the correct statements: When draw an ERD (choose 2): | We ,,when an entity
Given relation scheme R = (XYZTV) and functional dependencies:{XY -> ZTV and X -> V}. So, we can say that: | XY is a key for R
Consider a relation R(A,B,C,D,E) with functional dependencies: AB->C, B->D, and C->E. | AB
The ER model means that: | be close to a users perception of the data
Consider the following statement: "When drawing ERD, you should avoid saying something in many different ways' | Avoid Redundancy Principle
Consider the following statement: "Entity Sets and their attributes should reflect the reality" That above statement describes which principle? | Faithfulness principle
Choose the correct statements: When draw an ERD (choose 3): | bo? Redundancy is not important, so we can ignore it
Given the relation schema R(MNPQ) with FDs:{MN->P; MN->Q; PQ->M; PQ->N}. | 3NF
The functional dependency A -> B for relation schema R(A,B.C,D) implies that | value for A must have the same value for B
How many primitive relational algebra operators are there in our course? | 6
Suppose relation R(A.B) has the tuples: | None of the above
Suppose relation R(A.B) has the tuples: | (3.4.6.8),(12.4.6)
Consider the following statement "When drawing ERD. you should avoid introducing more elements into your design than necessary" | Simplicity Count Principle
Suppose relation R(A.B) has the tuples: | (1.2.4.6.8),(1.2.2.4.6)
Suppose relation R(A.B) has the tuples: | (5.6),(7.8)
Consider the following statement "When drawing ERD. if an entity has no non-key attribute and it is the "one" in many-one relationship, then we should set r! to the attribute of other entities" | Picking the right kind of element principle
Consider the following statement "When drawing ERD. you should avoid drawing entities that can not be uniquely identified by their own attributes" | Avoid Redundancy Principle
The LEN function in SQL Server is: | A scalar function
What is the meaning of the LEN function in SQL Server? | number of characters of a string
How to remove all trailing blanks? | We can use the RTRIM function
The following is the syntax for the DATEDIFF function: DATEDIFF ( datepart, startdate , enddate ) | true
How to remove all leading blanks? | We can use the LTRIM function
What is the meaning of the ISNULL function? | NULL with the BLANK value
Which of the following is in-correct? | SELECT datepart(�1-jan-09�, day)
Which of the following is in-correct? | SELECT datepart('1-jan-09', year)
Which of the following is in-correct? | SELECT datepart(�1-jan-09', month)
How to convert a number to a string? (choose all possible) | CONVERT,,CAST
What is the meaning of the DATEADD function? | adds an interval to a date you specify
The CASE function is used to Evaluates a list of conditions and returns one of multiple possible result expressions | true
In SQL Server, an index is an on-disk structure associated with a table or view that speeds up retrieval of rows from the table or view | true
Clustered index is not a good choice for the columns that undergo frequent changes | true
A table or view must have a clustered indexe and some non-clustered indexes | false
SQL Server typically selects the most efficient method when executing queries. However, if no indexes are available. SQL Server must use a full table scan | true
How many clustered index we can create in a table? | 1
Indexes can be helpful for a variety of queries that contain SELECT, UPDATE, or DELETE statements | true
In SQL Server, indexes are automatically created when PRIMARY KEY and UNIQUE constraints are defined on table columns | true
In reality, an incorrect index choice can cause less than optimal performance | true
You should define the clustered index key with as few columns as possible | true
Choose the incorrect statement | Non-Clustered indexes sort and store the data rows in the table based on their key values
An index contains keys built from one or more columns in the table or view. These keys are stored in a structure (B-tree) that enables SQL Server to find the row or rows associated with the key values quickly and efficiently | true
When performing a table scan, the query optimizer reads all the rows in the table, and extracts the rows that meet the criteria of the query. A table scan generates any disk I/O operations and can be resource -intensive | false
Choose the correct statement | Clustered indexes son and store the data rows in the table based on their key values
Well-designed indexes can reduce disk I/O operations and consume fewer system resources, therefore it improves query performance | true
Choose all the correct statements about indexes | all
How to build a good performance database? | None of the above
We should use which function to get the number of rows affected by the last statement | @@IDENTITY
How to write a good performance SQL query? | Always try to avoid using "SELECT *�
Choose the correct answer | Normalize the database to 3NF
Choose all the thing that we should do with SQL Server | Use the tools,,SELECT
We should use which function to get the last-inserted identity value. | @@IDENTITY
A Database is called having good performance if | None of the above
To improve the DB performance: | set-based queries and
Regardless of what any other transaction is doing, a transaction must be able to continue with the exact same data� sets it started with. The above describes which property of a transaction? | Isolation
Every row and value must agree with all constraints once the transaction is complete. The above describes which property of a transaction? | Consistency
The DB product must be constructed so that even if the data drive melts, the DB can be restored up to the last transaction that was committed a split second before the hard drive died The above describes which property of a transaction? | Durability
Which is the most dangerous fault that can potentially affect the integrity of a transaction? | Dirty Read
How many properties we must use to measured the quality of a transaction? | 4
Once a transaction is committed, it stays committed The above describes which property of a transaction? | Durability
Choose all correct statements | COMMITTING,,ROLLING,,In SQL
Please choose 3 properties of a lock in DBMS | Duration ,Granularity,mode-the type
Which is the least dangerous fault that can potentially affect the integrity of a transaction? | Phantom rows
Each transaction must be isolated or separated from the effects of other transaction The above describes which property of a transaction? | Isolation
At the end of the transaction, either all statements of the transaction is successful or all statements of the transaction fail. The above describes which property of a transaction? | Atomic
When sorting. Null values are treated as the lowest possible values | true
Except for COUNT, aggregate functions ignore null values | true
How to returns a part of a character, binary, text or image? (For example: how to get the �bcd� in �abcdef� string) | Use the SUBSTRING function
The ORDER BY clause can not include items not appearing in the select list | true
RANK() and ROW_NUMBER() are 2 ranking functions | true
We can use the Aggregation in WHERE clause | false
How to get the information about the number of attempted connections, either successful or unsuccessful since SQL Server was last started | Use the @@CONNECTIONS
A trigger is a special kind of stored procedure that automatically executes when an event occurs in the database server | TRUE
The RANK() function returns the rank of each row within the partition of a result set | true
How to get the information about the version, processor architecture, build date, and operating system for the current installation of SQL Server | Usethe @@VERSION When create stored procedures, the "WITH ENCRYPTION" option indicates that SQL Serverwill convert the original text of the CREATE PROCEDURE statement to an obfuscated format | true
The maximum nested level of a Transact-SQL stored procedure is 64MB | false
In SQL Server, we can use the ORDER BY clauses in sub-queries | FALSE
The maximum size of a Transact-SQL stored procedure is 256MB | true
Choose the correct statement | All of the above
Choose a right answer. | All of the others
Schema-altering commands are known as��commands. | Data Definition Language
Referential integrity Constraints control relationships between | tables in a database
Given the relation Employee(SSN. FNAME. LNAME. SALARY). Select the right query below to find the employee(s) who has the lowest salary in the company | WHERE SALARY IN (SELECT MIN(SALARY) FROM Employee)
Given a relation R(A.B.C.D). Which of the followings is trivial? | A->->BCD
Which of the following is NOT a standard aggregation operator? | GROUP
Select the well-formed XML | <Movie title="StarWar*><Year>1997</Year></Movie
Which of the fallowings is true? | The Entity Relationship (ER) model represents the structure of data graphically
In the three-tier architecture, the database tier's function is to | Execute queries that are requested from the application tier.
Choose a right answer | An authorization ID may be granted privileges from others or may grve its privileges to others
Which of the fallowings is part of data model? | All of the others |
Exception handler in PSM is defined as follows: DECLARE <where to go next> HANDLER FOR condition list> <statement> The <where to go next> clause can be: | All of the others
In SQL language, the command/statement that let you add an attribute to a relation is_ | Alter
Choose the right statement | All of the others.
Consider the Dalalog rule H(xy) <- Sfx. y) AND x > 2 AND y < 6. Relation S(x y) has 3 tuples (2.3). (3.5). and (4.6). What is about H? | H has a tuple (3.5)
Select the valid query to declare the foreign key presC# of the relation Studiolname. address. presC#) that references the cert of the relation MovieExeclname. address. cert#. netWorth): | INT REFERENCES Movie Exec (cert#));
Choose the right statement | All of the others
The relational operator that yields all possible pairs of rows from two tables is known as a _ | Product
Consider a relation with schema R(A, B, CD) and FD's BC-> D, D-> A, A-> B. Which of the following is the key of R? | BC
The ER Diagram uses three principle element types: | Entity sets. Attributes, and Relationships
In PSM. the difference between 3 stored procedure and a function is that | All of the others
Selecl Ihe right syntax for HAVING clause in SOL | <list of attributes>
Select the right answer. | All of the others
Given relations R(A.B) and S(B.C.D). The result of natural join of the relations R and S has | Attributes A B. C. D
Given relation U(A, B, C) that has 2 tuples (1,2,3) and (4,5,6), and relation V(B(C, D) that has 2 tuples (2,3,10) and (2,3,11). Choose the right answer below; | that has 3 tuples (1.2.3.10) .(1.2.3.11) and (4.5.6. NULL).
Data Definition language (DDL) is used to _ | declare database schemas
The result of (UNKNOWN OR TRUE) is | true
In Java Database Connectivity (JDBC). before we can execute SQL statements), we need to | Establish a connection to the database and create statement(s).
Choose the right answer | All of the others
Choose a right answer | All of the others
Which of following is never used as a data model' | None of the others
Select the right answer | All of other
Select the right statement to declare MovieStar to be a relation whose tuples are of type StarType. Note; StarType is a user-defined type that has its definition as follows; CREATE TYPE StarType AS ( nameCHAR(30). address CHAR(IOO) }; | CREATE TABLE MovieStar OF StarType Q;
Suppose an updatable view ParamountMovies is associated with Movies relation. Choose a right answer | Drop Movies relation also delete the view ParamountMovies
Which of the following statements is true? | 4NF implies BCNF and BCNF implies 3NF
The binary relationship between classes in UML is called - | Association
Which of the following statements is true? | All of the others |
Given the relation Movies(title, year, length, genre. studioName). Select the right query to create a View with the titles and studio names of all movies that were produced in 1980 | AS SELECT title. studioName
Given the relation Employee(SSN. FNAME. LNAME. SALARY. DepartmentNo). Select the right query below to count the number of employees in each department | (*) FROM Employee GROUP BY DepartmentNo
Consider a relation with schema R(A, B. C. D) and FD's A-> B. A-> C. C -> D. Which ofthe following is the {A}+ ? | {A B C D}
To create a constraint (for example, referential integrity constraint) on a relation, the owner ofthe schema must have | REFERENCES privilege
Choose a wrong answer. | Relational algebra can express recursion
In DTD. the main difference between PCDATA and CDATA is | PCDATA is text that will be parsed by
_______authorizes access to database, coordinate, monitor its use, acquiring software, and hardware resources. | Database administrator
The key for a weak entity set E is_ | Zero or more attributes of and key attributes from supporting entity sets
Choose right answer(s). | All of orther
Choose the right statement | When the trigger is awakened, it tests a condition. If the condition is satisfied, the action associated with the trigger is executed
Four characteristics of transactions are | Atomicity. Isolation. Consistency. Durability
Select the right answer | All of orther
Choose the right statement to grant the INSERT and SELECT privileges on table Movies to users torn' and jerry' | jerry WITH GRANT OPTION
When declaring foreign key constraint for relation A thai references relation B. the referenced attribute(s) of the relation B must be declare as_______ | UNIQUE or PRIMARY KEY
Choose an incorrect statement | None of the others
Select the right statement | All of the others
A class in UML is similar to___ | An entity set in E/R model
A ____ is a logically coherent collection of data with some inherent meaning, representing some aspect of real world and being designed, built and populated with data for a specific purpose | Database
Choose the most correct statement | All of the others
Which of following is never used as a data model | None of the others
A ____ is a relation name, together with the attributes of that relation | schema
A ___ is a notation for describing the structure of the data in a database, along with the constraints on that data | data model
A _____ is a language for defining data structures | DDL
Which statement is used to remove a relation named R? | DROP TABLE R
What is another term for a row in a relational table | Tuple
Given a relation R(A,B,C,D). Which of the followings is trivial | A->->BCD
Let R(ABCD) be a relation with functional dependencies {A -> B | AC
Suppose R is a relation with attributes A1, A2, A3, A4. The only key of R is {A1, A2}. So, how many super-keys do R have? | 4
Consider the following functional dependencies | R is in First Normal Form
The relation R(ABCD) has following FDs: { A -> B ; B -> A ; A -> D ; D -> B } | R is in 3NF
Given a R(A,B,C,D) with the following FDs: AB->D, BC->A, AD->B , CD->B ,AD->C | The FD set of R is not canonical and R is in BCNF
What is the difference between the 2NF and the 3NF? | 2NF deals with partial functional dependency, while 3NF deals with transitive functional dependency
What is "de-normalization"? | De-normalization means allowing duplicate columns appeared in a table
What is the benefit of "de-normalization"? | The main benefit of de-normalization is improved performance with simplified data retrieval (this is done by reduction in the number of joins needed for data processing)
The key for a weak entity set E is | Zero or more attributes of E and key attributes from supporting entity sets
A class in UML is similar to | An entity set in E/R model
A(n) _____ provides a means to analyze business requirements so as to standardize organizational vocabulary, enforce business rules, and ensure adequate data quality | All of the others
An association class in UML is similar to ______ in the ER model | attributes on a relationship
In UML, what is the difference between an aggregation and a composition? | In composition, when the owning object is destroyed, so are the contained objects. In aggregation, this is not necessarily true
Consider the law, that holds for set relations: T intersect(R union S) = (T intersect R) union (T intersect S) | False
Choose the correct statement | Aggregate functions perform a calculation on a set of values and return a single value
Compute the result of the following query: SELECT SUM(D) | 6
Compute the result of the following query: SELECT D, SUM(C) | (9,16)
Column A of a relation has the following list of values in the six rows of the table: NULL, NULL, 10, 10, 20, 30 | 20
The table Arc(x,y) currently has the following tuples (note that there are duplicates): (1,2), (1,2), (2,3), (3,4), (3,4), (4,1), (4,1), (4,1), (4,2). Compute the result of the query: | (3,1,2)
How we can understand about this statement: "All aggregate functions are deterministic"? | This means aggregate functions return the same value any time they are called by using a specific set of input values
When we apply set operators (UNION, INTERSECT, EXCEPT) to two relations R and S, which conditions on R and S must be satisfied | All of the others
How many JOIN conditions are necessary to combine five tables based on common attributes? | 4
Suppose relation R(A,B) has the tuples and the relation S(B,C,D) has tuples Compute the right outer join of R and S, where the condition is: R.B = S.B Then identify 2 tuples of R that do not appear in the computed result | (30,y) , (70,t)
For what values of x, y, and z, including NULL, does the Boolean expression x <= 4 OR NOT(y >= 2 AND z = 10) | x = 5, y = 3, z = 10
What operator tests column for the absence of data? | IS NULL operator
What does NULL mean? | The value NULL means UNKNOWN
What is the value of the query: SELECT 'Nancy' + NULL + 'Smith' when evaluated on Microsoft SQL Server? | NULL
Which SQL keyword is used to sort the result-set? | ORDER BY
Three properties of a lock in DBMS are : Granularity: a)Granularity: the size of the lock, b) Granularity: the type of the lock, c) Mode: the type of the lock, d) Duration: the time in seconds that the DBMS waits for a lock to be | (a) and (c) and (d) are true
A database transaction, by definition, must be ACID (atomic, consistent, isolated and durable). What does "Durable" mean? | "Durable" means that: Transactions that have committed will survive permanently
Suppose relation R(A,B). Choose the SQL statement that is equivalent to the following RA expression | SELECT (A+B) AS C, FROM R, WHERE (A+B) > 10
What is the difference between the WHERE and HAVING SQL clauses? | The WHERE SQL clause condition(s) is applied to all rows in the result set
Choose the correct statement : " You can remove a trigger by dropping it or by dropping the trigger table " | All of the others
Suppose R and S are 2 relations. R is the parent of S. And the relationship between R and S is set to "ON DELETE CASCADE" | We can delete a row from R although that row has children in S (and in this case, all the children will be deleted too)
To create a DEFAULT constraint on the "City" column of the table PERSON which is already created, use the following SQL: | ALTER TABLE Person ALTER COLUMN City SET DEFAULT 'SANDNES'
Three basic types of database integrity constraints are: a)Entity integrity, (b) Domain integrity, (c) Referential integrity, d) Primary key integrity | (a) and (b) and (c) are true
A(an) _____ asserts that a value appearing in one relation must also appear in the primary-key component(s) of another relation | Foreign key constraint
What is difference between PRIMARY KEY and UNIQUE KEY | A table can have more than one UNIQUE KEY constraint but only one PRIMARY KEY
A/An _____ is a data structure that makes it efficient to find those tuples that have a fixed value for an attribute | Index
Select the most correct answer An index is a data structure used to speed access to tuples of a relation, given values of one or more attributes | All of the others.___ allow the database application to find data fast, without reading the whole table | Indexes
What are the drawbacks of indexes? | (a)Indexes require more disk space, (b) Indexes make UPDATE, INSERT, DELETE statement slower
Well-designed ____ can reduce disk I/O operations and consume fewer system resources therefore improving query performance | Indexes
Which of the following statements is the most correct Using Stored procedures reduces network traffic | All of the others
The benefits of stored procedures are: | a)They improve the security by letting the admin to LIMIT the access rights of users, c) They can be reused many times
Select the right statement to declare MovieStar to be a relation whose tuples are of type StarType. Note: StarType is a user-defined type that has its definition as | CREATE TABLE MovieStar OF StarType ();
A ____ table is a table that is embedded within another table | Nested
A database of _____ data model is a collection of nodes, each node is either a leaf or interior | semi-structured
Select the well-formed XML | <? xml version = "1.0" ?> , <MovieData>
A _____ specifies which characters are "less than" which other characters | Collation
A ____ is a powerful tool for creating and managing large amounts of data efficiently and allowing it to persist over long periods of time, safely | DBMS
Choose the most correct statement: Database is created and maintained by a DMBS | All of the others
What is the hierarchical data model | A hierarchical data model is a data model in which the data is organized into a tree-like structure
In _____ Data Model, the data and relations between them are organized in tables | Relational
Why the intersection operator is not called a primitive relational algebra operator? | Because the intersection operator can be expressed through the union operator and the difference operator
In SQL , the command/statement that let you add an attribute to a relation schema is | Alter
To update a relation's schema, which one of the following statements can be used? | ALTER TABLE
Schema-altering commands are known as _________ commands | Data Definition Language
Which one of the following is NOT a DML command? | ALTER TABLE
What is a functional dependency | A functional dependency (A->B) occurs when the attribute A uniquely determines B
Suppose R is a relation with attributes A1, A2, A3, A4 The only key of R is {A1, A2}. So, how many super-keys do R have? | 4
What is a key attribute in a relation? | A key attribute is an attribute that belongs to one of the keys of the relation
Which of the following relations is in Boyce-Codd Normal Form (BCNF)? | R(ABCD) with FD's: BD -> C ; AB -> D ; AC -> B ; BD -> A
3NFconcept is related to (choose 1 answer only): | All of the others
The relation R(ABCD) has following FDs {ACD -> B ; AC -> D ;D -> C ; AC -> B} | R is in 3NF
Let R(A,B,C,D) with the following FDs: {AB->C, AC->B, AD->C} | R is in 2NF
Which of the following statements is correct | For any relation schema, there is a dependency-preserving decomposition into 3NF
Which of the following statements is true BCNF condition guarantees the non existence of the anomalies | In BCNF condition, the left side of every non trivial FD must be a super key
How to eliminate anomalies when we design a database | We should decompose relation to eliminate anomalies
What is the goal of decomposition when designing a database | The goal of decomposition is to replace a relation by several relations that do not exhibit anomalies
In UML, what is the difference between an aggregation and a composition | In composition, when the owning object is destroyed, so are the contained objects. In aggregation, this is not necessarily true.
Consider the following statement:"Entity Sets and their attributes should reflect the reality" | Faithfulness principle
Look at the following statements:a)We should pick the right kind of elements (b) When an entity has no non-primary key attribute, we should convert that (c) Use weak entities when-ever possible (d) Always make redundancies | (a) and (b) are correct
The ER Diagram uses three principle element types | Entity sets, Attributes, and Relationships
The binary relationship between classes in UML is called | Association
Consider the Datalog rule H(x,y) <- S(x, y) AND x > 2 AND y < 6. Relation S(x, y) has 3 tuples (2, 3), (3, 5), and (4, 6). What is about H | H has a tuple (3, 5)
Consider the law, that holds for set relations (S intersect T) - R = S intersect (T - R). | False
Suppose that tuple t appears, respectively, x, y, and z times in the relations X, Y, and Z. Let t appear w times in the relation X union (Y intersect Z) | w <= x+y
The table Arc(x,y) currently has the following tuples (note there are duplicates): SELECT x, COUNT(y) | (4,4)
Given the relation Employee(SSN, FNAME, LNAME, SALARY DepartmentNo). Select the right query below to count the number of employees in each department | SELECT DepartmentNo, COUNT(*) FROM Employee GROUP BY DepartmentNo
When we apply set operators (UNION, INTERSECT, EXCEPT) to two relations R and S, which conditions on R and S must be satisfied? | All of the others
Here are two relations, R(A,B), S(C,D). Their current values are: FROM R RIGHT OUTER JOIN S ON R.A = S.C | (null, null, 0, 1), (null, null, 5, 8)
FROM R LEFT OUTER JOIN S | (4, 7, null, null)
A tuple which fails to participate in a join is called: | dangling tuple
(TRUE OR NULL) return | TRUE
Choose one correct statement: Two null values are equal | Comparisons between two null values, or between a NULL and any other value, return unknown
For what values of x, y, and z, including NULL, does the Boolean expression x <= 100 AND NOT(y >= 15 OR z = 35)have the truth value UNKNOWN? Identify one of those values from the list | x = NULL, y = 0, z = 4.
Choose one correct statement No two null values are equal | No two null values are equal
A database transaction, by definition, must be ACID (atomic, consistent, isolated and durable). What does "Isolated" mean? | "Isolated" means that: how/when the changes made by one operation in one transaction become visible to other concurrent operations in other transactions
What one is a wildcard used for pattern matching? | "%" (for multi-character substitution)
Choose the most correct statement about PRIMARY KEY : The PRIMARY KEY constraint uniquely identifies each record in a database | All of the others
Foreign key constraints are created by using "_____" keyword to refer to the primary key of another table | REFERENCES
A database ____ is a data structure that improves the speed of data retrieval operations on a database table at the cost of slower writing and increased storage space | Index
The most useful index on a relation is an index on its key. This is because | The search operation based on the primary key is commonly used
The SQL operations that are performed while a connection is active form a | Session
In PSM, the difference between a stored procedure and a function is that | A function has the return statement
The aim for the Object-relational database is to bridge the gap between conceptual data modelling techniques such as Entity-relationship diagram | True
Choose the correct statement: A User-Defined Type (UDT) in SQL can be the type of a table | All of the others
______ is a set of markup declarations that define a document type for SGML- family markup languages (SGML, XML, HTML) | Document Type Definition
A ____ document defines the XML document structure with a list of legal elements and attributes | DTD
A ____ is the framework under which data may exist and SQL operations on data may be executed | SQL Environment
is a powerful tool for creating and managing large amounts of data efficiently and allowing it to persist over long periods of time, safely | DBMS
Database is a collection of information that exists over a long period of time | All of the others
What is the hierarchical data model | organized into a tree-like structure
Data Model, the data and relations between them are organized in tables | Relational
Why the intersection operator is not called a primitive relational algebra operator? | through the union operator and the difference operator
the command/statement that let you add an attribute to a relation | Alter
Schema-altering commands are known as | Definition Language
is a notation for describing the structure of the data in a database, along with the constraints on that data | data model
Which one of the following is NOT a DML command | ALTER TABLE
What is a functional dependency | attribute A uniquely determines B
Suppose R is a relation with attributes A1, A2, A3, A4 | 4
What is a key attribute in a relation | A key attribute is an attribute that belongs to one of the keys of the relation
Which of the following relations is in Boyce-Codd Normal Form (BCNF) | FD's: BD
3NFconcept is related to (choose 1 answer only) | All of the others
The relation R(ABCD) has following FDs | R is in 3NF
Which of the following statements is correct | dap an
In BCNF condition, the left side of every non trivial FD must be a super key | All of the
How to eliminate anomalies when we design a database | We should decompose
What is the goal of decomposition when designing a database | decomposition is to replace
In UML, what is the difference between an aggregation and a composition | In composition
Entity Sets and their attributes should reflect the reality | Faithfulness
When an entity has no non-primary key attribute, we should convert that entity to an attribute | 1.we should 2. when an
The ER Diagram uses three principle element types | Constraints
has 3 tuples (2, 3), (3, 5), and (4, 6). What is about H | H has a tuple (3, 5)
S intersect T) - R = S intersect (T - R | False
respectively, x, y, and z times in the relations X, Y, and Z | w <= x+y
T intersect(R union S) = (T intersect R) union (T intersect S) | False
Suppose the relation S(B,C,D) has tuples | 6
The table Arc(x,y) currently has the following tuples | (4,4)
Which one of the followings will appear in the result of the following querys | (c,18)
SSN, FNAME, LNAME, SALARY, DepartmentNo | DepartmentNo, COUNT(*) FROM Employee GROUP BY
What row that appears in the result of the following query | (10,14)
When we apply set operators (UNION, INTERSECT, EXCEPT) to two relations R and S | All of the others
FROM R RIGHT OUTER JOIN S | (null, null, 0, 1) (null, null, 5, 8)
A tuple which fails to participate in a join is called | dangling tuple
Comparisons between two null values, or between a NULL and any other value, return unknown | dap an
x <= 100 AND NOT(y >= 15 OR z = 35) | x = NULL, y = 0, z = 4.
Comparisons between two null values, or between a NULL and any other value, return FALSE | No two null values are equal
What does "Isolated" mean | how/when
What one is a wildcard used for pattern matching | % for multi-character substitution
SELECT SUM(B) FROM R WHERE C > 10 | NULL
Choose the most correct statement about PRIMARY KEY | All of the others
Foreign key constraints are created by using | REFERENCES
is a data structure that improves the speed of data retrieval operations on a database table at the cost of slower writing and increased storage space | Index
The most useful index on a relation is an index on its key. This is because | The search operation
The aim for the Object-relational database is to bridge the gap between conceptual data modelling techniques such as Entity-relationship | True
The form of UDT definition is: CREATE TYPE T AS (<primitive type | attribute declarations>) | All of the others
is a set of markup declarations that define a document type for SGML-family markup languages (SGML, XML, HTML) | Type Definition
document defines the XML document structure with a list of legal elements and attributes | DTD
specifies which characters are "less than" which other characters | Collation
is the framework under which data may exist and SQL operations on data may be executed | Environment
is a logically coherent collection of data with some inherent meaning, representing some aspect of real world and being designed, built and populated with data for a specific purpose | Database
Which of following is never used as a data model | none
is a relation name, together with the attributes of that relation | scheme
Which statement is used to remove a relation named R | DROP TABLE R;
Let R(ABCD) be a relation with functional dependencies | AC
Which of the following best describes the relation R(e,f,g,h,i,j) | R is in First Normal Form
Given a R(A,B,C,D) with the following FDs | The FD set of R is not canonical and R is in BCNF
What is the difference between the 2NF and the 3NF | 2NF deals with partial
What is "de-normalization" | "de-normalization" has no benefit
The key for a weak entity set E is | dai nhat
provides a means to analyze business requirements so as to standardize organizational vocabulary, enforce business rules, and ensure adequate data quality | Entity Relationship Diagram
An association class in UML is similar to | attributes on a relationship
Which of the following is NOT a standard aggregation operator | GROUP
Aggregate functions perform a calculation on a set of values and return a single value | dap an
Choose the row that appears in the computed result | 6
Choose rows that are appear in the computed result | (9,16)
NULL, NULL, 10, 10, 20, 30 | 20
(1,2), (1,2), (2,3), (3,4), (3,4), (4,1), (4,1), (4,1), (4,2) | (3,1,2)
All aggregate functions are deterministic | same value any time they are called by using a specific set of input values
(UNION, INTERSECT, EXCEPT) | All of the others
How many JOIN conditions are necessary to combine five tables based on common attributes | 4
Compute the right outer join of R and S, where the condition is: R.B = S.B | (30,y) va (70,t)
x <= 4 OR NOT(y >= 2 AND z = 10) | x = 5, y = 3, z = 10
What operator tests column for the absence of data | IS NULL operator
SELECT 'Nancy' + NULL + 'Smith' | NULL
Which SQL keyword is used to sort the result-set | ORDER BY
Three properties of a lock in DBMS are | ----- mode fail
A database transaction, by definition, must be ACID (atomic, consistent, isolated and durable). | : Transactions that have committed will survive permanently
Choose the SQL statement that is equivalent to the following RA expression | SELECT (A+B) AS C FROM R
What is the difference between the WHERE and HAVING SQL clauses? | The WHERE SQL
You can remove a trigger by dropping it or by dropping the trigger table. | all
ON DELETE CASCADE | from R although that row
To create a DEFAULT constraint on the "City" column of the table PERSON | ALTER ALTER
Three basic types of database integrity constraints are | ----- primary
asserts that a value appearing in one relation must also appear in the primary-key component(s) of another relation | Foreign key constraint
What is difference between PRIMARY KEY and UNIQUE KEY ? | A table can have more than one UNIQUE KEY
is a data structure that makes it efficient to find those tuples that have a fixed value for an attribute | Index
An index is a data structure used to speed access to tuples of a relation, given values of one or more attributes | all
allow the database application to find data fast, without reading the whole table | Indexes
What are the drawbacks of indexes | 1.riquere 2. make update
can reduce disk I/O operations and consume fewer system resources therefore improving query performance | Indexes
Using Stored procedures reduces network traffic | All of the others
The benefits of stored procedures are | 1.improve 2.can be reused
Select the right statement to declare MovieStar to be a relation whose tuples are | CREATE TABLE MovieStar OF StarType ();
table is a table that is embedded within another table | Nested
data model is a collection of nodes, each node is either a leaf or interior | semi-structured
Select the well-formed XML | yeah-movie-moviedata
DBMS is a collection of .............. that enables user to create and maintain a database. | Program
In a relational schema, each tuple is divided into fields called | Domains
In an ER model, ................ is described in the database by storing its data. | Entity
DFD stands for | Data Flow Diagram
A top-to-bottom relationship among the items in a database is established by a | Hierarchical schema
.................. table store information about database or about the system. | System
..............defines the structure of a relation which consists of a fixed set of attribute-domain pairs. | Schema
.................. clause is an additional filter that is applied to the result. | Having
A logical schema | is a standard .. accessible parts.
..................... is a full form of SQL. | Structured query language
A relational database developer refers to a record as | a tuple
.......... keyword is used to find the number of values in a column. | COUNT
An advantage of the database management approach is | data is integrated and can be accessed by multiple programs
The collection of information stored in a database at a particular moment is called as ... | instance of the database
Data independence means | (2ans) programs are not dependent on the physical (logical) attributes of data
A ......... is used to define overall design of the database | schema
Key to represent relationship between tables is called | foreign key
Grant and revoke are ....... statements. | DCL
DBMS helps achieve | Data independence, Centralized control of data
.......... command can be used to modify a column in a table | alter
The candidate key is that you choose to identify each row uniquely is called ................. | Primary Key
................. is used to determine whether of a table contains duplicate rows. | Unique predicate
To eliminate duplicate rows .................. is used | DISTINCT
State true or false | i-true, ii-true
DCL stands for | Data Control Language
........................ is the process of organizing data into related tables. | Normalization
A ................... Does not have a distinguishing attribute if its own and mostly are dependent entities, which are part of some another entity. | Weak entity
................. is the complex search criteria in the where clause. | Predicate
..................... is preferred method for enforcing data integrity | Constraints
The number of tuples in a relation is called its ............. While the number of attributes in a relation is called it's .................... | Cardinality, Degree
The language that requires a user to specify the data to be retrieved without specifying exactly how to get it is | Non-Procedural DML
Which two files are used during operation of the DBMS? | Data dictionary and transaction log
The database schema is written in | DDL
The way a particular application views the data from the database that the application uses is a | sub schema
The relational model feature is that there | is much more data independence than some other database models
Which one of the following statements is false? | Data elements in the database can be modified by changing the data dictionary.
Which of the following are the properties of entities? | Attributes
Which database level is closest to the users? | External
Which are the two ways in which entities can participate in a relationship? | Total and partial
........ data type can store unstructured data | RAW
1. State true or false. i) Select operator is not a unary operator. ii) Project operator chooses subset of attributes or columns of a relation. | i-False, ii-True
2. ............... database is used as template for all databases created. | Model
3. One aspect that has to be dealt with by the integrity subsystem is to ensure that only valid values can be assigned to each data items. This is referred to as | Domain Integrity
4. ....................... operator is basically a join followed by a project on the attributes of first relation. | Semi-Join
5. Which of the following is not a binary operator in relational algebra? | Project
6. Centralizing the integrity checking directly under the DBMS .............. Duplication and ensures the consistency and validity of the database. | Reduces
7. Which of the following is/are the DDL statements? | All of the above
8. In snapshot, ...................... clause tells oracle how long to wait between refreshes. | Refresh
9. .................. defines rules regarding the values allowed in columns and is the standard mechanism for enforcing database integrity. | Constraint
10. i) % matches zero of more characters. ii) _ matches exactly one character. | Both
1. In SQL, which command is used to issue multiple CREATE TABLE, CREATE VIEW and GRANT statements in a single transaction? | CREATE SCHEMA
2. In SQL, the CREATE TABLESPACE is used | to create a place in the database for storage of scheme objects, rollback segments, and naming the data files to comprise the table-space.
3. Which character function can be used to return a specified portion of a character string? | SUBSTR
4. Which of the following is TRUE for the System Variable $date$? | Can be assigned to any field only during design time.
5. What are the different events in Triggers? | Insert, Update, Delete
6. Which is the subset of SQL commands used to manipulate Oracle Database Structures, including tables? | Data Definition Language
7. The SQL statement SELECT SUBSTR('123456789', INSTR('abcabcabc','b'), 4) FROM EMP; prints | 2345
8. Which of the following SQL command can be used to modify existing data in a database table? | UPDATE
9. When SQL statements are embedded inside 3GL, we call such a program as .......... | embedded SQL
10. ................ provides option for entering SQL queries as execution time, rather than at the development stage. | Dynamic SQL
11) The RDBMS terminology for a row is | tuple
12) To change column value in a table the ......... command can be used. | update
13) The full form of DDL is | Data Definition Language
14) To pass on granted privileges to other user the ...... clause is used | grant option
15) A set of possible data values is called | domain
16) ......... is critical in formulating database design | functional dependency
17) A primary key if combined with a foreign key creates | Parent-Child relationship between the tables that connect them
18) A ............. represents the number of entities to which another entity can be associated | mapping cardinality
19) Which two files are used during operation of the DBMS | Data dictionary and transaction log
20) A ........... is a set of column that identifies every row in a table | super key
1. The relational model is based on the concept that data is organized and stored in two-dimensional tables called ............................ | Relations
2. .................... contains information that defines valid values that are stored in a column or data type. | Index
3. Which of the syntax is correct for insert statement? | Both of them
4. ................... First proposed the process of normalization. | Edgar F. Codd
5. For using a specific database ............... command is used. | use database
6. Which of the following is not comparison operator? | =<
7. An outstanding functionality of SQL is its support for automatic ............ to the target data. | navigation
8. ..................... is a special type of integrity constraint that relates two relations & maintains consistency across the relations. | Referential.....Constraints
9. .................specifies a search condition for a group or an aggregate. | HAVING Clause
10. Drop Table cannot be used to drop a table referenced by a ............... constraint. | Foreign Key
1. ............... joins are SQL server default | Inner
2. The ..................... is essentially used to search for patterns in target string. | Like Predicate
3. Which of the following is/are the Database server functions? 1.Data 2.Transaction 3.Compile queries 4.Query optimization | i, ii, and iv only
4. To delete a database ................... command is used | drop ....database_name
5. .............. is a combination of two of more attributes used as a primary key | Composite Key
6. Which of the following is not the function of client? | Query optimization
7. ............. is a special type of stored procedure that is automatically invoked whenever the data in the table is modified. | Trigger
8. ................. requires that data should be made available to only authorized users. | Security
9. Some of the utilities of DBMS are ............. | Loading,Backup,FileOrganization
10. ................. allows individual row operation to be performed on a given result set or on the generated by a selected by a selected statement. | Curser
1. Processed data is called .................... | Information
2. ................. is a utility to capture a continuous record of server activity and provide auditing capability. | SQL server service manager
3. Data items grouped together for storage purposes are called a | record
4. ............. contains data assisting day to day activities of the organization. | Operational database
5. ..................... approach reduces time and effort required for design and lesser risk in database management. | Multiple databases
6. HSAM stands for .......... | Hierarchic Sequential Access Method
7. SQL server stores index information in the ............ system table | sys indexes
8. The one guideline to be followed while designing the database is | It should avoid/reduce the redundancy.
9. Which of the following is not a logical database structure? | Chain
10. ................ is a preferred method for enforcing data integrity | Constraints
1. Reflexivity property says that X - Y is true if Y is ...................... | Subset of X
2. Anything that affects the database schema is a part of | DDL
3. An instance of a relation is a time varying set of ...................... | Both of them
4. In the ..................... mode any record in the file can be accessed at random | Random access
5. Which can be used to delete all the rows if a table? | Delete * from table_name
6. Which if the following is not the type of data integrity. | Key integrity
7. 4NF stands for .. | Fourth Normal Form
8. A .................. allows to make copies of the database periodically to help in the cases of crashes & disasters. | Backup Utility
9. ................... Allows definitions and query language statements to be entered; query results are formatted and displayed. | Terminal Interface
10. The main task carried out in the ............... is to remove repeating attributes to separate tables | Fourth Normal Form
1. ............................ is the powerful language for working with RDBMS. | Query Language
2. The file in DBMS is called as .................. in RDBMS. | table
3. In ..................... , we have a strict parent-child relationship only. | hierarchical databases.
4. Which normal form is considered adequate for relational database design? | 3 NF
5. What operator tests column for the absence of data? | IS NULL operator
6. Which is proper subset designed to support views belonging to different classes of users in order to hide or protect information. | Sub-schema
7. Which contain information about a file needed by system programs for accessing file records? | File headers
8. A .................... DBMS distributes data processing tasks between the workstation and network server. | Client Server
9. The .................... refers to the way data is organized in and accessible from DBMS | Data model
10. ................. is a statement that is executed automatically by the system. | trigger
1) Which of the following is not a characteristic of a relational database model? | Tree like structure
2) Field is otherwise called as ......... of the record | data item
3) A table can have only one | Primary key
4) A field can be called as ........... in relation context. | attribute
5) In the relational modes, cardinality is termed as | Number of tuples
6) The ........ is used for creating and destroying table, indexes and other forms of structures. | data definition language
7) The view of total database content is | Conceptual view
8) The ............ refers to the way data is organized in and accessible from DBMS. | data model
9) Architecture of the database can be viewed as | three levels
10) ........ introduced the relational database rules. | EF Codd
11) In a relational model, relations are termed as | Tables
12) When the values in one or more attributes being used as a foreign key must exist in another set of one or more attributes in another table, we have created a(n) ........ | referential integrity constraint
13) In the architecture of a database system external level is the | view level
14) A functional dependency is a relationship between or among ....... | attributes
15) Related fields in a database are grouped to form a | dada record
16) .......... is, a table have more than one set of attributes that could be chosen as the key | candidate key
17) The database environment has all of the following components except. | users
18) The operation of eliminating columns in a table done by ........ operation. | Project
19) The way a particular application views the data from the database that the application uses is a | sub schema
20) ....... is a condition specified on a database schema and restricts the data that can be stored in an instance of the database. | Check Constraint
1. Which one of the following is used to define the structure of the relation ,deleting relations and relating schemas ? | b) DDL(Data Definition Langauge)
2. Which one of the following provides the ability to query information from the database and to insert tuples into, delete tuples from, and modify tuples in the database ? | a) DML(Data Manipulation Langauge)
3. Create table employee (name varchar ,id integer)What type of statement is this ? | b) DDL
4. Select * from employeeWhat type of statement is this? | a) DML
5. The basic data type char(n) is a _____ length character string and varchar(n) is _____ length character. | c) Fixed, variable
6. An attribute A of datatype varchar(20) has the value "Avi" . The attribute B of datatype char(20) has value "Reed" .Here attribute A has ____ spaces and attribute B has ____ spaces . | a) 3, 20
8. Delete from r; r - relationThis command performs which of the following action ? | b) Clear relation entries
9. Insert into instructor values (10211, 'Smith', 'Biology', 66000);What type of statement is this ? | b) DML
10. Updates that violate __________ are disallowed . | a) Integrity constraints
1. Which one of the following is a set of one or more attributes taken collectively to uniquely identify a record? | c) Super key
2. Consider attributes ID , CITY and NAME . Which one of this can be considered as a super key ? | b) ID
3. The subset of super key is a candidate key under what condition ? | a) No proper subset is a super key
4. A _____ is a property of the entire relation, rather than of the individual tuples in which each tuple is unique. | b) Key
5. Which one of the following attribute can be taken as a primary key ? | c) Id
7. A attribute in a relation is a foreign key if the _______ key from one relation is used as an attribute in that relation . | b) Primary
8. The relation with the attribute which is the primary key is referenced in another relation. The relation which has the attribute as primary key is called | b) Referencing relation
9. The ______ is the one in which the primary key of one relation is used as a normal attribute in another relation . | c) Referenced relation
10. A _________ integrity constraint requires that the values appearing in specified attributes of any tuple in the referencing relation also appear in specified attributes of at least one tuple in the referenced relation. | a) Referential
1. Using which language can a user request information from a database ? | a) Query
3. Which one of the following is a procedural language ? | c) Relational algebra
4. The_____ operation allows the combining of two relations by merging pairs of tuples, one from each relation, into a single tuple. | b) Join
5. The result which operation contains all pairs of tuples from the two relations, regardless of whether their attribute values match. | b) Cartesian product
6. The _______operation performs a set union of two "similarly structured" tables | a) Union
7. The most commonly used operation in relational algebra for projecting a set of tuple from a relation is | c) Select
8. The _______ operator takes the results of two queries and returns only rows that appear in both result sets. | b) Intersect
9. A ________ is a pictorial depiction of the schema of a database that shows the relations in the database, their attributes, and primary keys and foreign keys. | a) Schema diagram
10. The _________ provides a set of operations that take one or more relations as input and return a relation as an output. | b) Relational algebra
1.NameAnnieBobCallieDerekWhich of these query will display the the table given above ? | c) Select name from employee
2. Select ________ dept_namefrom instructor;Here which of the following displays the unique values of the column ? | c) Distinct
3. The ______ clause allows us to select only those rows in the result relation of the ____ clause that satisfy a specified predicate. | a) Where, from
4. Select ID, name, dept name, salary * 1.1where instructor;The query given below will not give an error. Which one of the following has to be replaced to get the desired output? | c) Where
5. The ________ clause is used to list the attributes desired in the result of a query. | b) Select
6. Select name, course_idfrom instructor, teacheswhere instructor_ID= teaches_ID;This Query can be replaced by which one of the following ? | b) Select name, course_id from instructor natural join teaches;
10. Insert into employee _____ (1002,Joey,2000);In the given query which of the keyword has to be inserted ? | b) Values
1. Select name ____ instructor name, course idfrom instructor, teacheswhere instructor.ID= teaches.ID;Which keyword must be used here to rename the field name ? | c) As
2. Select * from employee where dept_name="Comp Sci";In the SQL given above there is an error . Identify the error . | c) "Comp Sci"
3. Select emp_namefrom departmentwhere dept_name like ' _____ Computer Science';Which one of the following has to be added into the blank to select the dept_name which has Computer Science as its ending string ? | a) %
4. '_ _ _ ' matches any string of ______ three characters. '_ _ _ %' matches any string of at ______ three characters. | b) Exactly, Atleast
6. Select *from instructororder by salary ____, name ___;To display the salary from greater to smaller and name in ascending order which of the following options should be used ? | c) Desc, Asc
7. Select namefrom instructorwhere salary <= 100000 and salary >= 90000;This query can be replaced by which of the following ? where salary between 100000 and 90000;Answer:a8. Select instructor.*from instructor, teacheswhere instructor.ID= teaches.ID;This query does which of the following operation? | b) All attributes of instructor are selected on the given condition
9. In SQL the spaces at the end of the string are removed by _______ function . | c) Trim
10. _____ operator is used for appending two strings. | c) | |
1. The union operation is represented by | b) U
2. The intersection operator is used to get the _____ tuples. | b) Common
4. If we want to retain all duplicates, we must write ________ in place of union. | a) Union all
6. For like predicate which of the following is true.i) % matches zero of more characters.ii) _ matches exactly one character. | a) i-only
7. The number of attributes in relation is called as its | b) Degree
8. _____ clause is an additional filter that is applied to the result. | c) Having
9. _________ joins are SQL server default | b) Inner
10. The _____________ is essentially used to search for patterns in target string. | a) Like Predicate
1. A _____ indicates an absent value that may exist but be unknown or that may not exist at all. | c) Null value
2. If the attribute phone number is included in the relation all the values need not be entered into the phone number column . This type of entry is given as | c) Null
4. Select namefrom instructorwhere salary is not null;Selects | b) Tuples with no null values
5. In a employee table to include the attributes whose value always have some value which of the following constraint must be used ? | b) Not null
7. Create table employee (id integer,name varchar(20),salary not null);Insert into employee values (1005,Rach,0);Insert into employee values (1007,Ross, );Insert into employee values (1002,Joey,335);Some of these insert statements will produce an error. Identify the statement. | c) Insert into employee values (1007,Ross, );
8. The primary key must be | c) Both a and b
9. You attempt to query the database with this command: (25)select nvl (100 / quantity, none)from inventory;Why does this statement cause an error when QUANTITY values are null? | a. The expression attempts to divide by a null value.
1. Aggregate functions are functions that take a ___________ as input and return a single value. | a) Collection of values
2. Select __________from instructorwhere dept name= 'Comp. Sci.';Which of the following should be used to find the mean of the salary ? | b) Avg(salary)
3. Select count (____ ID)from teacheswhere semester = 'Spring' and year = 2010;If we do want to eliminate duplicates, we use the keyword ______in the aggregate expression. | a) Distinct
4. All aggregate functions except _____ ignore null values in their input collection. | b) Count(*)
6. The ____ connective tests for set membership, where the set is a collection of values produced by a select clause. The ____ connective tests for the absence of set membership. | c) In, not in
9. Which of the following is used to find all courses taught in both the Fall 2009 semester and in the Spring 2010 semester . where semester = 'Spring' and year= 2010)Answer:a10. We can test for the nonexistence of tuples in a subquery by using the _____ construct. | b) Not exists
1. Select dept_name, ID, avg (salary)from instructorgroup by dept_name;This statement is erroneous because | b) Dept_id should not be used in group by clause
2. SQL applies predicates in the _______ clause after groups have been formed, so aggregate functions may be used. | b) With
3. Aggregate functions can be used in the select list or the_______clause of a select statement or subquery. They cannot be used in a ______ clause. | b) Having, where
4. The ________ keyword is used to access attributes of preceding tables or subqueries in the from clause. | b) Lateral
from instructor I1, lateral (select avg(salary) as avg salaryfrom instructor I2where I2.dept name= I1.dept name);Without the lateral clause, the subquery cannot access the correlation variableI1 from the outer query.5. Which of the following creates temporary relation for the query on which it is defined ? | a) With
7. Subqueries cannot: | c) Join tables
8. Which of the following is not a aggregate function ? | c) With
9. The EXISTS keyword will be true if: | a) Any row in the subquery meets the condition only.
10. How can you find rows that do not match some specified condition? | b) Double use of NOT EXISTS
1. A Delete command operates on ______ relation. | a) One
2. Delete from r where P;The above command | a) Deletes a particular tuple from the relation
4. Which of the following is used to insert a tuple from another relation . | b) Insert into instructorselect ID, name, dept name, 18000from studentwhere dept name = 'Music' and tot cred > 144;
5. Which of the following deletes all tuples in the instructor relation for those instructors associated with a department located in the Watson building which is in department relation. | c) Delete from instructorwhere dept_name in (select dept namefrom departmentwhere building = 'Watson');
6. Update instructor_____ salary= salary * 1.05;Fill in with correct keyword to update the instructor relation. | b) Set
8. The problem of ordering the update in multiple update is avoided using | c) Case
1. The____condition allows a general predicate over the relations being joined. | a) On
2. Which of the join operations do not preserve non matched tuples. | c) Inner join
3. Select *from student join takes using (ID);The above query is equivalent to | a) Select *from student inner join takes using (ID);
4. What type of join is needed when you wish to include rows that do not have matching values? | c) Outer join
8. Which join refers to join records from the right table that have no matching key in the left table are include in the result set: | b) Right outer join
9. The operation which is not considered a basic operation of relational algebra is | a) Join
10. In SQL the statement select * from R, S is equivalent to | b) Select * from R cross join S
1. Which of the following creates a virtual relation for storing the query ? | b) View
2. Which of the following is the syntax for views where v is view name ? | c) Create view v as "query expression";
3. Select course_idfrom physics_fall_2009where building= 'Watson';Here the tuples are selected from the view.Which one denotes the view. | c) Building
4. Materialised views make sure that | b) View definition is kept up-to-date
5. Updating the value of the view | a) Will affect the relation from which it is defined
7. Which of the following is used at the end of the view to reject the tuples which do not satisfy the condition in where clause ? | c) With check
9. For the view Create view instructor_info asselect ID, name, buildingfrom instructor, departmentwhere instructor.dept name= department.dept name;If we insert tuple into the view as insert into instructor info values ('69987', 'White', 'Taylor');What will be the values of the other attributes in instructor and department relations? | b) Null
1. A _________ consists of a sequence of query and/or update statements. | a) Transaction
2. Which of the following makes the transaction permanent in the database ? | b) Commit
3. In order to undo the work of transaction after last commit which one should be used ? | c) Rollback
5. In case of any shut down during transaction before commit which of the following statement is done automatically ? | c) Rollback
6. In order to maintain the consistency during transactions database provides | b) Atomic
7. Transaction processing is associated with everything below except | a) Conforming a action or triggering a response
8. A transaction completes its execution is said to be | a) Committed
9. Which of the following is used to get back all the transactions back after rollback ? | c) Flashback
10. ______ will undo all statements up to commit? | c) Rollback
1. To include integrity constraint in a existing relation use : | c) Alter table
2. Which of the following is not a integrity constraint ? | b) Positive
5. Foreign key is the one in which the ________ of one relation is referenced in another relation. | b) Primary key
6. Create table course( . . .foreign key (dept name) references department. . . );Which of the following is used to delete the entries in the referenced table when the tuple is deleted in course table? | b) Delete cascade
7. Domain constraints, functional dependency and referential integrity are special forms of _________. | c) Assertion
8. Which of the following is the right syntax for assertion? | a) Create assertion 'assertion-name' check 'predicate';
9. Data integrity constraints are used to: | c) Improve the quality of data entered for a specific property (i.e., table column)
10. Which of the following can be addressed by enforcing a referential integrity constraint? | c) Information on the customer must be known before anything can be sold to that customer
1. Dates must be specified in the format | b) yyyy/mm/dd
2. An ________ on an attribute of a relation is a data structure that allows the database system to find those tuples in the relation that have a specified value for that attribute efficiently, without scanning through all the tuples of the relation. | a) Index
4. Which of the following is used to store movie and image files ? | b) Blob
6. Values of one type can be converted to another domain using which of the following ? | a) Cast
7. Create domain YearlySalary numeric(8,2)constraint salary value test __________;In order to ensure that an instructor's salary domain allows only values greater than a specified value use: | c) Check(value >= 29000.00);
8. Which of the following closely resembles Create view ? | b) Create table . . . as
9. In contemporary databases the top level of the hierarchy consists of ______, each of which can contain _____. | a) Catalogs, schemas
10. Which of the following statements creates a new table temp instructor that has the same schema as instructor. | b) Create table temp_instructor like instructor;
2. Which of the following is a basic form of grant statement ? | a) Grant 'privilege list'on 'relation name or view name'to 'user/role list';
3. Which of the following is used to provide privilege to only a particular attribute ? | b) Grant update(budget) on department to Raj
4. Which of the following statement is used to remove the privilege from the user Amir ? | b) Revoke update on employee from Amir
5. Which of the following is used to provide delete authorization to instructor ? | c) Create role instructor;grant delete on takesto instructor;
6. Which of the following is true regarding views ? | c) If a user creates a view on which no authorization can be granted, the system will allow the view creation request.
8. In authorization graph if DBA provides authorization to u1 which inturn gives to u2 which of the following is correct ? | c) Both a and b
9. Which of the following is used to avoid cascading of authorizations from the user ? | b) Revoke select on department from Amit, Satoshi restrict;
10. The granting and revoking of roles by the user may cause some confusions when that user role is revoked .To overcome the above situation | a) The privilege must be granted only by roles
1. Which of the following is used to access the database server at time of executing the program and get the data from the server accordingly ? | b) Dynamic SQL
2. Which of the following header must be included in java program to establish database connectivity using JDBC ? | a) Import java.sql.*;
3. DriverManager.getConnection(_______ , ______ , ______)What are the two parameters that are included ? | b) URL or machine name where server runs, User ID, Password
4. Which of the following invokes functions in sql ? | c) Callable statements
5. Which of the following function is used to find the column count of the particular resultset ? | a) getMetaData()
6. Which of the following is a following statement is a prepared statements ? | a) Insert into department values(?,?,?)
7. Which of the following is used as the embedded SQL in COBOL ? | b) EXEC SQL END-EXEC
8. Which of the following is used to distinguish the variables in SQL from the host language variables ? | b) -
9. The update statement can be executed in host language using | c) EXEC SQL update instructor set salary = salary + 100 where current of c;
1.Create function dept count(dept_name varchar(20))begindeclare d count integer;select count(*) into d countfrom instructorwhere instructor.dept_name= dept_namereturn d count;endFind the error in the the above statement . | a) Return type missing
6. Repeatsequence of statements;__________________end repeatFill in the correct option : | c) Until boolean expression
7. Which of the following is the correct format for if statement ? elsestatement or compound statementelse statement or compound statementend ifAnswer:a8. A stored procedure in SQL is a___________. | b) Group of Transact-SQL statements compiled into a single execution plan.
10. Declare out of classroom seats conditiondeclare exit handler for out of classroom seatsbeginsequence of statementsendThe above statements are used for | b) Handling Exception
1. A __________ is a special kind of a store procedure that executes in response to certain action on the table like insertion, deletion or updation of data. | b) Triggers
2. Trigger are supported in | c) Views
3. The CREATE TRIGGER statement is used to create the trigger. THE _____ clause specifies the table name on which the trigger is to be attached. The ______ specifies that this is an AFTER INSERT trigger. | b) On, for insert
4. What are the after triggers ? | b) These triggers run after an insert, update or delete on a table
5. The variables in the triggers are declared using | b) @
7. Which of the following is NOT an Oracle-supported trigger? | b) DURING
8. What are the different in triggers ? | c) Insert, Update, Delete
9. Triggers ________ enabled or disabled | a) Can be
10. Which prefixes are available to Oracle triggers? | c) Both :new and : old
1. Any recursive view must be defined as the union of two subqueries: a _______ query that is nonrecursive and a __________ query. | a) Base, recursive
2. Ranking of queries is done by which of the following ? | b) Order by
3. In rank() function if one value is shared by two tuples then | b) The rank order continues by leaving one rank in the middle
5. Select ID, GPAfrom student gradesorder by GPA____________;Inorder to give only 10 rank on the whole we should use | a) Limit 10
6. If there are n tuples in the partition and the rank of the tuple is r , then its ________ is defined as (r -1)/(n-1) . | c) Percent_rank
8. Suppose we are given a view tot credits (year, num credits) giving the total number of credits taken by students in each year.The query that computes averages over the 3 preceding tuples in the specified sort order is | a) Select year, avg(num credits)over (order by year rows 3 preceding)as avg total creditsfrom tot credits;
9. The functions which construct histograms and use buckets for ranking is | c) Ntil()
10. The command ________________ such tables are available only within the transaction executing the query, and are dropped when the transaction finishes. | b) Create temporary table
1. OLAP stands for | a) Online analytical processing
2. Data that can be modeled as dimension attributes and measure attributes are called _______ data. | a) Multidimensional
3. The generalization of cross-tab which is represented visually is ____________ which is also called as data cube. | a) Two dimensional cube
5. The operation of moving from finer-granularity data to a coarser granularity (by means of aggregation) is called a ________. | a) Rollup
6. In SQL the cross-tabs are created using | a) Slice
8. What do data warehouses support? | a) OLAP
9. Select item name, color, clothes size, sum(quantity)from salesgroup by rollup(item name, color, clothes size);How many grouping is possible in this rollup? | b) 4
1. Relational Algebra is a __________ query language that takes two relation as input and produces another relation as output of the query. | c) Procedural
3. Which of the following is used to denote the selection operation in relational algebra ? | b) Sigma (Greek)
4. For select operation the ________ appear in the subscript and the ___________ argument appears in the paranthesis after the sigma. | a) Predicates, relation
5. The ___________ operation, denoted by -, allows us to find tuples that are in one relation but are not in another. | b) Set-difference
7. Which is a join condition contains an equality operator: | a) Equijoins
8. In precedence of set operators the expression is evaluated from | b) Left to right
10. The assignment operator is denoted by | b) <-
1. Find the ID, name, dept name, salary for instructors whose salary is greater than $80,000 . | a) {t | t e instructor ? t[salary] > 80000}
2. A query in the tuple relational calculus is expressed as: | c) {t | P(t)}
3. {t | ? s e instructor (t[name] = s[name]? ? u e department (u[dept name] = s[dept name]? u[building] = "Watson"))}Which of the following best describes the query ? | a) Finds the names of all instructors whose department is in the Watson building.
4. Which of the following symbol is used in the place of except ? | c) �
5. "Find all students who have taken all courses offered in the Biology department." The expressions that matches this sentence is : | b) ? t e r (Q(t))
6. Which of the following is the comparison operator in tuple relational calculus | b) =
8. Find the names of all instructors in the Physics department together with the course id of all courses they teach: | b) {< n, c > | ? i, a (< i, c, a, s, y > e teaches? ? d, s (< i, n, d, s > e instructor ? d = "Physics"))}
1. An ________ is a set of entities of the same type that share the same properties, or attributes . | a) Entity set
2. Entity is a | c) Thing in real world
3. The descriptive property possessed by each entity set is _________ . | b) Attribute
4. The function that an entity plays in a relationship is called that entity's _____________. | c) Role
5. The attribute name could be structured as a attribute consisting of first name, middle initial, and last name . This type of attribute is called | b) Composite attribute
7. Not applicable condition can be represented in relation entry as | c) NULL
8. Which of the following can be a multivalued attribute ? | a) Phone_number
9. Which of the following is a single valued attribute | a) Register_number
10. In a relation between the entities the type and condition of the relation should be specified . That is called as______attribute | a) Desciptive
1. _____________, express the number of entities to which another entity can be associated via a relationship set. | a) Mapping Cardinality
2. An entity in A is associated with at most one entity in B, and an entity in B is associated with at most one entity in A.This is called as | b) One-to-one
4. Data integrity constraints are used to: | c) Improve the quality of data entered for a specific property
5. Establishing limits on allowable property values, and specifying a set of acceptable, predefined options that can be assigned to a property are examples of: | b) Data integrity constraints
6. Which of the following can be addressed by enforcing a referential integrity constraint? | c) Information on the customer must be known before anything can be sold to that customer
7. ______ is a special type of integrity constraint that relates two relations & maintains consistency across the relations. | b) Referential Integrity Constraints
8. Which one of the following uniquely identifies the elements in the relation? | b) Primary key
10. ____________ is preferred method for enforcing data integrity | a) Constraints
1. Which of the following gives a logical structure of the database graphically ? | a) Entity-relationship diagram
3. The Rectangles divided into two parts represents | a) Entity set
4. Consider a directed line(->) from the relationship set advisor to both entity sets instructor and student. This indicates _________ cardinality | b) One to one
6. An entity set that does not have sufficient attributes to form a primary key is termed a __________ . | c) Weak entity set
7. For a weak entity set to be meaningful, it must be associated with another entity set, called the | a) Identifying set
8. Weak entity set is represented as | c) Double diamond
9. If you were collecting and storing information about your music collection, an album would be considered a(n) _____. | b) Entity
10. What term is used to refer to a specific record in your music database; for instance; information stored about a specific album? | a) Relation
2. The primary key in the section relation is | c) Both a and b
4. Select Id,Course_id,Building from section s and teaches t where t.year=2009 ;Which of the following Id are displayed ? | c) Both a and b
5. The query which selects the Course_id 'CS-101' from the section relation is | b) Select Course_id from section where Year = '2009';
7. The relation with primary key can be created using | c) Create table instructor ( Id , Name , primary key (Id))
8. How can the values in the relation teaches be deleted ? | b) Delete from teaches;
9. In the above teaches relation " Select * from teaches where Year = '2010'" displays how many rows ? | a) 2
10. The relation changes can be got back using ________ command | a) Flashback
1. Let us consider phone_number ,which can take single or several values . Treating phone_numberas an _________ permits instructors to have several phone numbers (including zero) associated with them. | a) Entity
2. The total participation by entities is represented in E-R diagram as | b) Double line
3. Given the basic ER and relational models, which of the following is INCORRECT? | c) In a row of a relational table, an attribute can have more than one value
4. Which of the following indicates the maximum number of entities that can be involved in a relationship? | b) Maximum cardinality
6. What is a relationship called when it is maintained between two entities? | b) Binary
8. Key to represent relationship between tables is called | c) Foreign Key
9. A window into a portion of a database is | b) View
10. A primary key is combined with a foreign key creates | a) Parent-Child relation ship between the tables that connect them
1. The entity set person is classified as student and employee .This process is called | b) Specialization
2. Which relationship is used to represent a specialization entity ? | a) ISA
3. The refinement from an initial entity set into successive levels of entity subgroupings represents a ________ design process in which distinctions are made explicit. | c) Top-down
4. There are similarities between the instructor entity set and the secretary entity set in the sense that they have several attributes that are conceptually the same across the two entity sets: namely, the identifier, name, and salary attributes. This process is called | c) Generalization
6. A _____________ constraint requires that an entity belong to no more than one lower-level entity set. | a) Disjointness
7. Consider the employee work-team example, and assume that certain employees participate in more than one work team . A given employee may therefore appear in more than one of the team entity sets that are lower level entity sets of employee. Thus, the generalization is _____________. | a) Overlapping
8. The completeness constraint may be one of the following: Total generalization or specialization , Partial generalization or specialization . Which is the default ? | b) Partial
9. Functional dependencies are a generalization of | a) Key dependencies
10. Which of the following is another name for weak entity? | a) Child
1. Which is the main relation which is used in the university database which is referenced by all other relation of the university . | c) Department
2. The department relation has the an entry budget whose type has to be replaced by | c) Numeric (12,2)
3. In the course relation the title field should throw an error in case of any missing title . The command to be added in title is | b) Not null
4. In the above DDL command the foreign key entries are got by using the keyword | a) References
5. Identify the error in the section relation | a) No error
6. The following entry is given in to the instructor relation .(100202,Drake,Biology,30000)Identify the output of the query given | b) Error in ID of insert
7. Which of the following can be used as a primary key entry of the instructor relation. | c) ID
8. In the section relation which of the following is used as a foreign key ? | a) Course_id
| b) Drop section;
1. Which of the following command is used to display the departments of the instructor relation ? | c) Select dept_name from instructor;
2. How can we select the elements which have common Dept_name in both the relation ? | a) Select * from instructor i , course c where i.Dept_name=c.Dept_name;
3. Select distinct Dept_name from instructor ;How many row(s) are displayed ? | a) 4
4. Suppose the Authority want to include a new instructor for the title Neuroscience what command should be inserted ? | c) Insert into instructor values(12111,Emma,Biology,200000);Insert into course values(BIO-112,Introduction to Neuro Science,NeuroScience,2);
5. If a person all the people in Music department gets fired which of the following has to be performed on the instructor relation ? | b) Delete from instructor where Dept_name=Music;
8. How will you select the Names whose first letter is E ? where Dept_name like 'A%;Answer:a9. Which function is used to find the count of distinct departments? | a) Dist
10. Which function is used to identify the title with Least scope ? | a) Min(Credits)
1. A domain is ______ if elements of the domain are considered to be indivisible units. | a) Atomic
6. If every non-key attribute is functionally depedent primary key, then the relation will be in | b) Second normal form
7. If an attribute of a composite key is dependent on an attribute of the other composite key, a normalization called _____ is needed. | b) BCNF
9. A data type that creates unique numbers for key columns in Microsoft Access is: | a) Autonumber
10. A dependency exist between two columns when | a) Together they constitute a composite key for the table
3. Tables in second normal form (2NF): | a) Eliminate all hidden dependencies
4. Which-one ofthe following statements about normal forms is FALSE? | c) Loss less, dependency - preserving decomposition into BCNF is always possible
5. Functional Dependencies are the types of constraints that are based on______ | a) Key
6. Which is a bottom-up approach to database design that design by examining the relationship between attributes: | c) Normalization
7. Which forms simplifies and ensures that there is minimal data aggregates and repetitive groups: | c) 3NF
8. Which forms has a relation that possesses data about an individual entity: | c) 4NF
9. Which forms are based on the concept of functional dependency: | c) 3NF
10. Empdt1(empcode, name, street, city, state,pincode).For any pincode, there is only one city and state. Also, for given street, city and state, there is just one pincode. In normalization terms, empdt1 is a relation in | b) 2 NF and hence also in 1 NF
1. We can use the following three rules to find logically implied functional dependencies. This collection of rules is called | b) Armstrong's axioms
2. Which of the following is not a Armstrong's Axiom ? | c) Pseudotransitivity rule
5. There are two functional dependencies with the same set of attributes on the left side of the arrow:A->BCA->BThis can be combined as | a) A->BC
6. Consider a relation R(A,B,C,D,E) with the following functional dependencies:ABC -> DE andD -> ABThe number of superkeys of R is: | c) 10
7. Suppose we wish to find the ID's of the employees that are managed by people who are managed by the employee with ID 123. Here are two possible queries:I.SELECT ee.empIDFROM Emps ee, Emps ffWHERE ee.mgrID = ff.empID AND ff.mgrID = 123;II.SELECT empIDFROM EmpsWHERE mgrID IN(SELECT empID FROM Emps WHERE mgrID = 123);Which, if any, of the two queries above will correctly (in SQL2) get the desired set of employee ID's? | a) Both I and II
8. Suppose relation R(A,B) currently has tuples {(1,2), (1,3), (3,4)} and relation S(B,C) currently has {(2,5), (4,6), (7,8)}. Then the number of tuples in the result of the SQL query:Select *From R Natural Outer Join S; is: | a) 2
9. Suppose now that R(A,B) and S(A,B) are two relations with r and s tuples, respectively (again, not necessarily distinct). If m is the number of (not necessarily distinct) tuples in the result of the SQL query:R intersect S;Then which of the following is the most restrictive, correct condition on the value of m?(a) m = min(r,s)(b) 0 <= m <= r + s(c) min(r,s) <= m <= max(r,s)(d) 0 <= m <= min(r,s)Answer:d10. Suppose relation R(A,B,C,D,E) has the following functional dependencies:A -> BB -> CBC -> AA -> DE -> AD -> EWhich of the following is not a key? | c) B,C
1. A relation is in ____________ if an attribute of a composite key is dependent on an attribute of other composite key. | b) 3NF
2. What are the desirable properties of a decomposition | b) Dependency preservation
Class (course id, title, dept name, credits, sec id, semester, year, building, room number, capacity, time slot id)The set of functional dependencies that we require to hold on class are:course id->title, dept name, creditsbuilding, room number->capacitycourse id, sec id, semester, year->building, room number, time slot idA candidate key for this schema is {course id, sec id, semester, year}4. Consider the above conditions. Which of the following relation holds ? | a) Course id-> title, dept name, credits
5. The algorithm that takes a set of dependencies and adds one schema at a time, instead of decomposing the initial schema repeatedly is | c) 3NF synthesis algorithm
8. Relation R with an associated set of functional dependencies, F, is decomposed into BCNF. The redundancy (arising out of functional dependencies) in the resulting set of relations is | b) More than zero but less than that of an equivalent 3NF decomposition
9. A table has fields F1, F2, F3, F4, and F5, with the following functional dependencies:F1->F3F2->F4(F1,F2)->F5in terms of normalization, this table is in | a) 1NF
1. The normal form which satisfies multivalued dependencies and which is in BCNF is | a) 4 NF
2. Which of the following is a tuple-generating dependencies ? | c) Multivalued dependencies
3. The main task carried out in the __________ is to remove repeating attributes to separate tables. | a) First Normal Form
5. Which forms has a relation that possesses data about an individual entity? | c) 4NF
7. Which of the following has each related entity set has its own schema and there is an additional schema for the relationship set? | a) A many-to-many relationship set
8. In which of the following , a separate schema is created consisting of that attribute and the primary key of the entity set. | b) A multivalued attribute of an entity set
9. Fifth Normal form is concerned with | c) Join dependency
10. In 2NF | c) No partial FDs exist.
3. Which of the following has each related entity set has its own schema and there is an additional schema for the relationship set. | a) A many-to-many relationship set
4. In which of the following , a separate schema is created consisting of that attribute and the primary key of the entity set. | b) A multivalued attribute of an entity set
4. Suppose the user finds the usage of room number and phone number in a relational schema there is confusion.This is reduced by | a) Unique-role assumption
5. What is the best way to represent the attributes in a large database? | b) Concatenation
6. Designers use which of the following to tune performance of systems to support time-critical operations? | a) Denormalization
7. In the schema (dept name, size) we have relations total inst 2007, total inst 2008 . Which dependency have lead to this relation ? | a) Dept name, year->size
8. Relation dept year(dept name, total inst 2007, total inst 2008, total inst 2009) .Here the only functional dependencies are from dept name to the other attributes .This relation is in | b) BCNF
9. Thus a _______ of course data gives the values of all attributes, such as title and department, of all courses at a particular point in time. | b) Snapshot
10. Representations such as the in the dept year relation, with one column for each value of an attribute, are called _______; they are widely used in spreadsheets and reports and in data analysis tools. | a) Cross-tabs
1. An approach to website design with the emphasis on converting visitors to outcomes required by the owner is referred to as: | b) Persuasion.
2. A method of modelling and describing user tasks for an interactive application is referred to as: | c) Use case.
3. Information architecture influences: | b) Site structure.
4. Also known as schematics, a way of illustrating the layout of an individual webpage is a: | a) Wireframe.
5. A graphical or text depiction of the relationship between different groups of content on a website is referred to as a: | c) Sitemap.
6. Blueprints are intended to: | c) Indicate the structure of a site during site design and as a user feature.
8. Which of the following occupies boot record of hard and floppy disks and activated during computer startup? | b) Boot sector virus
9. A graphical or text depiction of the relationship between different groups of content on a website is a: | c) Site map.
10. Which of the following is a description of information organization schemes? | c) The menu options chosen to group and categorize information.
1. Which of the following is a valid uniform resource locator ? | a) http://www.acm.org/sigmod
3. HTTP defines two ways in which values entered by a user at the browser can be sent to the Web server. The _____ method encodes the values as part of the URL. | b) Get
named q with the get method, and the user typed in the string "silberschatz" and submitted the form, the browser would request the following URL from the Web server: http://www.google.com/search?q=silberschatz.4. A __________ is a program running on the server machine,which accepts requests from a Web browser and sends back results in the form of HTML documents. | c) Web Server
5. The application program typically communicates with a database server, through ___________, or other protocols, in order to get or store data. | c) All of the mentioned
6. This extra information is usually maintained in the form of a _________ at the client. | a) Cookie
7. Which of the following is not true about HTML ? | b) <meta..../>
10. How many levels of headings are in html: | c) 6
1. The Java __________ specification defines an application programming interface for communication between the Web server and the application program. | a) Servlet
2. The doGet() method in the example extracts values of the parameter's type and number by using __________ | a) request.getParameter()
4. Which JDBC driver Type(s) can be used in either applet or servlet code? | c) Both Type 3 and Type 4
5. What MySQL property is used to create a surrogate key in MySQL? | c) AUTO_INCREMENT
6. A JSP is transformed into a(n): | b) Java servlet
7. Which JDBC driver Type(s) is(are) the JDBC-ODBC bridge? | a) Type 1
8. What programming language(s) or scripting language(s) does Java Server Pages (JSP) support? | c) Java only
9. What is bytecode? | c) Machine-independent code
10. Where is metadata stored in MySQL? | c) In the MySQL database mysql
1. Which of the following is true for Seeheim model? | a) Presentation is abstracted from dialogue and Application
2. Which of the unit operation is used in Model view controller? | b) Part Whole Decomposition
3. Memory address refers to the successive memory words and the machine is called as _______________ | a) word addressable
4. Which layer deals which deals with user interaction is called _____________ layer | c) User interaction
5. The _____________ layer, which provides a high-level view of data and actions on data. | a) Business logic
7. The _____________ system is widely used for mapping from Java objects to relations. | a) Hibernate
8. Which among the following are the functions that any system with a user interface must provide? | a) Presentation
4. How to force a log switch? | b) By using ALTER SYSTEM SWITCH LOGFILE
5. In the following query, which expression is evaluated first?SELECT id_number, (quantity - 100 / 0.15 - 35 * 20) FROM inventory | a) 100 / 0.15
6. The ORDER BY clause can only be used in | a) SELECT queries
FROM table_nameORDER BY column_name,column_name ASC | DESC;.7. Which of the following rule below are categories of index? | a) Column and Functional
8. What is the purpose of SMON background process? | a) Performs crash recovery when a failed instance starts up again
10. Which of the following queries displays the sum of all employee salaries for those employees not making commission, for each job, including only those sums greater than 2500? | b) select job, sum(sal) from emp where comm is null group by job having sum(sal) > 2500;
1. The indirect change of the values of a variable in one module by another module is called | c) Side effect
3. Which of the following data structure is linear data structure? | c) Arrays
4. Which of the following criterion is NOT written using the proper syntax? | c) NO VALUE
6. Finding the location of the element with a given value is: | b) Search
7. Arrays are best data structures | a) For relatively permanent collections of data
8. Linked lists are best suited | b) For the size of the structure and the data in the structure are constantly changing
9. Each array declaration need not give, implicitly or explicitly, the information about | c) The first data from the set to be stored
10. The elements of an array are stored successively in memory cells because | a) By this way computer can keep track only the address of the first element and the addresses of other elements can be calculated
1. In _________________ attacks, the attacker manages to get an application to execute an SQL query created by the attacker. | a) SQL injection
2. A Web site that allows users to enter text, such as a comment or a name, and then stores it and later displays it to other users, is potentially vulnerable to a kind of attack called a ___________________ attack. | c) Cross-site scripting
3. _________ is an attack which forces an end user to execute unwanted actions on a web application in which he/she is currently authenticated. | b) Cross-site request forgery
4. Many applications use _________________, where two independent factors are used to identify a user. | a) Two-factor authentication
6. A single ______________ further allows the user to be authenticated once, and multiple applications can then verify the user's identity through an authentication service without requiring reauthentication. | b) Sign-on system
7. The ___________________ is a standard for exchanging authentication and authorization information between different security domains, to provide cross-organization single sign-on. | c) Security Assertion Markup Language (SAML)
8. The __________ standard is an alternative for single sign-on across organizations, and has seen increasing acceptance in recent years. | a) OpenID
10. VPD provides authorization at the level of specific tuples, or rows, of a relation, and is therefore said to be a _____________ mechanism. | a) Row-level authorization
1. ___________ is widely used today for protecting data in transit in a variety of applications such as data transfer on the Internet, and on cellular phone networks. | a) Encryption
2. In a database where the encryption is applied the data is cannot be handled by the unauthorised user without | b) Decryption key
4. In which of the following encryption key is used to encrypt and decrypt the data ? | c) Symmetric key
5. Encryption of small values, such as identifiers or names, is made complicated by the possibility of __________ | a) Dictionary attacks
6. Which one of the following uses a 128bit round key to encrypt the data using XOR and use it in reverse to decrypt it ? | c) Advanced Encryption Standard
7. Which of the following requires no password travel across the internet ? | c) Challenge-response system
8. Assymmetric Encryption: Why can a message encrypted with the Public Key only be decrypted with the receiver's appropriate Private Key? | b) A so called "one way function with back door" is applyed for the encryption
9. Which is the largest disadvantage of the symmetric Encryption? | b) Problem of the secure transmission of the Secret Key
10. Which is the principle of the encryption using a key? | b) The key contains the secret function for encryption including parameters. Only a password can activate the key
2. The _________ is the fastest and most costly form of storage, which is relatively small; its use is managed by the computer system hardware. | a) Cache
3. Which of the following stores several gigabytes of data but usually lost when power failure? | c) Main memory
4. The flash memory storage used are | a) NOR Flash
5. __________ is increasingly being used in server systems to improve performance by caching frequently used data, since it provides faster access than disk, with larger storage capacity than main memory. | a) Flash memory
6. Which is the cheapest memory device in terms of costs/bit ? | c) Compact disks
7. The primary medium for the long-term online storage of data is the __________ where the entire database is stored on magnetic disk. | b) Magnetic disks
8. Optical disk _______ systems contain a few drives and numerous disks that can be loaded into one of the drives automatically (by a robot arm) on demand. | b) Jukebox
9. There are "record-once" versions of compact disk and digital video disk, which can be written only once; such disks are also called __________ disks. | a) Write-once, read-many (WORM)
10. Tape storage is referred to as __________ storage. | c) Sequential-access
2. A __________ is the smallest unit of information that can be read from or written to the disk. | c) Sector
3. The disk platters mounted on a spindle and the heads mounted on a disk arm are together known as ___________. | b) Head-disk assemblies
4. The disk controller uses ________ at each sector to ensure that the data is not corrupted on data retrieval. | a) Checksum
5. _________ is the time from when a read or write request is issued to when data transfer begins. | a) Access time
6. The time for repositioning the arm is called the ________, and it increases with the distance that the arm must move. | c) Seek time
7. _________ is around one-half of the maximum seek time. | b) Average seek time
9. In Flash memory, the erase operation can be performed on a number of pages, called an _______, at once, and takes about 1 to 2 milliseconds. | b) Erase block
10. Hybrid disk drives are hard-disk systems that combine magnetic storage with a smaller amount of flash memory, which is used as a cache for frequently accessed data. | b) Disk drivers
1. Which level of RAID refers to disk mirroring with block striping? | a) RAID level 1
3. With multiple disks, we can improve the transfer rate as well by ___________ data across multiple disks. | a) Striping
7. ______________ partitiones data and parity among all N+1 disks, instead of storing data in N-disks and parity in one disk. | b) Block interleaved distributed parity
8. Hardware RAID implementations permit _________; that is, faulty disks can be removed and replaced by new ones without turning power off. | c) Hot swapping
swapping reduces the mean time to repair, since replacement of a disk does not have to wait until a time when the system can be shut down.9. ___________ is popular for applications such as storage of log files in a database system, since it offers the best write performance. | a) RAID level 1
10. ______________ which increases the number of I/O operations needed to write a single logical block, pays a significant time penalty in terms of write performance. | c) removable media
3. A typical tape drive is ________ a typical disk drive. | a) more expensive than
4. During recovery from a failure | a) each pair of physical block is examined
6. Which of the following is the process of selecting the data storage and data access characteristics of the database? | b) Physical database design
7. The replacement of a bad block generally is not totally automatic because | b) data in bad block is usually lost
9. The surface area of a tape is ________ the surface area of a disk. | b) much larger than
10. Which one of the following is not a secondary storage? | c) RAM
2. A unit of storage that can store one or more records in a hash file organization is denoted as | a) Buckets
3. The file organization which allows us to read records that would satisfy the join condition by using one block read is | c) Clustering file organization
4. What are the correct features of a distributed database? | c) Users see the data in one global schema.
5. Each tablespace in an Oracle database consists of one or more files called | c) datafiles
6. The management information system (MIS) structure with one main computersystem is called a | c) Centralized MIS structure
7. A top-to-bottom relationship among the items in a database is established by a | a) Hierarchical schema
8. Choose the RDBMS which supports full fledged client server application development | b) Oracle 7.1
9. One approach to standardization storing of data? | c) CODASYL specification
10. The highest level in the hierarchy of data organization is called | b) Data base
2. An audit trail ___________ . | b) Is the recorded history of operations performed on a file
3. Large collection of files are called ____________ . | c) Database
4. Which of the following hardware component is the most important to theoperation of database management system? | c) High speed, large capacity disk
5. Which of the following is not true of the traditional approach to information processing | a) There is common sharing of data among the various applications
7. Which of these data models is an extension of relational data model? | b) Object-relational data model
8. The information about data in a database is called _______. | a) Metadata
10. The DBMS acts as an interface between what two components of an enterprise-class database system? | a) Database application and the database
1. A relational database system needs to maintain data about the relations, such as the schema of the relations. This is called | a) Metadata
3. ___________ is the collection of memory structures and Oracle background processes that operates against an Oracle database. | b) Instance
4. A ________ is a logical grouping of database objects, usually to facilitate security, performance, or the availability of database objects such as tables and indexes. | a) Tablespace
5. A tablespace is further broken down into ________ | b) Segments
6. __________ is a contiguous group of blocks allocated for use as part of a table, index, and so forth. | c) Extent
8. An Oracle __________ is a set of tables and views that are used as a read-only reference about the database. | c) Data dictionary
9. A data dictionary is created when a __________ created. | c) Database
10. An Oracle object type has two parts the _________ and__________ | c) Specification and body
1. The _______ is that part of main memory available for storage of copies of disk blocks. | a) Buffer
2. A major goal of the database system is to minimize the number of block transfers between the disk and memory. This is achieved by | a) Buffer
3. The subsystem responsible for the allocation of buffer space is called the ___________. | b) Buffer manager
4. In the buffer where there is no space for another block, the bllock can be inserted using | c) Buffer replacement strategy
5. A block that is not allowed to be written back to disk is said to be ______________. | a) Pinned
6. There are situations in which it is necessary to write back the block to disk, even though the buffer space that it occupies is not needed. This write is called the | b) Forced output block
7. The frequently used buffer replacement strategy is | b) Least recently used
8. In case the buffer manager do not write the blocks properly then the buffer manager uses | c) Crash recovery system
10. ___________________ frees the space occupied by a block as soon as the final tuple of that block has been processed. | c) Toss immediate strategy
1. In ordered indices the file containing the records is sequentially ordered, a ___________ is an index whose search key also defines the sequential order of the file. | a) Clustered index
2. Indices whose search key specifies an order different from the sequential order of the file are called ___________ indices. | c) All of the mentioned
3. An ____________, consists of a search-key value and pointers to one or more records with that value as their search-key value. | a) Index entry
4. In a _______ clustering index, the index record contains the search-key value and a pointer to the first data record with that search-key value and the rest of the records will be in the sequential pointers. | a) Dense
5. In a __________ index, an index entry appears for only some of the search-key values. | a) Dense
6. Incase the indices values are larger, index is created for these values of index. This is called | c) Multilevel index
7. A search key containing more than one attribute is referred to as a _________ search key. | b) Composite
9. Insertion of a large number of entries at a time into an index is referred to as __________ of the index. | c) Bulk loading
10. While inserting the record into the index, if the search-key value does not appear in the index, | c) The system inserts an index entry with the search-key value in the index at the appropriate position.
1. If h is any hashing function and is used to hash n keys in to a table of size m, where n<=m, theexpected number of collisions involving a particular key x is : | a) Less than 1
3. The searching technique that takes O (1) time to find a data is | c) Hashing
4. The goal of hashing is to produce a search that takes | a) O(1) time
5. Consider a hash table of size seven, with starting index zero, and a hash function (3x + 4)mod7. Assuming the hash table is initially empty, which of the following is the contents of the table when the sequence 1, 3, 8, 10 is inserted into the table using closed hashing? Note that '_' denotes an empty location in the table. | b 1, 8, 10, _, _, _, 3
6. A hash table can store a maximum of 10 records, currently there are records in location 1, 3,4,7,8,9,10. The probability of a new record going into location 2, with hash functions resolving collisions by linear probing is | b) 0.6
7. Key value pairs is usually seen in | a) Hash tables
8. What is the best definition of a collision in a hash table? | a) Two entries are identical except for their keys.
9. Which of the following scenarios leads to linear running time for a random search hit in a linear-probing hash table? | c) Graphs
1. A(n) _________ can be used to preserve the integrity of a document or a message. | c) Encrypted message
2. A hash function must meet ________ criteria. | b) Three
3. What is the main limitation of Hierarchical Databases? | b) Limited flexibility in accessing data
4. The property (or set of properties) that uniquely defines each row in a table is called the: | c) Primary key
5. The separation of the data definition from the program is known as: | b) Data independence
7. The traditional storage of data that is organized by customer, stored in separate folders in filing cabinets is an example of what type of 'database' system? | a) Hierarchical
8. The database design that consists of multiple tables that are linked together through matching data stored in each table is called a) Hierarchical databaseb) Network databasec) Object oriented databased) Relational databaseAnswer: d9. The association role defines: | a) How tables are related in the database
10. The purpose of an N-Ary association is: | c) To deal with relationships that involve more than two tables
1. Bitmap indices are a specialized type of index designed for easy querying on ___________. | c) Multiple keys
2. A _______ on the attribute A of relation r consists of one bitmap for each value that A can take. | a) Bitmap index
4. To identify the deleted records we use the ______________. | a) Existence bitmap
5. Bitmaps can be used as a compressed storage mechanism at the leaf nodes of ________ for those values that occur very frequently. | b) B+-trees
6. Bitmaps can be combined with regular B+-tree indices for relations where a few attribute values are extremely common, and other values also occur, but much less frequently. | b) Bitmap, B+tree
7. In a B+-tree index ______, for each value we would normally maintain a list of all records with that value for the indexed attribute. | a) Leaf
8. A tablespace is further broken down into ________ | b) Segments
9. In ordered indices the file containing the records is sequentially ordered, a ___________ is an index whose search key also defines the sequential order of the file. | a) Clustered index
10. Indices whose search key specifies an order different from the sequential order of the file are called ___________ indices. | c) All of the mentioned
2. How many types of indexes are there in sql server? | b) 2
3. How non clustered index point to the data? | c) It is used for pointing data rows containing key values
4. Which one is true about clustered index? | b) Clustered index is built by default on unique key columns
5. What is true about indexes? | b) It makes harder for sql server engines to work to work on index which have large keys
6. Does index take space in the disk ? | b) Yes, Indexes are stored on disk
7. What are composite indexes ? | b) A composite index is a combination of index on 2 or more columns
8. If an index is _________________ the metadata and statistics continue to exists | a) Disabling
9. In _______________ index instead of storing all the columns for a record together, each column is stored separately with all other rows in an index. | b) Column store
10. A _________________ index is the one which satisfies all the columns requested in the query without performing further lookup into the clustered index. | c) Covering
1. A collection of data designed to be used by different people is called a/an | b) Database
4. Which of the following is an attribute that can uniquely identify a row in a table? | b) Candidate key
5. Which of the following is the process of selecting the data storage and data access characteristics of the database? | b) Physical database design
7. The relationship between DEPARTMENT and EMPLOYEE is a | b) One-to-many relationship
8. A table can be logically connected to another table by defining a | c) Primary key
10. Ensuring isolation property is the responsibility of the | b) Concurrency-control component of the DBMS
1. In query processing, the ___________ is the lowest-level operator to access data. | c) File scan
2. In a _______________, the system scans each file block and tests all records to see whether they satisfy the selection condition. | b) Linear search
4. Search algorithms that use an index are referred to as | a) Index Search
5. Which algorithm uses equality comparison on a key attribute with a primary index to retrieve a single record that satisfies the corresponding equality condition. | a) A2
6. The strategy can retrieve a single record if the equality condition is on a key;multiple records may be retrieved if the indexing field is not a key is | b) A4
8. The ___ algorithm scans each index for pointers to tuples that satisfy an individual condition. | c) A9
9. If access paths are available on all the conditions of a disjunctive selection, each index is scanned for pointers to tuples that satisfy the individual condition. This is satisfied by | a) A10
10. Conjunctive selection using one index . This is | b) A7
1. Two main measures for the efficiency of an algorithm are | c) Time and space
2. The time factor when determining the efficiency of algorithm is measured by | b) Counting the number of key operations
3. The space factor when determining the efficiency of algorithm is measured by | a) Counting the maximum memory needed by the algorithm
6. The Average case occur in linear search algorithm | a) When Item is somewhere in the middle of the array
7. The complexity of the average case of an algorithm is | a) Much more complicated to analyze than that of worst case
8. The complexity of linear search algorithm is | a) O(n)
9. The complexity of Binary search algorithm is | b) O(log )
10. The complexity of Bubble sort algorithm is | c) O(n2)
1. A_____ is a query that retrieves rows from more than one table or view: | c) Join
2. A condition is referred to as _____: | b) Join condition
3. Which oracle is the join condition is specified using the WHERE clause: | c) Pre-oracle 9i
6. Which product is returned in a join query have no join condition: | b) Cartesian
8. Which join refers to join records from the write table that have no matching key in the left table are include in the result set: | b) Right outer join
10. Which view that contains more than one table in the top-level FROM clause of the SELECT statement: | c) Updatable join view
1. Pictorial representation of an expression is called | b) Operator tree
2. The results of each intermediate operation are created and then are used for evaluation of the next-level operations. This is called | a) Materialized evaluation
3. ______________ allows the algorithm to execute more quickly by performing CPU activity in parallel with I/O activity. | a) Buffering
4. Pipelines can be executed in | c) 2
5. In a __________, the system makes repeated requests for tuples from the operation at the top of the pipeline. | a) Demand-driven pipeline
6. In a __________________, operations do not wait for requests to produce tuples, but instead generate the tuples eagerly. | b) Producer-driven pipeline
7. Each operation in a demand-driven pipeline can be implemented as an ____ that provides the following functions: open(), next(), and close(). | c) Iterator
8. The iterator maintains the __________ of its execution in between calls, so that successive next() requests receive successive result tuples. | a) State
9. Tuples are generated ___________ in producer-driven pipelining, they are generated ________, on demand, in demand-driven pipelining. | b) Eagerly, Lazily
1. Consider the following relational schemes for a library database:Book (Title, Author, Catalog_no, Publisher, Year, Price)Collection (Title, Author, Catalog_no)With the following functional dependencies:I. Title Author -> Catalog_noII. Catalog_no -> Title Author Publisher YearIII. Publisher Title Year -> PriceAssume {Author, Title} is the key for both schemes. Which of the following statements is true? | c) Book is in 2NF and Collection is in 3NF
6. You have a column that will only contain values from 0 to 256. What is the most economical data type to use for the column? | b) SMALLINT
7. Problems occurs if we don't implement proper locking strategy | b) Phantom reads