• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Database relationships

#1
Hi,

When using one of the following relationships between models ;
  • one to one

  • many to one

  • one to many
If I would like my query to return all records including the relations is this statement true or false?

Statement:
All three types use a single JOIN clause to return all records including the relations
Reply

#2
If, in the context of databases, by "relationship" you mean a situation that exists between two database tables when one table has a foreign key that references the primary key of the other table, then the statement is true. Though it might be more accurate to say that "All three types use at least one JOIN clause to return all records". The possibility exists that more than one JOIN was utilized.

I am not sure what you mean by "including the relations" in the return.
Reply

#3
This is the second time I've seen this question come up. Is this for a test or something?
Practical CodeIgniter 3  • CodeIgniter 4 Foundations - Coming Soon • Vulcan - CLI Tools for CI4
Reply

#4
Each one is a separate entity.
What did you Try? What did you Get? What did you Expect?

Joined the CodeIgniter Community in 2009.          ( Skype: insitfx )
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.