1 1 vote Attributes of TEACHER are as (t_no,name) TEACHES are as (sub_id,sub_name) and COURSES are as (c_no,duration) Give answer as minimum number of table required for cardinality ratios 1:m & m:1 & 1:1 & m:m in form of TABLES by taking some values as example Databases + – learner_geek 4.4k views answer comment Share Follow Print See 1 comment 1 1 comment reply usher commented Nov 8, 2024 i edited by usher Nov 8, 2024 reply Follow flag for cardinality ratio M:N ( 3 tables) there will be three tables 1 = for T1 (containing T1 attributes) 2 = for T2 (containing T2 attributes) 3 = for the aggregation ( attributes will be if any descriptive attribute for the aggregation + T1 and T2 primary attributes) if the diagram has many to 1 relationship then the aggregation side having arrow depicts 1 while the normal straight line depicts many side.(2 tables) if the diagram has 1 to 1 relationship then the aggregation side has arrows to both sides( 2 choices of 2 tables) total participation has double line while partial has single line. What is total participation? --> total participation means foreign key cannot be NULL. if the diagram has 1:1 relationship but with total participation on both sides then it has only one table combining all the attributes. if the diagram has m:1 relationship but with total participation on one side then it has two tables. a single rectangle means strong entity whlie double rectangle means weak entity 0 0 replyShare Please log in or register to add a comment.
Best answer 4 4 votes For cardinality ratio 1:m..it means teacher to course is one to many , can be interpreted as one teacher teaches more than one subject .. Now it is obvious that two tables should be there ..one for teacher entity and another for course..now we see for relationship teaches , is there a need to have a table for this or not ?? Well u could make a extra table for it , but as u r asking for minimum no. Tables then there is no need for it .. u could move the attributes of teaches relationship either towards teacher or course table ..but it is logical to move it towards 'm' side ... For ex. If a teacher let say X, teaches two subjects maths and physics ..then these subjects will have different sub_id,sub_name , and if move these attributes towards teachers side then there would be redundancy in teacher's table ..amd if move the towards couse's table then no redundancy will be there and also it looks logical too.. Now the answers to all ur ques. 1:m--2 tables m:1--2 tables 1:1-- 2 table (could move the attributes of relationship to either table teacher or course) m:m-- 3 tables (1 extra table is required having primary taken to be the combination of primary key from eqch table ) Sushant Yadav 1 answered Jun 17, 2017 • selected Jun 18, 2017 by learner_geek Sushant Yadav 1 comment Share Follow See all 2 Comments 2 2 Comments reply learner_geek commented Jun 18, 2017 reply Follow flag It means if there would be no cardinality ratio given in this question then we will have minimum 3 table right! My other doubt is see in below question how in part 5 question 1 table is possible even wrong explanation given https://gateoverflow.in/77410/doubt Please reply 0 0 replyShare Sushant Yadav 1 commented Jun 18, 2017 reply Follow flag Without cardinality there will be no relationship .. so each entity has their own table but there would be no relationship btwn them .. 0 0 replyShare Please log in or register to add a comment.
3 3 votes 1:M STAT 1:Every course taught by exactly one teacher and a teacher can teach more than one course. Minimum no of tables required=2 M:1 STAT 2:Every teacher teaches exactly one course and a course can be taught by many teacher. Minimum no of tables required =2 M:N STAT 2:Every teacher is supposed to teach at least one course and every course can be taught by atleast one course. Minimum no of tables required=3 READ ALL THE STATEMENTS AND TRY TO GIVE VALUES IT WILL BE EASY NOW. HOPE IT HELP! junaid ahmad answered Jun 17, 2017 junaid ahmad comment Share Follow See all 10 Comments 10 10 Comments reply Show 7 previous comments learner_geek commented Jun 18, 2017 reply Follow flag Exactly !!! you are right I am also saying same thing you can always merge the table when you have total participation on both sides and no redundancy,so if in this case even if m:n given it will behave like 1:1(due to no redundancy) If I am wrong please correct me 0 0 replyShare junaid ahmad commented Jun 18, 2017 reply Follow flag you can say M:N behave like 1:1 but technically it is not correct because meaning of "Every teacher is supposed to teach at least one course and every course can be taught by atleast one course" will change. 1 1 replyShare learner_geek commented Jun 18, 2017 reply Follow flag Yes I got it thanks sir thanks for your valuable reply 0 0 replyShare Please log in or register to add a comment.