Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

If in a web app, let's say an app that has a table with stored street address (Strings), the admin of the app will be adding data often to grow his archive. The table (MySQL) has a primary key with AUTO_INC.

The web app allows the users to add addresses themselves. Once a user enters an address say X, ALL of the users of the application will be able to see the address X when searching for available addresses.

What if, since address is a string, a user stores inappropriate content(like bad words, for example)? This might offend some users and push them to stop using the app.

So I was thinking of what would be better:

  • Storing user input in a separate table ("pending input"), until the admin approves them and then they're moved the official table?
  • Or store the inputs in same table of the admin's inputs table, but put a temporary flag on each entered record (by the users) so that they are only visible to that user until the admin approves them?

On a side note, is it logical to limit each user to have a specific amount of input addresses per day that they can add (some spammers might fill the table with thousands of useless records)?

share|improve this question
1  
My opinion: Store it all in the same table, with an "approved" bit column. Users can only see approved=1, admins have a view of approved=0 where they can set approved=1 or delete. –  Blorgbeard Feb 5 '12 at 3:37
    
@Blorgbeard yeah it makes more sense. What about putting a limit on how much can a user input per day, you think its good/bad? –  shadesco Feb 5 '12 at 4:09
    
@shadesco Without a limit, how likely is it that the admin will get overwhelmed by the volume of requests? –  Izkata Feb 6 '12 at 0:07
    
@Izkata there is no precise porbability it can range from 0% to 100%, depends the user that is adding stuff... you have to sincere users of the app, and you will have the spammers,bored, or just "competitors" using the app and they might add thousands of nonsense just for "fun".. no? –  shadesco Feb 6 '12 at 17:17
    
@shadesco Exactly my point. If the admins have to approve everything, and there's no limit to what users can add... Well, a limit of some sort is definitely a good idea! –  Izkata Feb 6 '12 at 17:56
show 1 more comment

1 Answer

up vote 2 down vote accepted

I would always put data of the same type in one table and rather add some simple columns with flags in a single table. This will make adding new features to your system in a later stage probably much easier to accomplish. Especially if other developers will be working on the project.

The problem with a limited amount of submissions by users, is that you limit the most active users. You can follow the StackExchange philosophy. The first time a user adds an address, it first needs to be approved. Then you can create a trusted base of users, and there is no reason to restrict those users at all. Don't make it to complicated however. Dividing users in new users and trusted users should be enough, if you also add some opportunity for regular users to report spam-input with a simple button. Do not make your system more restricted than necessary, that will scare of potential active users.

share|improve this answer
    
you're absolutely right, i guess i'll do that it sounds good. thanks a lot for the help :) –  shadesco Feb 5 '12 at 14:47
    
i tried to vote up, but it didn't allow me coz of low reputation rank, thanks again –  shadesco Feb 5 '12 at 14:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.