I would like to know if there is a way to insert certain set of values replacing the older ones ie without creating duplicates
Sure. Use the UPDATE sql command, It'll take the form of "UPDATE table SET some value WHERE some_condition". Google sql update
UPDATE users SET firstname = "Fred", lastname = "Derf" WHERE userid = 3
UPDATE holdings SET shares = shares + 100 WHERE userid = 2 AND symbol = "AAPL"
THis handles the update part. As for not creating duplicates, if you don't want to have duplicate rows at all, then you need to use some kind of primary or unique key. Now, if you're trying to do something like prevent duplicate rows based on the combination of two fields, like userid and symbol (but allow multiple rows for the same userid, or allow multiple IDs to have the same symbol), then you need a unique key based on the combination of two columns. Google it.