0
votes
3answers
155 views

How to maintain user relationship when user unfollows another user

I have a table of user relationship which stores who follows whom, the table structure is as follows -id -follower -following when someone follows any other user, I add a record with follower user ...
5
votes
4answers
198 views

Putting audit functionality into the database

Our database does not have any audit functionality. It does not records who inserts the record or who who changes it It does not keep a history of the changes made Nothing can be restored if ...
3
votes
1answer
223 views

What are the advantages and disadvantages of storing the number of comments in an integer column vs. calculating it on the fly?

Let's take CodeReview page as an example. If you go here, you will see the list of the questions with their vote numbers and comment numbers Now, I am wondering if these numbers are calculated on the ...
4
votes
2answers
372 views

How to design a website with search capabilities?

Suppose you want to create a web page with some search capabilities over a database. Search has to be restricted both on some categorization of data and open text given by the users. Functional and ...