sql - Best way to tie data to multiple users? -


what's best way relate pieces of data multiple users in sqlite?

say have table of users, table stocks they've purchased. preferred solution multiple users share same data?

example: user1 , user2 own stock in goog , appl. user3 owns goog, etc.

how best represent these relations?

based on answer comment (i.e. no link between users purchased same stock) , since tables (their records) rather small , hence no specific allocation issues expected, simple have 2 tables, 1 users (with id) , 1 3 columns: user_id, stock name, , amount.


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -