Q3. Given a relation R( P, Q, R, S, T, U, V, W, X, Y) and Functional Dependency set FD = { PQ → R, PS → VW, QS → TU, P → X, W → Y }, determine whether the given R is in 2NF?Describe anomalies of database.(10marks)
Q2.
EMP_ID
FIRST_NAME
LAST_NAME
SALARY
DEPARTMENT
0011
Preeti
Raheja
100000
HR
0023
Geetika
Jindal
80000
Admin
0032
Suresh
Sai
300000
HR
0044
Yash
Bhatia
500000
Admin
0056
Kumar
Gautam
500000
Admin
0067
Kiran
SaiTeja
200000
Account
0073
Raj
Goyal
75000
Account
0089
Priya
Jindal
90000
Admin
Create the given database with the condition that EMP_ID and FIRST_NAME will be the primary key of table and all unique values in LAST_NAME (3 Marks)
Perform the following queries on created database.
1. SQL query to fetch Last name of employees whose department is Account and salary is more than 80000. (2 Mark)
2. Write an SQL query to fetch “FIRST_NAME” from the table in upper case. (1 Mark)
3. SQL query to extract the average salary given to the employees. (1 Mark)
4. Change the department of KUMAR from Admin to Account. (1 Mark)
5. Delete the FIRST_NAME column from the database. (2 Marks).
Q1. (a) What is Serializability?Explain different types of Serializability.
(b) Check the given schedule for conflict serializability:
S1: R1(X) R1(Y) R2(X) R2(Y) W2(Y) W1(X)
All the steps for checking the serializability should be written properly and diagram should be drawn well if any
Create a class “StudentName” with a main function. Take a variable of integer data type from user and store its value into variable name “rollno”. Print the name of specific student using switch statements.
Hint: Use 4 different cases and one default. The value of cases should be
Case 10
Case 11
Case 12
Case 13
Create a class “StudentName” with a main function. Take a variable of integer data type from user and store its value into variable name “rollno”. Print the name of specific student using switch statements.
Hint: Use 4 different cases and one default. The value of cases should be
Case 10
Case 11
Case 12
Case 13
Write a C++ program that takes elements in an array from user. You have to make a function named positive(int) and find total count of positive numbers in an array.
(b) What will be the output for the following program C code?
#include<stdio.h>
int main()
{
int x=15, b;
float c;
b=x/2;
c=x/4;
x=x%2;
printf(“ %d %d %f ”, x, b, c);
return 0;
}
) Computing the performance of your student class. a) Receive an integer number from user that represents the number of students that he/she has. b) Receive the grades of each student and append them to list call it grades. c) Display for him/her the maximum, minimum, and average grade. d) Display for him/her how many students have the grade between 8-10, 5-7, and below 5
What advice would you give to your friends to enable them avoid or reduce suffering from radiation risks as they use computers?
Type the statements below into your Python interpreter. For each statement, copy the output into your Discussion Assignment and explain the output. Compare it with any similar examples in the textbook, and describe what it means about your version of Python.
>>> print 'Hello, World!'
>>> 1/2
>>> type(1/2)
>>> print(01)
>>> 1/(2/3)