1 Crore+ students have signed up on EduRev. Have you? 
Many students can be enrolled in one or more courses and one course may have one or more students hence relation is many to many.
A foreign key is a key of a relation which is primary key of some other relation. A primary key is combined with foreign key then are ferential constraint is set up between the two relation, hence it creates a parentchild relationship between the tables that connects them.
It is desired to design an objectoriented employee record system for a company. Each employee has a name, unique id and salary. Employees belong to different categories and their salary is determined by their category. The functions get Name, get ld and compute Salary are required. Given the class hierarchy below, possible locations for these functions are:
1. getld is implemented in the superclass.
2. getId is implemented in the subclass.
3. getName is an abstract function in the superclass.
4. getName is implemented in the superclass.
5. getName is implemented in the subclass:
6. getSalary is an abstract function in the superclass.
7. getSalary is implemented in the superclass.
8. getSalary is implemented in the subclass
Choose the best design
Each employee has a unique id, name and salary, Employees may have different salary as per their category e.g. Manager, Engineer or Secretary.
Id is unique for each employee for a given employee with Id name is unique.
Hence, get Id and get name must be implemented in Superclass as whatever their designation it will not change. Get salary must be an abstract function in superclass and implemented in subclasses.
Let E_{1} and E_{2} be two in an E/R diagram with simple singlevalued attributes R_{1}, and R_{2} are two relationship between E_{1}, and E_{2}, where R_{1}, is oneto many and R_{2} is manytomany. R_{1}, and R_{2} do not have any attributes of their own. What is the minimum number of tables required to represent this situation in the relational model?
The given Relations R_{1} and R_{2} can be drawn as:
For relations R_{1}, and R_{2}, 3 tables are required as circled above.
Consider the following ER diagram:
The minimum number of table needed to represent M, N, P, R_{1}, R_{2} is.
Minimum number of tables needed is 2 as
1^{st} table have the relation between M and Pand 2^{nd} table as P and N.
Consider the following ER diagram:
Which of the following is a correct attribute set for one of the tables for the correct answer to the above question?
The tables needed for the given ERdiagram are
which is covering aIl the attributes.
Consider the following entity relationship diagram (ERD), where two entities E1 and E2 have a relation R of cardinality 1 : m.
The attributes of E1 are A11, A12 and A13where , A11 is key attribute. The attributes of E2 are A21, A22, and A23 where A21 is the key attribute and A23 is a multivalued attribute. Relation R does not have any attribute. A relational database containing minimum number of tables with each table satisfying the requirements of the third normal form (3NF) is designed from the above ERD. The number of tables in the database is
Since each table is to in 3^{rd} normal form for each multivalued attribute individual table is to be created. Hence, total number of tables in the database is 3.
1 for entity set E_{1}, 2 for entity set E_{2} and 3 for attributes A_{23}.
Consider the relation Student (name, sex, marks), where the primary key is shown underlined, pertaining to students in a class that has at least ( One boy and one girl. What does the following relational algebra expression produce? [Note: p is the rename, operator]
The given expression can be understood as:
gives the name of female students who have less marks than other boys.
(ii) The expression (student)) gives the name of all the female student from (i) and
(iii) The given expression finally calculates the names of female student who have marks more than all the boys in the class.
61 videos7 docs102 tests

Use Code STAYHOME200 and get INR 200 additional OFF

Use Coupon Code 
61 videos7 docs102 tests









