Have 2 separate tables or an additional field in 1 table?

Posted by hkansal on Stack Overflow See other posts from Stack Overflow or by hkansal
Published on 2010-05-15T09:38:34Z Indexed on 2010/05/15 9:44 UTC
Read the original article Hit count: 138

Filed under:
|
|
|

Hello,

I am making a small personal application regarding my trade of shares of various companies.

The actions can be selling shares of a company or buying. Therefore, the details to be saved in both cases would be:

  1. Number of Shares
  2. Average Price

Would it be better to use a separate tables for "buy" and "sell" or just use one table for "trade" and keep a field that demarcates "buy" from "sell"?

© Stack Overflow or respective owner

Related posts about sql

Related posts about database