Friday, January 26, 2018

Question From Database Kerala PSC Computer Science

1.A function that has no partial functional dependencies is in ------------------ form

 Ans : 2nd  normal Form

First Normal Form –singled valued attribute.

That means it allows only one value in an attribute 
For eg : phone number of a patient. He/she may have 2 phone numbers one is Jio number and other is BSNL . so we will store it as multiple records .

A relation is in 2NF if it has No Partial Dependency

Explanation: 2 NF should satisfy 1 st normal form . 
and there it should not satisfy partial dependency 

2. Minimal super key is Candidate key
  {Repeated Question Kerala PSC}

3. A relation schema R is in ------------, if whenever a nontrivial functional dependency X->A holds in R, Then  X is a super key of R
Ans  BCNF
{Repeated Question Kerala PSC}
https://www.geeksforgeeks.org/database-normalization-normal-forms/

4. Which of the following is true for Atomicity ?
A: Smallest unit of transaction
B:Either all of its operations are executed or none
C:Atleast one of the operations should be executed
D:None of the above
Answer is B:Either all of its operations are executed or none
 (Kerala PSC System analyst post 2019)
Explanation : To maintain consistency in transaction DBMS Follows ACID properties.
in Acid property first one is Atomicity it means ALL or Nothing Rule . 
For Eg: Bank Transaction
5. The Sql aggregate function that returns no of values in a given column is
(Question asked for Kerala PSC System Analyst Post 2019)
A.Count()
B.count(*)
C.Sum()
D.All of the above
Ans is :Option A :Count()
explanation : if want to fetch the repeated visit of a patient we can query
SELECT count(hospitalno),hospitalno FROM table name  group by hospitalno;
Result will be:
Count and patient id
12009485
22009668
22010131
12011869
32011912
6. Consider a relation A with m rows and relation B with n rows. How many rows will be generated if AXB is performed?
A.m
B.m+n
C.m-n
D.m*n
Ans is m*n
Explanation
7. The command used to add a column in table
  Question from Instructor VHSE 2015
A. Add
B. Update
C. Alter
D. Add
Ans : Alter
Explanation: Alter is Data Definition Language (DDL)
8.In SQL, which command is used to make permenant change in database
Question from Instructor VHSE 2015
A. Save
B. Exit
C. Done
D. Commit
Ans: D, Commit
9. What is tuple in dbms?
Question from Instructor VHSE 2015
A. Number of tables
B. Number of rows
C. Number of columns
D. Number of database
Ans: B. Number of rows
Explanation : Tuple is record
10.Foreign key is
Question from Instructor VHSE 2015
A. Primary key of another table
B. Primary key of the same table
C. Any column other than primary key of another table
D. Any column other than primary key of same table
Ans: A. Primary key of another table
























No comments:

Post a Comment