0% found this document useful (0 votes)
37 views6 pages

Daa QB

This document contains a unit outline for the course "Design and Analysis of Algorithms" taught in the Department of Computer Science and Engineering at Vel Tech Multi Tech Dr Sakunthala Engineering College. The unit covers fundamental concepts of algorithms including notions of algorithms, problem types, analysis frameworks, and asymptotic notations. It also includes multiple choice and four mark questions related to relational databases, SQL, functional dependencies, and normalization.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views6 pages

Daa QB

This document contains a unit outline for the course "Design and Analysis of Algorithms" taught in the Department of Computer Science and Engineering at Vel Tech Multi Tech Dr Sakunthala Engineering College. The unit covers fundamental concepts of algorithms including notions of algorithms, problem types, analysis frameworks, and asymptotic notations. It also includes multiple choice and four mark questions related to relational databases, SQL, functional dependencies, and normalization.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Vel Tech Multi Tech Dr Sakunthala Engineering College,Avadi

Department of Computer science and engineering

191CS421/ DESIGN AND ANALYSIS OF ALGORITHMS

Unit-1 INTRODUCTION

Notion of an Algorithm – Fundamentals of Algorithmic Problem Solving – Important Problem Types –

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. Multiplied b. Negative c. Non- negative d. Dividend

2 2. The entity relationship set is represented in E-R diagram as?[CO1.1][K2] CO1.2 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

19 Point out the correct statement. CO1.10 K2


a) ODBC has the call ExecDirect
b) Few database systems provide the facilities for running SQL code directly against the
database engine
c) The SQL code is not stored in the source program, but rather it is generated based on
user input
d) None of the mentioned

20 Structured query language views are also known as CO1.11 K1


a)Simple tables b)Virtual tables c)Complex tables d)Actual Tables

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

S.NO FOUR MARK QUESTIONS CO K


LEV
EL
1 Enumerate the disadvantages of file processing system. CO1.1 K2
2 Sketch the levels of Abstraction in the views of data CO1.2 K1
3 Correlate between hierarchical data model and network model. CO1.3 K2
4 What are the major components used in ER – model ? CO1.3 K1
5 State the functions of database administrator CO1.4 K1
6 Catalog the important terms used in RDBMS. CO1.5 K2
7 Design the relational table using SQL command for the following CO1.6 K4
Employee(Emp-no, Name, Department, Salary)
(i) Create and Insert 7 Tuple values
(iii) Identifie the Primary Key in the Table.

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

9 Tabulate the DDL and DML. CO1.8 K2


10 Consider the database given by the following schemes.
Customer (Cust_No, Sales_ Person_No ,City)
Sales_ Person(Sales_ Person_No,Sales_
Person_Name,Common_Prec,Year_of_Hire)
Give an expression in SQL for each of the following queries:
(i) Display the list of all customers.
(ii) Select Cust No, city from Customer.
(iii) List the names of the sales persons who have accounts in Delhi.
(iv) Select Sales_Person_Name in the city delhi
11 Design the Student database for the Attributes (Stud-Name,Dept,Reg-No) by using TCL
12 Write the DDL commands for the student‘s database. Which contains CO1.9 K1
Student : name, id, DOB, branch, DOJ
Course : course_name, Courseid, id, faculty_name, id
13 By Considering the table name as Student , Create a table and insert the attributes for the CO1.10 K3
created table and display the table .
14 List out the aggregate functions supported by SQL CO1.11 K2
15 Differentiate Embeded SQL and Dynamic SQL CO1.12 K2

PART –C

S.N TWELEVE MARK QUESTIONS CO K


O LEVEL
1 Why would you choose a database system instead of Simply storing data in Operation CO1.1 K2
System files.What would it makes sense not to use a database system?
2 With the help of block diagram , describe the basic architecture of a database CO1.3 K2
management Systems
3 Demonstrate the Evolution of Relational Database management Systems. CO1.4 K2
4 Consider the relational table given below and answer the following SQL queries. CO1.5 K3
Employee(Empno, Name, Department, Salary)
(i) Create and Insert 7 rows into the above table. (4)
(ii) List all the employees whose name starts with the letter 'L'.(2)
(iii) Find the maximum salary given to employees in each department. (1)
(iv) Find the number of employees working in 'accounts' department. (2)
(v) Find the sum of salary based on ‘Sales’ Department.(2)
(vi) Find the employee who is getting the minimum Salary. (1)
5 Consider the following relations:
EMPLOYEE(E.NO,NAME,DATE_BORN , GENDER,DATE_OF_JOINING,
DESIGNATION,BASIC_PAY,DNO)
DEPARTMENT(D.NO ,D.NAME)
The Primary key is underlined.write SQL Queries to perform the following CO1.6 K3
1. Display the employee number , name , department no and department name
of all employees.
2. List the Details of employees who earns less than the average basic pay of all
employees.
3. List the department number and number of employees in each department
4. List the details of employees who work for DNO=’REVENUE’

(Reference :QP Code:52858- Anna university / April/may 2019)

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).

You might also like