Database- \" For each relationship, perform a joint query on the tables that are
ID: 3720825 • Letter: D
Question
Database-
" For each relationship, perform a joint query on the tables that are DIRECTLY related through that relationship. "
Having some difficulty understanding this question. Could I just join them by a field that they all have like gender? What type of join should I do?
Tables Below
____________________________________________________________________________________________________________
Arrancar Table
Hollow Table
Humans Table
Mod Souls
Quincy
Shinigami Table
Zanpakto Table
Explanation / Answer
Hi,
We can use simple inner join for tables to join with a field.
After observing tables provided by you they are not well organized they are not satisfying any standard's related to Normalization form.
As an example i will join Arrancar and tables with existing schema structure provided in input and print names in both the tables who belongs to GENDER 'male'
SELECT A.Name, H.Name FROM Arrancar A, Hollow H where A.GENDER = H.GENDER and A.GENDER ='Male';
We need to have atleast one primary key for each table and there should be a foreign key relation mapped to other table to form proper structure for all the tables and maintain Normalized form for all.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.