title: What is the way to store array of object_id and its coordinates in database?
body: <p>I have an application on rails 3 with PostgreSQL database.</p>
  
  <p>The problem is: I want to store coordinates with an object_id to access it like:</p>
  
  <pre><code>Post1 -&gt; Coordinates [100,200] -&gt; Attachment1
  Post1 -&gt; Coordinates [400,400] -&gt; Attachment2
  Post1 -&gt; Coordinates [200,500] -&gt; Attachment3
  
  Post2 -&gt; Coordinates [150,310] -&gt; Attachment1
  
  Post3 -&gt; Coordinates [50,710] -&gt; Attachment1
  Post1 -&gt; Coordinates [430,430] -&gt; Attachment2
  </code></pre>
  
  <p>I'd want to store all the attachments,  with coordinates in one place (i.e. Coordinating model) not to make the things messy. Is it possible?</p>
  
  <p>I've never met any way of solving this or similar.</p>