I have a table called Request and data will be entered by two types of users (Company staff and site members). Initially I had a column called createdby. But, the staff and the members table primary keys are integers with identity. So i had to change it because there could be an ID that corresponds to both entities.
Then I have created two columns in the the request table ByStaffId and ByMemberID. I wonder whether it is the right way.
Below is an example of how to relate the Staff and Members together using a common User table that has a 1-to-1 relationship with both a StaffUser table and a MemberUser table.
Granted, this approach results in greater complexity when selecting/inserting/updating/deleting users, so you can decide whether this is worth the extra complexity.
Below is a slightly more complicated structure that accomplishes the same thing as the example above, but in this case Member and Staff are more decoupled from User.