Skip to content

INCOMPLETE: modifying_data_with_sql_orlee_gillis #9

@orlee-gillis

Description

@orlee-gillis

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):

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions