InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Define query in the context of database. |
|
Answer» A query is an inquiry into the database using the SELECT statement. These statements give you filtered data according to your conditions and specifications indicating the fields, records, and summaries which a user wants to fetch from a database. |
|
| 2. |
Give one advantage of using primary key. |
|
Answer» A primary key uniquely identifies the record in the table. |
|
| 3. |
What is the significance of a primary key? |
|
Answer» A primary key cannot allow null values and must have a unique index. |
|
| 4. |
Which of the following is not the main building block of a database? (a) Lists (b) Queries (c) Reports (d) Forms |
|
Answer» (a) The main building blocks of database are tables, queries, forms and reports. |
|
| 5. |
Write the significance of a foreign key. |
|
Answer» A foreign key is used to Establish the relationship between any two tables of RDBMS. |
|
| 6. |
What is the default extension of OO.o not zero BASE database? |
|
Answer» The default extension of OO.o BASE database is .odb. |
|
| 7. |
What are the main purposes of a database system? |
|
Answer» • Storage of information. • Retrieval of information quickly. • Sorting, selecting data that satisfies certain criteria (filtering). • Produce the report in some standardized and readable format. |
|
| 8. |
Define RDBMS. |
|
Answer» RDBMS is a type of DataBase Management System that stores data in the form of relations (tables). Relational databases are powerful, so they require few assumptions about how data is related or how, it will be extracted from the database. |
|
| 9. |
Observe the following PARTICIPANTS and EVENTS table carefully and write the name of the RDBMS operation which will be used to produce the output as shown in RESULT? Also, find the Degree and Cardinality of the RESULT.PARTICIPANTSNO.Name1Aruanabha Tariban2John Fedricks3Kanti DesaiEVENTSEVENTCODEEVENTNAME1001ITQuiz1002Group DebateNo.NameEVENTCODEEVENTNAME1Aruanabha Tariban1001ITQuiz1Aruanabha Tariban1002Group Debate2John Fedricks1001ITQuiz2John Fedricks1002Group Debate3Kanti Desai1001ITQuiz3Kanti Desai1002Group Debate |
|
Answer» Cartesian Product Degree — 4 Cardinality = 6 |
|
| 10. |
Discuss the components of a database. |
|
Answer» A database consists of several components. Each component plays an important role in the database system environment. The major components of the database are as follows: Data It is raw numbers, characters or facts represented by value. Most of the organizations generate, store and process a large amount of data. The data acts as a bridge between the hardware and the software. Data may be of different types such as User data, Metadata and Application Metadata. Software It is a set of programs that lies between the stored data and the users of the database. It is used to control and manage the overall computerized database. It uses different types of software such as MySQL, Oracle etc. Hardware It is the physical aspect of the computer, telecommunication, and database, which consists of the secondary storage devices such as magnetic disks, optical discs etc., on which data is stored. Users It is the person, who needs information from the database to carry out its primary business responsibilities. The various types of users which can access the database system are as follows: Database Administrator (DBA) A person, who is responsible for managing or establishing policies for the maintenance and handling of the overall database management system is called DBA. Application Programmers The people, who write application programs in programming languages to interact and manipulate the database are called application programmers. End-user A person, who interacts with the database system to perform different operations on the database by inserting, deleting etc., through menus or forms. |
|
| 11. |
Identify the columns out of the given three, which should not be present in each of the following tables:(i) Table 1: StockItemNoDate of BirthItemquantity(ii) Table 2: BookAdmnoPriceAccessNo(iii) Table 3: FirmotireF_NoDesignCatPhonenumber |
|
Answer» (i) DateofBirth (ii) Admno (iii) Phonenumber |
|
| 12. |
Key field is a unique identifier for each record. It is defined in the form of (a) rows (b) columns (c) tree (d) query |
|
Answer» (b) Key is a data item that allows you to uniquely identify individual occurrences which is defined as the column or set of columns. |
|
| 13. |
………….. is a collection of related information. |
|
Answer» Database is a collection of related information. |
|
| 14. |
How are fields, record and a table related to each other? Explain with the help of an example. |
|||||||||
|
Answer» Fields are one type of information. A record contains logically related fields. A table Emp name contains logically related records.
Here EmpNo, Name, and Salary are three different fields. 1, Shridhar, 20000 represents one complete record. |
||||||||||
| 15. |
Which of the following best describes a form?(a) Form enables people to enter or view data in a database easily (b) Form summarizes and prints data (c) A form filters data from a database based on a criteria (d) All of the above |
|
Answer» (a) The form enables people to enter or view data in a database easily. |
|
| 16. |
All the information about a thing or a person is known as a (a) database (b) file (c) field (d) record |
|
Answer» (d) A record refers to a raw of data, which represents a complete set of information in a table. |
|
| 17. |
A table can have multiple primary keys. |
|
Answer» False If we create multiple primary keys in a table, the primary key will be unable to find the unique key value. |
|
| 18. |
A foreign key is a primary key in another table. |
|
Answer» True When a table’s primary key field is added to a related table in order to create the common field which relates two tables, it is called a foreign key in the related table. |
|
| 19. |
Name two possible primary keys for an Employee table. |
|
Answer» Possible primary keys for an Employee table are emp code, emp phone number. |
|
| 20. |
What is the utility of primary key in database? Write distinct features of primary keys. |
|
Answer» The primary key is used to uniquely identify the record in a database. It can be a column or a set of columns in the table. Main features of the primary key are as follows: 1. It must contain a unique value for each record of the table. 2. It does not contain null values. |
|
| 21. |
What is primary key? Give an example. |
|
Answer» A field which uniquely identifies each record in a table is known as the primary key. e.g. emp id is the primary key of the Employee table. |
|
| 22. |
A foreign key is a reference of the ………….. key in another table. |
|
Answer» A foreign key is a reference of the primary key in another table. |
|
| 23. |
The candidate key, which is not used as primary key is called ………….. key. |
|
Answer» The candidate key, which is not used as primary key is called alternate key. |
|
| 24. |
What is a primary key in database? Give an example. |
|
Answer» A field which uniquely identifies each record in a table is known as the primary key. e.g. emp id is the primary key of the Employee table. |
|
| 25. |
Explain the concept of candidate key with the help of an appropriate example. |
|||||||||||||||||||||||||
|
Answer» The candidate key is a column or set of columns that can help in identifying records uniquely. Example, consider a Table STUDENT.
Here, AdmnNo & Roll No define Table uniquely. Hence, they are candidate keys |
||||||||||||||||||||||||||
| 26. |
Give a suitable example of a table with sample data and illustrate Primary and Candidate keys in it. |
|||||||||||||||||||||
|
Answer» A table may have more than one such attribute or a group of an attribute that identifies a row/ tuple uniquely, all such attribute(s) are known as Candidate keys. Out of the Candidate keys, one is selected as Primary key. Table: Stock
Id = Primary key Id and Qty = Candidates Keys |
||||||||||||||||||||||
| 27. |
Observe the following table and answer the part (i) and (ii) accordingly.Table: MemberMnoNameQtyPurchase Date101Pen10212-12-2011102Pencil20121-0202012102Eraser9009-08-2010109Sharpener9031-08-2012113Clips90008-08-20111. In the above table, can we take Mno as Primary key ? (Answer as [Yes/No] only.) Justify your answer with a valid reason.2. What is the degree and the cardinality of the above table? |
|
Answer» 1. No 2. Degree = 4 Cardinality = 5 [Hint: Because Pencil and Eraser are having the same Mno = 2. Primary key needs to be unique] |
|
| 28. |
Observe the table ‘Club’ given below:CLUBMember_idMember_NameAddressAgeFeeM001SumitNew Delhi202000M002NishaGurgaon193500M003NiharikaNew Delhi212100M004SachinFaridabad1835001. What is the cardinality and degree of the given table?2. If a new column Contact_No has been added and three more members have joined the club then |
|
Answer» 1. Cardinality = 4 Degree = 5 2. Cardinality = 7 3. Degree = 6 |
|
| 29. |
Define degree and cardinality. Also, Based upon given table write degree and cardinality.PatientsPatNoPatNameDeptDocID1LeenaENT1002SupreethOrtho2003MadhuENT1004NehaENT1005DeepakOrtho200 |
|
Answer» Degree is the number of attributes or columns present in a table. Cardinality is the number of tuples or rows present in a table. Patients Degree = 4 Cardinality = 5 |
|
| 30. |
A set of related data item is called as ……………. |
|
Answer» A set of related data item is called as record. |
|
| 31. |
A table named School (containing data of students of the whole school) is created, where each record consists of several fields including Admission No (Admission Number), Roll No (Roll Number), Name. Which field out of these three should be set as the primary key and why? |
|
Answer» AdmissionNo should be set as the primary key because admission numbers are unique for each and every student of the school, which is not possible in the case with RollNo and Name. |
|
| 32. |
Consider the following database Student:StudentRoll No.First NameLast NameClassMarks Obtained(%)Scholarship Awarded1205MohanGarg12th99.9500001009DushyantSingh10th98.7450001101SwatiRana11th95.430000945RavindraSaini9th97.4350001015RitikaThakur10th98.6400001. The marks obtained by the student with RollNo. 1101 is?2. What is the name of the student, who has got the highest marks and what is the amount of scholarship awarded to him/her?3. How many records are there in the table?4. How many fields are there in the table? |
|
Answer» 1. 95.4 2. Mohan Garg and scholarship awarded is 50000. 3. 5 4. 6 |
|
| 33. |
Consider the following table:EmployeeEmpNoEmpNameDesignation1SahilA2AnupB3MansiA4PoojaB1. Which of the above field can be selected as a primary key?2. EmpName field also has unique values for all the records. Can it be made primary key? Give answer with reason. |
|
Answer» 1. EmpNo can be selected as a primary key. 2. EmpName is having unique values, but there is no guarantee that if more employees are included then there would not be multiple people with similar names. So, in future, its values may be duplicate. Thus, it cannot be made as a primary key. |
|
| 34. |
A table ‘student’ has 4 columns and 10 rows and ‘student 2’ has 5 columns and 5 rows. If we take cartesian product of these two tables, what is the degree and cardinality of the resultant table ? |
|
Answer» Degree = 4 x 5 = 20 [no. of columns] Cardinality = 10 x 5 = 50 [no. of rows] |
|
| 35. |
Write any two uses of database management system. |
|
Answer» 1. DBMS is used to store data at a centralized location. 2. It is used to minimize data redundancy and data inconsistency. |
|
| 36. |
Out of the following, which one is the most appropriate data field in context of employee table, if only one of these is required?(a) Age in years (b) Date of birth (c) Age in days (d) Age in months |
|
Answer» (b) Date of birth is the most appropriate data field in the context of the employee table. |
|
| 37. |
What are all the domain names possible in gender ? |
|
Answer» Male and Female |
|
| 38. |
………….. is the smallest part of a table in which one data item can be kept. |
|
Answer» Field is the smallest part of a table in which one data item can be kept. |
|
| 39. |
A table ‘customer’ has 10 columns but no row. Later, 10 new rows are inserted and 3 rows are deleted in the table. What is the degree and cardinality of the table customer. |
|
Answer» Degree = 10 [no. of cols] Cardinality = 10-3 = 7 [no. of rows] |
|
| 40. |
Which of the following is not an example of database?(a) Cross knot game(b) Employee payroll management (c) Numeric calculator (d) Customer management system |
|
Answer» (c) Numeric calculator because it is used to calculate the numeric numbers only as it is unable to store data. |
|
| 41. |
Operations performed on a database are controlled by (a) user (b) hardware (c) DBMS (d) RDBMS |
|
Answer» (a) Users are those persons, who need the information from the database to perform operations. |
|
| 42. |
A field in a table is also called as ………………… . |
|
Answer» A field in a table is also called as column. |
|
| 43. |
Define domain with respect to database. Give an example. |
|||||||||||||||||||||||||||||||||
|
Answer» A domain is a pool of values from which the actual values appearing in a given column are drawn. For example, The values appearing in the Supp# column of both the suppliers' table and the Shipment table are drawn from the same domain. Shipment
Supplier
|
||||||||||||||||||||||||||||||||||
| 44. |
A table ‘student’ has 3 columns and 10 rows and another table ‘student 2’ has the same columns as student but 15 rows. 5 rows are common in both the tables. If we take union, what is the degree and cardinality of the resultant table ? |
|
Answer» Degree = 3 Cardinality = 30 (20 + 15 – 5) |
|
| 45. |
Computer based record keeping system is known as (a) Data Manipulation System (b) Computerized Data System (c) Computerized Record keeping system (d) DBMS |
|
Answer» (d) DBMS is a collection of programs that enable the user to create and maintain the database. Also, it is a computer-based record keeping system. |
|
| 46. |
Database is a combination of (a) hardware and software (b) hardware and operating system (c) software and operating system (d) utility programs |
|
Answer» (a) A database consists of several components. These are data, software, hardware, and user. |
|
| 47. |
Define the term DBMS. |
|
Answer» The full form of DBMS is a Database Management System. It is a computer based record keeping system. |
|
| 48. |
What is field in database? Give an example. |
|
Answer» A field is an area, reserved for a specific piece of data. It is also known as an attribute, e.g. Customer_Name. |
|
| 49. |
Expand the following:1. SQL2. DBMS |
|
Answer» 1. SQL – Structured Query Language. 2. DBMS – Data Base Management System. |
|
| 50. |
State the primary goal of a DBMS. |
|
Answer» To provide a convenient and efficient environment in which we can store and retrieve information. |
|