-
Notifications
You must be signed in to change notification settings - Fork 372
Description
INTRO TO TRANSACTIONS
AUTOCOMMIT TRANSACTIONS -- DEFINITION:
"Autocommit mode is the default transaction management mode of the SQL Server Database Engine. Every Transact-SQL statement is committed or rolled back when it completes. If a statement completes successfully, it is committed; if it encounters any error, it is rolled back.
A connection to an instance of the Database Engine operates in autocommit mode whenever this default mode has not been overridden by either explicit or implicit transactions." -- Microsoft TechNet
SEED SCRIPT -- DEFINITION:
"A script that populates your database with a set of test data. It can be as simple as a bunch of INSERT statements, or something much more elaborate." -- ycombinator thread
TRANSACTIONS -- DEFINITION + FUNCTION:
-- Used to switch-off 'autocommit'
BEGIN TRANSACTION/BEGIN -- DEFINITION + FUNCTION:
"Start a transaction"
COMMIT (OPERATOR) -- DEFINITION + FUNCTION:
"Commits all transactions since the transaction begin and turns autocommit mode on"
- Cannot be undone.
SEEDING -- DEFINITION + FUNCTION:
"Populating a database for the first time (in the form of a 'Script File')
**'UPDATES' -- DEFINITION + FUNCTIONS:
"Getting rid of changes that haven't been committed yet."
- ROLLBACK (OPERATOR) -- DEFINITION + FUNCTION:
Undo changes you made.
Always an option.
SET (OPERATOR) -- DEFINITION + FUNCTION:
Assigning a new VALUE to an existing VALUE
AUTO INCREMENT (OPERATOR) -- DEFINITION + FUNCTION:
Generates the latest ID for you so you don't have to.
Designates the ID column as an 'auto-incremented column'.
OBJECT-RELATIONAL-MAPPING (ORM):
"Used to perform CRUD operations with a language other than SQL."
(Many developers, while using databases, aren't required to write a single line of SQL code. They use special software libraries called ORMs.)
DATA-MANIPULATION-LANGUAGE (DML):