2,882 views
1 votes
1 votes

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 

2 Answers

Best answer
4 votes
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 )

selected by
3 votes
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!

Related questions

2 votes
2 votes
3 answers
3
daksirp asked Apr 23, 2022
1,351 views
What is the cardinality of this relationship? is m-n cardinality correct? if not, why?
0 votes
0 votes
2 answers
4
Vipin Rai asked Oct 22, 2018
523 views
What is the Cardinality ratio from student to course for the following question?" Every student needs to register one course and each course is registered by many student...