A rudimentry way to store comments on a proposal webpage using sqlite -
i software engineer new database , trying hack tool show demo. have apache server serves simple web page full of tables. each row in table has proposal id , link web page proposal explained. 2 columns.
---------------------- | id | proposal | |-------------------- | 1 | foo.html | | 2 | bar.html | ----------------------
now, want add third column title comments user can leave comments.
------------------------------------------------ | id | proposal | comments | |----------------------------------------------- | 1 | foo.html | x: great idea ! | | | | y: +1 | | 2 | bar.html | z: not release | ------------------------------------------------
i want hack show demo , feedback. planning use sqlite create table per id , store userid, comments in table. people can add comment @ same time. planning use lock perform operation on sqlite database. not worried scaling want show , feedback. guys see major flaw in implementation ? there similar questions. looking simplest possible implementation
table per id; why want that. if large number of proposals number of tables can out of hand quickly. need keep id column in table keep track of things , keep number of tables in sane figure.
the other drawback of using table each proposal not able use prepared statements because table names cannot bound parameter.
Comments
Post a Comment