in Databases
713 views
0 votes
0 votes

in Databases
713 views

4 Comments

@Deepalitrapti

Give your tables

0
0
I got 2
0
0

@Deepalitrapti

it can be done with 3 tables also, sorry for giving wrong information ...

i added my explanation you can check it

0
0

1 Answer

0 votes
0 votes

Bank is a entity with ph_no as Multivalued Attribute. and Code as Key

    ∴ Bank(code,Name,addr,phno) ===> For minimum no.of table i can make code and ph_no as key ( it is 1NF only, so there is no problem with PFD's. )

 

BankBranch is a entity with Branch_No as Key

    ∴ Bank_Branch(Branch_No,Bank_Name,addr) ===> Bank_name is derived attribute, therefore no problem, it can represent in one table.

 

Loan  is a entity with Loan_No as Key.

∴ Loan(Loan_No,Amount,type) ===> it can represent in one table.

 

Loans is a many-to-one relation from Loan Entity Type ( total participation) to Bank_Branch Entity Type ( partial participation ).

it can be merged with Loan Entity Type, then Loan(Loan_No,Amount,type,Branch_No). where Branch_No is a Foreign Key from Bank_Branch Entity Type

 

Branches is a one-to-many relation from Bank Entity Type ( total participation) to Bank_Branch Entity Type ( total participation).

but note that, it actually have (Code,Branch_No), if you merge it with Bank_Branch Entity Type, then Code Should be a Foregin Key, but in Bank Entity Type, it is neither unique key nor Candidate Key ===> can't merge with Bank_Branch Entity Type.

then can we merge with Bank Entity Type ? yes we can merge it ( due to both side total participation), then Bank Entity type look as

Bank(code,Name,addr,phno,Branch_No ) with code,ph_no and Branch_No combinely as key

4 Comments

@Arjun

sir, then what is the key ? the key should be NOT NULL.

can you give such key ?

sir, if i am wrong, please guide me in the right direction

0
0

@Shaik Masthan

What about 2 tables only ???

1. One For Multi-valued Attribute

2. Second for the rest of the Attributes.

0
0

@kumar.dilip

Did you mean Totally 2 tables were sufficient or For Bank entity type we require 2 tables ?

if it is Totally 2 tables were sufficient ? then please give your tables

if it is For Bank entity type we require 2 tables ? then

T1(Code, Ph_NO) and T2(Code,Name,addr) ===> BankBranch is a entity type can combined with T2.

then also it is requires 3 tables only

0
0

Related questions

1 vote
1 vote
2 answers
4