16. Match the following with respect to RDBMS :

- Option : B
- Explanation :

Codd's rule says that entity integrity must be maintained so that no duplicate record exist in DB. In RDBMS table column entry must be valid, It also comes under codd's rule. Referential data items strictly follows integrity on insertion, deletion and modification of table and user defined integrity constraints enlist some specific business rule, these rule don't fall into entity or domain.

So, option (B) is correct.

You must be logged in to post a comment.

- Option : D
- Explanation :

Functional dependency is a constraint that describes the relationship between attributes in a relation. Data integrity refers to the accuracy and consistency of data stored in a database, data warehouse, data mart or other construct. Referential integrity is a relational database concept, which states that table relationships must always be consistent. Normalization is a process of organizing the data in database to avoid data redundancy, insertion anomaly, update anomaly & deletion anomaly. 1NF, 2NF, 3NF and BCNF are types of normal forms.

So, option (D) is correct.

You must be logged in to post a comment.

You must be logged in to post a comment.

- Option : C
- Explanation :

Binary heaps can be represented using arrays: storing elements in an array and using their relative positions within the array to represent child-parent relationships.

For the binary heap element stored at index i of the array,

Parent Node will be at index: floor(i/2)

Left Child will be at index: 2i

Right child will be at index: 2*i + 1

You must be logged in to post a comment.

You must be logged in to post a comment.

- Option : A
- Explanation :

We have 10, 1, 3, 5, 15, 12, 16 keys and we have to insert these keys into a binary search tree (BST):

Step-1. Insert 10 into the BST.

Step-2. Compare 1 with 10 it is less than 10 So it will be left child for 10.

Step-3. Now compare next key ie 3 to 10, it is less than 10,it will be in left sub tree of 10. Now compare 3 with next node ie 1, 3 is greater than 1 so it will be right child to node 1.

Step-4. Next key is 5 follow the same procedure as in previous step. 5 will be right child for node 3.

Step-5. Key 15 will be compared to parent node first and it is greater than 10 so it will be right child to node 10.

Step-6. Key 12 will be compared to parent node first it is greater so next comparison will be to the right child of parent node ie 15,now 12 is less than 15 so 12 will be left child node 15.

Step-7. Now the last key 16 will be compared to parent node first, it is greater than 10 so comparision will be shifted to right child of 10 ie 15 and key 16 is greater than 15 also so 16 will be right child to node 15.

Here is the constructed BST:

This tree has 4 level and height of tree is level - 1 So height of this tree will be 4-1 = 3.

So, option (A) is correct.

You must be logged in to post a comment.

You must be logged in to post a comment.

You must be logged in to post a comment.