'A rudimentary way to store comments on a proposal webpage using SQLite

I am a software engineer, but I am very new to databases and I am trying to hack up a tool to show some demo.

I have an Apache server which serves a simple web page full of tables. Each row in the table has a proposal id and a link to a web page where the proposal is explained. So just two columns.

----------------------
|  id    |  proposal |
|--------------------
|  1     |  foo.html |
|  2     |  bar.html |
----------------------

Now, I want to add a third column titled Comments where a user can leave comments.

------------------------------------------------
|  id    |  proposal |  Comments               |
|-----------------------------------------------
|  1     |  foo.html | x: great idea !         |
|        |           | y: +1                   |
|  2     |  bar.html | z: not for this release |
------------------------------------------------

I just want to quickly hack up something to show this as a demo and get feedback. I am planning to use SQLite to create a table per id and store the userid, comments in the table. People can add comment at the same time. I am planning to use lock to perform operations on the SQLite database. I am not worried about scaling just want to show and get feedback. Are there any major flaw in this implementation?

There are similar questions. But I am looking for a simplest possible implementation.



Solution 1:[1]

SQLite assumes the table name is 'a'

Add column

alter table a add column Comments text;

Insert comment

insert into a values (4,"hello.html","New Comment");

You need to provide values for the other two columns along with the new comment.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Peter Mortensen