function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AKASH DEEPAKASH DEEP 

one to many and many to one

Is their is any difference between one to many or many to one relationship and what is the difference between owner and created by??
Best Answer chosen by AKASH DEEP
AKASH DEEPAKASH DEEP
Hello All,
I think the proper answer will be one to many is parent to child and many to one is child to parent and the lookup relationship and the master-detail relationship are both one to many and many to one so their is no differnce between one to many and many to one and The difference between OwnerId and CreatedBy are both lookup fields to the user object. CreatedBy will never be gonna change or editable but if we talk about OwnerId then it have the funcationallity to edit so we can change the owner when we want to change and in salesforce the user never get deleted because they might create any object or any record so the CreatedBy field have the user name so a user can't be deleted in salesforce because salesforce consist all the records that what is created by whom and every single detail.

Hope this will help to the begineer who wants to know in very simple language about these things,
Thanks & Regards,
Akash Deep

All Answers

Anthony McDougaldAnthony McDougald
Hello Akash,
Hope that your day is off to an amazing start. Both of the said relationships are the same, which are Master-Detail Relationships. In short, the Parent record (the one) can have many child records (the many), and once the parent record is deleted, all child records associated with it are deleted as well. Also, the child records adopt the permissions of the parent record.
The OwnerId and CreatedById are both look up fields to the User object. The created by doesn't change, once a record is created, the field will reference the User who created the record. The owner is susceptible to change as you can change the record owner at any time.
Hope this helps and may God bless you abundantly.
Best Regards,
Anthony McDougald
AKASH DEEPAKASH DEEP
Hello All,
I think the proper answer will be one to many is parent to child and many to one is child to parent and the lookup relationship and the master-detail relationship are both one to many and many to one so their is no differnce between one to many and many to one and The difference between OwnerId and CreatedBy are both lookup fields to the user object. CreatedBy will never be gonna change or editable but if we talk about OwnerId then it have the funcationallity to edit so we can change the owner when we want to change and in salesforce the user never get deleted because they might create any object or any record so the CreatedBy field have the user name so a user can't be deleted in salesforce because salesforce consist all the records that what is created by whom and every single detail.

Hope this will help to the begineer who wants to know in very simple language about these things,
Thanks & Regards,
Akash Deep
This was selected as the best answer