Should BEGIN and COMMIT only be used when lots of data is written to a table or should it be used whenever a query is sent to the database? I'm not fully understanding it. If someone could give me some examples and explain when and when not to use it that would be awesome.
edit: I now understand that every time a you do a query that it begins a transaction and commits it automatically however I still do not understand the proper use of BEGIN and COMMIT if that's the case. The only thing I can think of is if you are adding a bunch of rows to a table and you would want to keep the transaction open so it doesnt have to BEGIN and COMMIT over and over. I still lack full understanding of it.