[Say – 2017]<\/span>
\na) Tuple
\nb) Attribute
\nc) Domain
\nd) Schema (1)
\nAnswer:
\nd) Schema<\/p>\nPlus Two Computer Science Chapter Wise Assess Questions and Answers<\/h3>\n
Question 1.
\nWho is responsible for managing and controlling the activities associated with the database? (1 Mark)
\na) Database administrator
\nb) Programmer
\nc) Native user
\nd) End user
\nAnswer:
\na) Database administrator<\/p>\n
Question 2.
\nIn the relational model, cardinality is the _______ . (1 Mark)
\na) numberoftuples
\nb) number of attributes
\nc) number of tables
\nd) number of constraints
\nAnswer:
\na) numberoftuples<\/p>\n
Question 3.
\nCartesian product in relational algebra is _______ . (1 Mark)
\na) a Unary operator
\nb) a Binary operator
\nc) a Ternary operator
\nd) not defined
\nAnswer:
\nb) a Binary operator<\/p>\n
Question 4.
\nAbstraction of the database can be viewed as _________ . (1 Mark)
\na) two levels
\nb) four levels
\nc) three levels
\nd) one level
\nAnswer:
\nc) three level<\/p>\n
Question 5.
\nIn a relational model, relations are termed as __________ . (1 Mark)
\na) tuples
\nb) attributes
\nc) tables
\nd) rows
\nAnswer:
\nc) tables<\/p>\n
Question 6.
\nIn the abstraction of a database system the external level is the ___________ . (1 Mark)
\na) physical level
\nb) logical level
\nc) conceptual level
\nd) view level
\nAnswer:
\nd) view level<\/p>\n
Question 7 (1 Mark)
\nRelated fields in a database are grouped to form a ___________ .
\na) data file
\nb) data record
\nc) menu
\nd) bank
\nAnswer:
\nb) data record<\/p>\n
Question 8.
\nA relational database developer refers to a record as ___________ . (1 Mark)
\na) criteria
\nb) relation
\nc) tuple
\nd) attribute
\nAnswer:
\nc) tuple<\/p>\n
Question 9.
\nAn advantage of the database management approach is ___________ . (1 Mark)
\na) data is dependent on programs
\nb) data redundancy increases
\nc) data is integrated and can be accessed by multiple programs
\nd) none of the above
\nAnswer:
\nc) data is integrated and can be accessed by multiple programs<\/p>\n
Question 10.
\nData independence means (1 Mark)
\na) data is defined separately and not included in programs
\nb) programs are not dependent on the physical at-tributes of data
\nc) programs are not dependent on the logical at-tributes of data
\nd) both (b) and (c)
\nAnswer:
\nd) both (b) and (c)<\/p>\n
Question 11.
\nKey to represent relationship between tables is called ___________ . (1 Mark)
\na) primary key
\nb) candidate Key
\nc) foreign Key
\nd) alternate Key
\nAnswer:
\nc) foreign key<\/p>\n
Question 12.
\nWhich of the folowing operations is used if we are interested only in certain columns of a table? ___________ . (1 Mark)
\na) Projection
\nb) Selection
\nc) Union
\nd) Select
\nAnswer:
\na) Projection<\/p>\n
Question 13.
\nWhich of the following operations need the partici-pating relations to be union compatible? ___________ . (1 Mark)
\na) UNION
\nb) INTERSECTION
\nc) SET DIFFERENCE
\nd) All of the above
\nAnswer:
\nd) All of the above<\/p>\n
Question 14.
\nWhich database level is closest to the users? ___________ . (1 Mark)
\na) External
\nb) Internal
\nc) Physical
\nd) Conceptual
\nAnswer:
\na) View level (External)<\/p>\n
Question 15.
\nThe result of the UNION operation between R1 and R2 is a relation that includes ___________ . (1 Mark)
\na) all the tuples of R1
\nb) all the tuples of R2
\nc) all the tuples of R1 andR2
\nd) all the tuples of R1 and R2 which have common columns
\nAnswer:
\n(d) All the tuples of R1 and R2 (eliminating the duplication)<\/p>\n
Question 16.
\nA file manipulation command that extracts some of the records from a file is called ___________ . (1 Mark)
\na) Select
\nb) Project
\nc) Join
\nd) Product
\nAnswer:
\na) select<\/p>\n
Question 17.
\nAn instance of relational schema R (A, B, C) has distinct values of A including NULL values. Which one of the following is true? ___________ . (1 Mark)
\na) A is a candidate key
\nb) A is not a candidate key
\nc) A is a primary key
\nd) Both (a) and (c)
\nAnswer:
\na) A is a candidate key<\/p>\n
Question 18.
\nHow many distinct tuples are there in relation instance with cardinality 22? ___________ . (1 Mark)
\na) 22
\nb) 11
\nc) 1
\nd) none
\nAnswer:
\na) 22<\/p>\n
Question 19.
\nA set of possible data values is called ___________ . (1 Mark)
\na) Attribute
\nb) Degree
\nc) Tuple
\nd) Domain
\nAnswer:
\nd) Domain<\/p>\n
Question 20.
\nWhy should you choose a database system instead of simply storing data in conventional files? (5 Mark)
\nAnswer:
\nAdvantages of DBMS over conventional files Data Redundancy – It means duplication of data. DBMS eliminates redundancy. DBMS does not store more than one copy of the same data. Inconsistency can be avoided – If redundancy occurs there is & chance to inconsistency. If redundancy is removed then inconsistency cannot occur.<\/p>\n
Efficient data access -: It stored huge amount of data efficiently and can be retrieved whenever a need arise.<\/p>\n
Data can be shared – The data stored in the database can be shared by the users or programs. Standards can be enforced – The data in the database follows some standards. Eg: a field \u2018Name\u2019 should have 40 characters long. Some standards are ANSI, ISO, etc.<\/p>\n
Security restrictions can be applied – The data is of great value so it must be kept secure and private. Data security means the protection of data against accidental of intentional disclosure or unauthorized destruction or modification by unauthorized person.<\/p>\n
Integrity can be maintained – It ensures that the data is to be entered in the database is correct.<\/p>\n
Crash recovery- Some times all ora portion of the data is lost when a system crashes. A good DBMS he’psto recover data after the system crashed.<\/p>\n
Question 21.
\nExplain the different levels of data abstraction in DBMS? (3 Mark)
\nAnswer:
\nLevels of Database Abstraction –
\n1) Physical Level (Lowest Level) – It describes how the data is actually stored in the storage medium.
\n2) Logical Level (Next Higher Level) – It describes what data are stored in the database.
\n3) View Level (Highest level) – It is closest to the users. It is concerned with the way in which the individual users view the data.<\/p>\n
Question 22.
\nHow are schema layers related to the concepts of logical and physical data independence? (3 Mark)
\nAnswer:
\nData Independence – It is the ability to modify the scheme definition in one level without affecting the scheme definition at the next higher level.
\na) Physical Data independence – If is the ability to modify the physical scheme without causing application programs to be rewritten.
\nb) Logical Data Independence – It is the ability to modify the logical scheme without causing application programs to be rewritten.<\/p>\n
Question 23.
\nConsider the instance of the EMPLOYEE relation shown in the following table. Identify the attributes, degree, cardinality and domain of Name and Emp_code. (3 Mark)<\/p>\n
\n\n\nEmpCode<\/td>\n | Name<\/td>\n | Department<\/td>\n | Designation<\/td>\n | Salary<\/td>\n<\/tr>\n |
\n1000<\/td>\n | Sudheesh<\/td>\n | Purchase<\/td>\n | Manager<\/td>\n | 25000<\/td>\n<\/tr>\n |
\n1001<\/td>\n | Dhanya<\/td>\n | Sales<\/td>\n | Manager<\/td>\n | 25000<\/td>\n<\/tr>\n |
\n1002<\/td>\n | Fathima<\/td>\n | Marketing<\/td>\n | Clerk<\/td>\n | 12000<\/td>\n<\/tr>\n |
\n1003<\/td>\n | Shajan<\/td>\n | Sales<\/td>\n | Clerk<\/td>\n | 13000<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n Answer: \nAttributes- These are column names, i.e, Emp_Code, Name, Department, Designation and Salary Degree(CD) -the number of Columns is the Degree \ni. e Degree is 5(Here 5 columns) \nCardinality (RC)-: the number of Rows is the Cardinality \ni. e. Cardinality is 4(Here 4 rows) \nDomain is the pool of possible values \nDomain of Name is a String(Sudheesh, Dhanya, \nFathima, Shajan.etc) \nDomain of Emp_Code is a number (1000,1001,1002, 1003, etc)<\/p>\n Question 24. \nIdentify primary key, candidate keys and alternate keys in the instance of EMPLOYEE relation in Question 23. (3 Mark) \nAnswer: \nCandidate key – It is used to uniquely identify the row. \nEmp_code and Emp_Code + Department (Composite) are the candidate keys \nPrimary key – It is a set of one or more attributes used to uniquely identify a row. \nEmpjcode is the primary key \nAlternate key – A candidate key other than the primary key. \nWe set Emp_code as the primary key then Emp_code+ Department is the alternate key<\/p>\n Question 25. \nConsider the instance of the STUDENT relation shown in the following table Assume Reg_no as the primary key. (3 Mark) \na) Identify the candidate keys and alternate keys in the STUDENT relation \nb) How are the primary key and the candidate key-related?<\/p>\n \n\n\nReg_no<\/td>\n | Name<\/td>\n | Batch<\/td>\n | Result<\/td>\n | Marks<\/td>\n<\/tr>\n | \n101<\/td>\n | Sachin<\/td>\n | Science<\/td>\n | Pass<\/td>\n | 480<\/td>\n<\/tr>\n | \n103 –<\/td>\n | Fathima<\/td>\n | Humanities<\/td>\n | Fall<\/td>\n | 200<\/td>\n<\/tr>\n | \n106<\/td>\n | Joseph<\/td>\n | Commerce<\/td>\n | Pass<\/td>\n | 360<\/td>\n<\/tr>\n | \n108<\/td>\n | Bincy<\/td>\n | Science<\/td>\n | Pass<\/td>\n | 300<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n Answer: \na) Reg_no and Reg_no+Batch are the candidate keys. We set Reg_no as the primary key hence Reg_no+Batch is the alternate key \nb) Candidate Key :lt is a set of attributes that uniquely identifies a row. There may be more than candidate key and may be a combination of more than one attribute.<\/p>\n Primary Key: A primary key is one of the Candidate Keys. It is a set of one or more attributes that can uniquely identify tuples in a relation.<\/p>\n Question 26. \nWhat is a database? Describe the advantages and disadvantages of using DBMS. (5 Mark) \nAnswer: \nA Database is a collection of large volume of data.<\/p>\n Advantages of DBMS \nData Redundancy – It means duplication of data. DBMS eliminates redundancy. DBMS does not store more than one copy of the same data. \nInconsistency can be avoided – If redundancy occurs there is a chance to inconsistency. If redundancy is removed then inconsistency cannot occur. Efficient data access It stored huge amount of data efficiently and can be retrieved whenever a need arise.<\/p>\n Data can be shared – The data stored in the database can be shared by the users or programs.<\/p>\n Standards can be enforced – The data in the database follows some standards. Eg: a field \u2018Name\u2019 should have 40 characters long. Some standards are ANSI, ISO, etc.<\/p>\n Security restrictions can be applied – The data is of great value so it must be kept secure and private. Data security means the protection of data against accidental or intentional disclosure or unauthorized destruction or modification by unauthorized person.<\/p>\n Integrity can be maintained – It ensures that the data is to be entered in the database is correct.<\/p>\n Crash recovery- Sometimes all ora portion of the data is lost when a system crashes . A good DBMS helps to recover data after the system crashed.<\/p>\n Question 27. \nWhat is data independence? Explain the difference between physical and logical data independence. (3 Mark) \nAnswer: \nData Independence – It is the ability to modify the scheme definition in one level without affecting the scheme definition at the next higher level. \na) Physical Data Independence – It is the ability to modify the physical scheme without causing application programs to be rewritten. \nb) Logical Data Independence – It is the ability to modify the logical scheme without causing application programs to be rewritten.<\/p>\n Question 28 (3 Mark) \nEnforcement of standard is an essential feature of DBMS. How are these standards applicable in a da-tabase? \nAnswer: \nThere is a standard BIS (Bureau of Indian Standards) in the field of Gold and ISBN (International Standard Book Number) in the field of publication. Similarly here is also some standards like ANSI(American National Standards Institute), ISO (International Organization for standardization), etc.. For example a filed \u201cName\u201d should have 40 characters is a standard.<\/p>\n Question 29. \nCardinality of a table T1 is 10 and of table T2 is 8 and the two relations are union compatible. If the cardi-nality of result T1 \u222a T2 is 13, then what is the cardi-nality of T1 \u2229 T2? Justify your answer. (3 Mark) \nAnswer: \nCardinalty of table T1 is 10 means it has 10 rows Cardinalty of table T2 is 8 means it has 8 rows Normally T1 \u222a T2 is 10+8 = 18 But Here T1 \u222a T2 is 13 means after eliminating duplication of 5 rows this happened.<\/p>\n This means 5 rows are common. That is T1 \u2229 T2 is 5<\/p>\n Question 30. \nCardinalityofatableTI is10andoftableT2is8and the two relations are union compatible. (3 Mark) \na) What will be the maximum possible cardinality of T1 \u222a T2? \nb) What will be the minimum possible cardinality of T1 \u2229 T2? \nAnswer: \na) Degree(CD) -the number of Columns is the Degree Cardinality (RC)-: the number of Rows is the Cardinality T1 \u222a T2 = Sum of cardinalities of Table 1 and Table 2 \ni. e.T1 \u222a T2 = 10 + 8 = 18<\/p>\n b) T1 \u2229 T2 is the common rows(tuples) in T1 and T2 If there is no common tuples then T1 \u2229 T2 is 0 hence the cardinality is 0.<\/p>\n Question 31. \nConside the relations, City (city_name, state) and Hotel (name, address, city_name). Answer the following queries in relational algebra (5 Mark) \na) Find the names and address of hotels in Kochi. \nb) List the details of cities in Kerala state. \nc) List the names of the hotels in Thrissur. \nd) Find the names of different hotels. \ne) Find the names of hotels in Kozhikode or Munnar. \nAnswer: \n<\/p>\n Question 32. \nUsing the instance of the EMPLOYEE relation shown in question 23, write the result of the following relational algebra expressions. (5 Mark) \n \nAnswer: \na)<\/p>\n \n\n\nEmp_Code<\/td>\n | Name Department<\/td>\n | Designation : Salary<\/td>\n<\/tr>\n | \n1001<\/td>\n | Dhanya Sales<\/td>\n | Manager : 25000<\/td>\n<\/tr>\n | \n1003<\/td>\n | Shajan Sales<\/td>\n | Clerk : 113000<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n b)<\/p>\n \n\n\nEmp_Code<\/td>\n | Name<\/td>\n | Department<\/td>\n | Designation<\/td>\n | Salary<\/td>\n<\/tr>\n | \n1001<\/td>\n | Dhanya<\/td>\n | Sales<\/td>\n | Manager<\/td>\n | 25000<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n c)<\/p>\n \n\n\nEmp Code<\/td>\n | Name<\/td>\n | Department<\/td>\n | Designation<\/td>\n | Salary<\/td>\n<\/tr>\n | \n1000<\/td>\n | Sudheesh<\/td>\n | Purchase<\/td>\n | Manager<\/td>\n | 25000<\/td>\n<\/tr>\n | \n1001<\/td>\n | Dhanya<\/td>\n | Sales<\/td>\n | Manager<\/td>\n | 25000<\/td>\n<\/tr>\n | \n1003<\/td>\n | Shajan<\/td>\n | Sales<\/td>\n | Clerk<\/td>\n | 13000<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n d)<\/p>\n \n\n\nName<\/td>\n | Salary<\/td>\n<\/tr>\n | \nSudheesh<\/td>\n | 25000<\/td>\n<\/tr>\n | \nDhanya<\/td>\n | 25000<\/td>\n<\/tr>\n | \nFathima<\/td>\n | 12000<\/td>\n<\/tr>\n | \nShajan<\/td>\n | 13000<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n e)<\/p>\n \n\n\nName<\/td>\n | Salary<\/td>\n<\/tr>\n | \nSudheesh<\/td>\n | 25000<\/td>\n<\/tr>\n | \nDhanya<\/td>\n | 25000<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n f) No rows selected<\/p>\n Question 33. \nConsider the instance of the BORROWER and DE- POSlTOR relations shown in following figure which stores the details of customers in a Bank. Answer the following queries in relational algebra. (5 Mark) \na) Display the details of the customers who are either a depositor or a borrower. \nb) Display the name of customers who are both a depositor and a borrower. \nc) Display the details of the customers who are d positors but not borrowers. \nd) Display the name and’amount of customer who is a borrower but not depositor.<\/p>\n \n\n\nBorrower<\/td>\n | Depositor<\/td>\n<\/tr>\n | \nAcc_No<\/td>\n | Name<\/td>\n | Amount<\/td>\n | Acc_No<\/td>\n | Name<\/td>\n | Amount<\/td>\n<\/tr>\n | \nAC123<\/td>\n | juwee<\/td>\n | 50000<\/td>\n | AC123<\/td>\n | juwee<\/td>\n | 500<\/td>\n<\/tr>\n | \nAC103<\/td>\n | Rasheeda<\/td>\n | 25000.<\/td>\n | AC105<\/td>\n | Shabana<\/td>\n | 25000<\/td>\n<\/tr>\n | \nAC106<\/td>\n | Vishnu<\/td>\n | 25000<\/td>\n | AC116<\/td>\n | Vishnu<\/td>\n | 125000<\/td>\n<\/tr>\n | \nAC108<\/td>\n | Aiswarya<\/td>\n | 30000<\/td>\n | AC108<\/td>\n | Aiswarya<\/td>\n | 3000<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n Answer: \na)<\/p>\n \n\n\nAcc_No<\/td>\n | Name<\/td>\n<\/tr>\n | \nAC 123<\/td>\n | Albin<\/td>\n<\/tr>\n | \nAC 105<\/td>\n | Shabana<\/td>\n<\/tr>\n | \nAC116<\/td>\n | Vishnu<\/td>\n<\/tr>\n | \nAC108<\/td>\n | Aiswarya<\/td>\n<\/tr>\n | \nAC103<\/td>\n | Rasheeda<\/td>\n<\/tr>\n | \nAC 106<\/td>\n | Vishnu<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n b)<\/p>\n \n\n\nAcc_No<\/td>\n | Name<\/td>\n<\/tr>\n | \nAC123<\/td>\n | Albin<\/td>\n<\/tr>\n | \nAC108<\/td>\n | Aiswarya<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n c)<\/p>\n \n\n\nAcc_No<\/td>\n | Name<\/td>\n<\/tr>\n | \nAC105<\/td>\n | Shabana<\/td>\n<\/tr>\n | \nAC116<\/td>\n | Vishnu<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n d)<\/p>\n \n\n\nName<\/td>\n | Amount<\/td>\n<\/tr>\n | \nRasheeda<\/td>\n | 25000<\/td>\n<\/tr>\n | \nVishnu<\/td>\n | 25000<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n Question 34. \nConsider the instance of the CUSTOMER and BRANCH relations shown in the following table. Write the Cartesian Product of the two relations. (3 Mark)<\/p>\n \n\n\nCUSTOMER<\/td>\n<\/tr>\n | \nAcc_No<\/td>\n | Name<\/td>\n | BranchJD<\/td>\n | Amount<\/td>\n<\/tr>\n | \nAC123<\/td>\n | Albin<\/td>\n | B1001<\/td>\n | 50000<\/td>\n<\/tr>\n | \nAC103<\/td>\n | Rasheeda<\/td>\n | B1001<\/td>\n | 25000<\/td>\n<\/tr>\n | \nAC106<\/td>\n | Vishnu<\/td>\n | B1001<\/td>\n | 25000<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\n\n\nBRANCH<\/td>\n<\/tr>\n | \nBranchJD<\/td>\n | Name<\/td>\n<\/tr>\n | \nB1001<\/td>\n | Kochi<\/td>\n<\/tr>\n | \nB1002<\/td>\n | Guruvayur<\/td>\n<\/tr>\n | \nB10TT<\/td>\n | Iduki<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n Answer:<\/p>\n \n\n\nCUSTOMER X BRANCH<\/td>\n<\/tr>\n | \nAcc No<\/td>\n | Name<\/td>\n | Branch ID<\/td>\n | Amount<\/td>\n | Branch ID<\/td>\n | Name<\/td>\n<\/tr>\n | \nAC123<\/td>\n | Albin<\/td>\n | B1001<\/td>\n | 50000<\/td>\n | B1001<\/td>\n | Kochi<\/td>\n<\/tr>\n | \nAC 123<\/td>\n | Albin<\/td>\n | B1001<\/td>\n | 50000<\/td>\n | B1002<\/td>\n | Guruvayur<\/td>\n<\/tr>\n | \nAC123<\/td>\n | Albin<\/td>\n | B1001<\/td>\n | 50000<\/td>\n | B1077<\/td>\n | Idukki<\/td>\n<\/tr>\n | \nAC103<\/td>\n | Rasheeda<\/td>\n | B1001<\/td>\n | 25000<\/td>\n | B1001<\/td>\n | Kochi<\/td>\n<\/tr>\n | \nAC103<\/td>\n | Rasheeda<\/td>\n | B1001<\/td>\n | 25000<\/td>\n | B1002<\/td>\n | Guruvayur<\/td>\n<\/tr>\n | \nAC 103<\/td>\n | Rasheeda<\/td>\n | B1001<\/td>\n | 25000<\/td>\n | B1077<\/td>\n | Idukki<\/td>\n<\/tr>\n | \nAC 106<\/td>\n | Vishnu<\/td>\n | B1001<\/td>\n | 25000<\/td>\n | B1001<\/td>\n | Kochi<\/td>\n<\/tr>\n | \nAC106<\/td>\n | Vishnu<\/td>\n | B1001<\/td>\n | 25000<\/td>\n | B1002<\/td>\n | Guruvayur<\/td>\n<\/tr>\n | \nAC106<\/td>\n | Vishnu<\/td>\n | B1001<\/td>\n | 25000<\/td>\n | B1077<\/td>\n | Idukki<\/td>\n<\/tr>\n | \nAC 108<\/td>\n | Aiswarya<\/td>\n | B1077<\/td>\n | 30000<\/td>\n | B1001<\/td>\n | Kochi<\/td>\n<\/tr>\n | \nAC108<\/td>\n | Aiswarya<\/td>\n | B1077<\/td>\n | 30000<\/td>\n | B1002<\/td>\n | Guruvayur<\/td>\n<\/tr>\n | \nAC108<\/td>\n | Aiswarya<\/td>\n | B1077<\/td>\n | 30000<\/td>\n | B1077<\/td>\n | Idukki<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n | | | | | | | | | | | | | | |