Using database: Mysql Database design structure on newest questions tagged database – Stack Overflow

Which is a better db design when inserting records?

**Option 1.**
uid|itemid| qty | price | amount
1  |13| 2  |  100    |200

**Option 2.**
uid| itemid| qty | price | amount
1  |13| 1 | 100 | 100
2  |13| 1 | 100 | 100

In option 2 then retrieve rows via mysql query and calculate using id …

See Answers


source: http://stackoverflow.com/questions/10762618/mysql-database-design-structure
Using database: using-database



online applications demo