When I was checking the 'Account Name' field in Contact Object, it is appearing as a 'Lookup(Account)'. Account is parent and contact is child, I know those relationships and behavior.
parent to child query
ex: account ac =[select id,name ,(select id,name from contacts) from account];
same like
contact is child and Opportunity parent but query from different
List<contact> consobj=[SELECT id,firstname,(SELECT OpportunityId FROM OpportunityContactRoles) ,lastname FROM contact ];
What is the difference between account/contact and contact/Opportunity?