Daa QB
Daa QB
Unit-1 INTRODUCTION
Fundamentals of the Analysis of Algorithmic Efficiency –Asymptotic Notations and their properties. Analysis
Framework – Empirical analysis - Mathematical analysis for Recursive and Non-recursive algorithms -
Visualization
S.NO MCQ CO K
LEVEL
1 In simplex method the slack, surplus and the artificial are restricted to be CO1.1 K1
a) Double diamonds
b) Undivided rectangles
c) Dashed lines
d) Diamond
3 Consider a directed line(->) from the relationship set advisor to both entity sets CO1.3 K2
instructor and student. This indicates _________ cardinality?[CO1.3][K2]
a) One to many
b) One to one
c) Many to many
d) Many to one
4 An entity set that does not have sufficient attributes to form a primary key is termed a CO1.3 K2
__________?[CO1.4][K2]
a) Strong entity set
b) Variant set
c) Weak entity set
d) Variable set
5 Weak entity set is represented as?[CO1.4][K2] CO1.3 K1
a) Underline
b) Double line
c) Double diamond
d) Double rectangle
6 Two attributes can be functionally ___ on/of each other. ?[CO1.5][K2]
A. Dependent
B. Independent CO1.3 K4
C. Both A and B
D. None of the above
7 An attribute that is ___ and the primary key of a table are typically functionally CO1.4 K1
dependent on one another. ?[CO1.5][K2]
A. Key
B. Non-Key
C. One-Key
D. Many-Key Functional dependencies are classified as ___ on the left. ?[CO1.5][K2]
A. Dependent
B. Determined
C. Determinants
D. Database
8 Functional dependencies are classified as ___ on the left. ?[CO1.5][K2] CO1.4 K4
A. Dependent
B. Determined
C. Determinants
D. Database
9 How many types of functional dependencies are there? ?[CO1.6][K2] CO1.5 K2
A. 1
B. 2
C. 3
D. 4
10 If ___, then A -> B has trivial functional dependency. ?[CO1.7][K2] CO1.5 K2
A. B is a subset of A
B. A is a subset of B
C. A is a subset of A'
D. B is a subset of B'
11 Which of the following is a trivial functional dependency? ?[CO1.7][K2] CO1.6 K2
A. A->B, if B is a subset of A
B. A->A
C. B->B
D. All of the above
12 In the ___, the decomposition of a relationship is necessary if a relationship is in an CO1.7 K3
inappropriate normal form. ?[CO1.8][K1]
A. Rational Model
B. Relational Model
C. Reasonable Model
D. Rectifiable Model
13 Consider attributes ID, CITY and NAME. Which one of this can be considered as a CO1.7 K2
super key?
a)NAME b)ID c)CITY d) CITY, ID Which of the following
refers to the level of data abstraction that describes exactly how the data actually stored?
[C01][K2]
(a)Conceptual Level
(b)Physical Level
(c)File Level
(d)Logical Level
14 Relational Algebra is a __________ query language that takes two relations as input and CO1.8 K1
produces another relation as an output of the query.
a) Relational b) Structural c) Procedural d) Fundamental
15 Which of the following command is correct to delete the values in the relation teaches? CO1.9 K2
a) Delete from teaches; b) Delete from teaches where Id =’Null’;
c) Remove table teaches; d) Drop table teaches;
16 After groups have been established, SQL applies predicates in the ___________ clause, CO1.9 K1
allowing aggregate functions to be used.
a) Where b) Having c) Group by d) With
17 What is the function of the following command? CO.1.1 K4
Delete from r where P; 0
a) Clears entries from relation? b) Deletes relation
c) Deletes particular tuple from relation d) All of the mentioned
18 The query specifying the SQL view is said to be updatable if it meets which of the CO1.10 K2
following conditions?
a) select clause contains relation attribute names but not have expressions, aggregates, or
distinct specification
b) from clause has 1 relation
c) query does not have group by or having clause
d) All of the mentioned
Below Code is a procedure for dynamic SQL using ___________ parameter. CO1.12 K2
CREATE PROCEDURE GetArticle
@ArticleID INT
AS
SELECT ArticleTitle,ArticleBody FROM
Articles
WHERE Article ID=@ArticleID GO
a) Input and Output b) Input c) Output d) Command Execution
PART –B
8 Using the attribute value as “country” and sort the following table Using relational Algebra CO1.7 K3
C.ID C.Name C.NO Address City PostalCod Country
e
001 ABC 1234567890 XXX LONDON 12203 UK
002 DEF 0123456789 YYY BERLIN 12650 GERMANY
003 GHI 2345678910 ZZZ MEXICO 12589 MEXICO
004 JKL 7894563210 QQQ LUEA 22581 MEXICO
PART –C
6 Summarize Select, Project , Cartesian Product and Equality join in relational algebra CO1.7 K3
with an example
Assume the following table. Degree(degcode,name,subject)
7 Candidate(seatno,degcode,name,semester,month,year,result)
Marks(seatno,degcode,name,semester,month,year,papcode,marks) Degcode-degree CO1.7 K4
code, Name-name of the degree(MSc,MCom) Subject-subject of the course
Eg,Phy,Pap code—paper code eg Ai. Serve the following queries using SQL. (i)
Write a SELECT statement to display all the degree codes which are there in the
candidate table but not present in degree table in the order of degcode. (03) (ii) Write
a SELECT statement to display the name of all the candidate who have got less than
40 marks in exactly 2 subjects.(03) (iii)Write SELECT statement to display the
name,subject and number of candidates for all degrees in which there are less than 5
candidates.(03) (iv) Write a SELECT statement to display the names of all the
candidate who have get highest total marks in MSc.,(Maths) (04)
8 Write SQL statements for: CO1.8 K3
i. Creating a table student with following information: Name of table: student,
columns and data types: rollno number(6), name varchar(20), branch varchar(20);
ii. Inserting data into the student table
iii. Altering table by adding new column class varchar(20)
iv. Deleting a row from the table
v. Drop column branch
vi. Alter table by changing the data type of rollno to number(8).