title: SQL Selecting by parameter VS SQL Joining VS Saving in-memory Collection
body: <p>I am making a minor project to test out my skills and I stumbled across some questions I had in relation to many-to-many/reference relation tables, especially in terms of performance.</p>
  <p>I attempted to create an ER-diagram to illustrate the relations (don't mind the ER arrow endings).
  <a href="https://i.stack.imgur.com/ymA1E.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ymA1E.png" alt="enter image description here" /></a></p>
  <p>So the case is I want to find all the fines that a certain user has been fined. But what is the smartest solution in terms of load/performance? As I see it, I have a few options:</p>
  <ol>
  <li>Create an InnerJoin statement to select the fines from a user, based of the reference table user_fines (not sure I would do this though, haha).</li>
  <li>Create a query that would select fines based of user_fines where user_id is equal to user_fines.user_id</li>
  <li>Store all the data in a collection (C# Model) and use lambda/linq to query the collections.</li>
  </ol>
  <p>I assume 1 could be created smarter as a view to index?</p>
  <p>Thank you!</p>