βœ”οΈTo Do


❓Questions


πŸ”—Links


Module: Database Command Line - Instructor Notes

Date: 2026-10-12

Tags: #module #newman



πŸŽ₯Video

Welcome Video

[paste embed code here for embedded video]

[paste embed code here for copying]

[paste video link here]

πŸŽ™οΈNotes / Lecture

Instructor Notes - Section 1

[SQL Server Command Line Basics] Video

<iframe width="640" height="347" src="https://www.loom.com/embed/9c3a966be9194531bb2d808ba3c0b864?sid=86c55f99-4087-4d48-a1b4-1d543e614a58" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>

https://www.loom.com/share/9c3a966be9194531bb2d808ba3c0b864?sid=65434745-cb65-46f1-9e7b-e8d4e4cc49a6

MS SQL Basics

Database Operations

CREATE DATABASE Norman;
GO

Pasted image 20261027172945.png

SELECT name FROM sys.databases;
GO
USE Norman;
GO

Pasted image 20261027173001.png

Table Management (DDL)

CREATE TABLE table1 (
    user_id VARCHAR(50)
);
GO
SELECT name FROM sys.tables;
GO

Pasted image 20261027173016.png

EXEC sp_help 'table1';
GO
CREATE TABLE employees (
    employee_id INT IDENTITY(1,1) PRIMARY KEY,
    first_name VARCHAR(50) NOT NULL,
    last_name VARCHAR(50) NOT NULL,
    bio TEXT,
    salary DECIMAL(10,2) NOT NULL,
    is_active BIT DEFAULT 1,
    hire_date DATE
);
GO
EXEC sp_help 'employees';
GO

Pasted image 20261027173048.png

Data Manipulation (DML)

INSERT INTO employees (first_name, last_name, bio, salary, is_active)
VALUES ('Alice', 'Johnson', 'Experienced secretary', 45332.00, 1);
GO
INSERT INTO employees (first_name, last_name)
VALUES ('The', 'Rock');
GO

Pasted image 20261027173110.png

INSERT INTO employees (first_name, last_name, bio, salary)
VALUES ('The', 'Rock', NULL, 99999.99);
GO
SELECT * FROM employees;
GO

Pasted image 20261027173136.png

DELETE FROM employees;
GO

Instructor Notes - Section 2

[topic] Video

[paste embed code here for embedded video]

[paste embed code here for copying]

[paste video link here]

🟠 Section 2 -

Instructor Notes - Section 3

[topic] Video

[paste embed code here for embedded video]

[paste embed code here for copying]

[paste video link here]

🟩 Section 3 -

Instructor Notes - Section 4

[topic] Video

[paste embed code here for embedded video]

[paste embed code here for copying]

[paste video link here]

πŸŸ₯ Section 4 -

Instructor Notes - Section 5

[topic] Video

[paste embed code here for embedded video]

[paste embed code here for copying]

[paste video link here]

🟣 Section 5 -



🧬 Programming Time

!350 !350
Example

#reading a CSV with headers named x1, x2, and y
#returns x (2-D array) and y (1-D array)
def load_x1x2y(csv_path: Path) -> Tuple[np.ndarray, np.ndarray]:
    """Load x1, x2, and y columns from a CSV with headers x1,x2,y."""
    data = np.genfromtxt(csv_path, delimiter=",", names=True, dtype=float)
%% 
    #make sure required headers exist
    needed = {"x1", "x2", "y"}
    if data.dtype.names is None or not needed.issubset(set(data.dtype.names)):
        raise ValueError("CSV must have headers: x1,x2,y")
    x1 = np.asarray(data["x1"], dtype=float)
    x2 = np.asarray(data["x2"], dtype=float)
    y = np.asarray(data["y"], dtype=float)

    #basic shape checks
    if x1.ndim != 1 or x2.ndim != 1 or y.ndim != 1:
        raise ValueError("x1, x2, y must be 1-D arrays.")
    if len(x1) != len(x2) or len(x1) != len(y):
        raise ValueError("x1, x2, and y must be the same length.")

    #stack x1 and x2 into a 2-D feature matrix
    X = np.column_stack([x1, x2]).astype(float)
    return X, y %%

Example

#reading a CSV with headers named x1, x2, and y
#returns x (2-D array) and y (1-D array)
def load_x1x2y(csv_path: Path) -> Tuple[np.ndarray, np.ndarray]:
    """Load x1, x2, and y columns from a CSV with headers x1,x2,y."""
    data = np.genfromtxt(csv_path, delimiter=",", names=True, dtype=float)
%% 
    #make sure required headers exist
    needed = {"x1", "x2", "y"}
    if data.dtype.names is None or not needed.issubset(set(data.dtype.names)):
        raise ValueError("CSV must have headers: x1,x2,y")
    x1 = np.asarray(data["x1"], dtype=float)
    x2 = np.asarray(data["x2"], dtype=float)
    y = np.asarray(data["y"], dtype=float)

    #basic shape checks
    if x1.ndim != 1 or x2.ndim != 1 or y.ndim != 1:
        raise ValueError("x1, x2, y must be 1-D arrays.")
    if len(x1) != len(x2) or len(x1) != len(y):
        raise ValueError("x1, x2, and y must be the same length.")

    #stack x1 and x2 into a 2-D feature matrix
    X = np.column_stack([x1, x2]).astype(float)
    return X, y %%

Example

#reading a CSV with headers named x1, x2, and y
#returns x (2-D array) and y (1-D array)
def load_x1x2y(csv_path: Path) -> Tuple[np.ndarray, np.ndarray]:
    """Load x1, x2, and y columns from a CSV with headers x1,x2,y."""
    data = np.genfromtxt(csv_path, delimiter=",", names=True, dtype=float)
%% 
    #make sure required headers exist
    needed = {"x1", "x2", "y"}
    if data.dtype.names is None or not needed.issubset(set(data.dtype.names)):
        raise ValueError("CSV must have headers: x1,x2,y")
    x1 = np.asarray(data["x1"], dtype=float)
    x2 = np.asarray(data["x2"], dtype=float)
    y = np.asarray(data["y"], dtype=float)

    #basic shape checks
    if x1.ndim != 1 or x2.ndim != 1 or y.ndim != 1:
        raise ValueError("x1, x2, y must be 1-D arrays.")
    if len(x1) != len(x2) or len(x1) != len(y):
        raise ValueError("x1, x2, and y must be the same length.")

    #stack x1 and x2 into a 2-D feature matrix
    X = np.column_stack([x1, x2]).astype(float)
    return X, y %%

Example

#reading a CSV with headers named x1, x2, and y
#returns x (2-D array) and y (1-D array)
def load_x1x2y(csv_path: Path) -> Tuple[np.ndarray, np.ndarray]:
    """Load x1, x2, and y columns from a CSV with headers x1,x2,y."""
    data = np.genfromtxt(csv_path, delimiter=",", names=True, dtype=float)
%% 
    #make sure required headers exist
    needed = {"x1", "x2", "y"}
    if data.dtype.names is None or not needed.issubset(set(data.dtype.names)):
        raise ValueError("CSV must have headers: x1,x2,y")
    x1 = np.asarray(data["x1"], dtype=float)
    x2 = np.asarray(data["x2"], dtype=float)
    y = np.asarray(data["y"], dtype=float)

    #basic shape checks
    if x1.ndim != 1 or x2.ndim != 1 or y.ndim != 1:
        raise ValueError("x1, x2, y must be 1-D arrays.")
    if len(x1) != len(x2) or len(x1) != len(y):
        raise ValueError("x1, x2, and y must be the same length.")

    #stack x1 and x2 into a 2-D feature matrix
    X = np.column_stack([x1, x2]).astype(float)
    return X, y %%

Example

#reading a CSV with headers named x1, x2, and y
#returns x (2-D array) and y (1-D array)
def load_x1x2y(csv_path: Path) -> Tuple[np.ndarray, np.ndarray]:
    """Load x1, x2, and y columns from a CSV with headers x1,x2,y."""
    data = np.genfromtxt(csv_path, delimiter=",", names=True, dtype=float)
%% 
    #make sure required headers exist
    needed = {"x1", "x2", "y"}
    if data.dtype.names is None or not needed.issubset(set(data.dtype.names)):
        raise ValueError("CSV must have headers: x1,x2,y")
    x1 = np.asarray(data["x1"], dtype=float)
    x2 = np.asarray(data["x2"], dtype=float)
    y = np.asarray(data["y"], dtype=float)

    #basic shape checks
    if x1.ndim != 1 or x2.ndim != 1 or y.ndim != 1:
        raise ValueError("x1, x2, y must be 1-D arrays.")
    if len(x1) != len(x2) or len(x1) != len(y):
        raise ValueError("x1, x2, and y must be the same length.")

    #stack x1 and x2 into a 2-D feature matrix
    X = np.column_stack([x1, x2]).astype(float)
    return X, y %%

Example

#reading a CSV with headers named x1, x2, and y
#returns x (2-D array) and y (1-D array)
def load_x1x2y(csv_path: Path) -> Tuple[np.ndarray, np.ndarray]:
    """Load x1, x2, and y columns from a CSV with headers x1,x2,y."""
    data = np.genfromtxt(csv_path, delimiter=",", names=True, dtype=float)
%% 
    #make sure required headers exist
    needed = {"x1", "x2", "y"}
    if data.dtype.names is None or not needed.issubset(set(data.dtype.names)):
        raise ValueError("CSV must have headers: x1,x2,y")
    x1 = np.asarray(data["x1"], dtype=float)
    x2 = np.asarray(data["x2"], dtype=float)
    y = np.asarray(data["y"], dtype=float)

    #basic shape checks
    if x1.ndim != 1 or x2.ndim != 1 or y.ndim != 1:
        raise ValueError("x1, x2, y must be 1-D arrays.")
    if len(x1) != len(x2) or len(x1) != len(y):
        raise ValueError("x1, x2, and y must be the same length.")

    #stack x1 and x2 into a 2-D feature matrix
    X = np.column_stack([x1, x2]).astype(float)
    return X, y %%

Example

#reading a CSV with headers named x1, x2, and y
#returns x (2-D array) and y (1-D array)
def load_x1x2y(csv_path: Path) -> Tuple[np.ndarray, np.ndarray]:
    """Load x1, x2, and y columns from a CSV with headers x1,x2,y."""
    data = np.genfromtxt(csv_path, delimiter=",", names=True, dtype=float)
%% 
    #make sure required headers exist
    needed = {"x1", "x2", "y"}
    if data.dtype.names is None or not needed.issubset(set(data.dtype.names)):
        raise ValueError("CSV must have headers: x1,x2,y")
    x1 = np.asarray(data["x1"], dtype=float)
    x2 = np.asarray(data["x2"], dtype=float)
    y = np.asarray(data["y"], dtype=float)

    #basic shape checks
    if x1.ndim != 1 or x2.ndim != 1 or y.ndim != 1:
        raise ValueError("x1, x2, y must be 1-D arrays.")
    if len(x1) != len(x2) or len(x1) != len(y):
        raise ValueError("x1, x2, and y must be the same length.")

    #stack x1 and x2 into a 2-D feature matrix
    X = np.column_stack([x1, x2]).astype(float)
    return X, y %%

Example

#reading a CSV with headers named x1, x2, and y
#returns x (2-D array) and y (1-D array)
def load_x1x2y(csv_path: Path) -> Tuple[np.ndarray, np.ndarray]:
    """Load x1, x2, and y columns from a CSV with headers x1,x2,y."""
    data = np.genfromtxt(csv_path, delimiter=",", names=True, dtype=float)
%% 
    #make sure required headers exist
    needed = {"x1", "x2", "y"}
    if data.dtype.names is None or not needed.issubset(set(data.dtype.names)):
        raise ValueError("CSV must have headers: x1,x2,y")
    x1 = np.asarray(data["x1"], dtype=float)
    x2 = np.asarray(data["x2"], dtype=float)
    y = np.asarray(data["y"], dtype=float)

    #basic shape checks
    if x1.ndim != 1 or x2.ndim != 1 or y.ndim != 1:
        raise ValueError("x1, x2, y must be 1-D arrays.")
    if len(x1) != len(x2) or len(x1) != len(y):
        raise ValueError("x1, x2, and y must be the same length.")

    #stack x1 and x2 into a 2-D feature matrix
    X = np.column_stack([x1, x2]).astype(float)
    return X, y %%

Example

#reading a CSV with headers named x1, x2, and y
#returns x (2-D array) and y (1-D array)
def load_x1x2y(csv_path: Path) -> Tuple[np.ndarray, np.ndarray]:
    """Load x1, x2, and y columns from a CSV with headers x1,x2,y."""
    data = np.genfromtxt(csv_path, delimiter=",", names=True, dtype=float)
%% 
    #make sure required headers exist
    needed = {"x1", "x2", "y"}
    if data.dtype.names is None or not needed.issubset(set(data.dtype.names)):
        raise ValueError("CSV must have headers: x1,x2,y")
    x1 = np.asarray(data["x1"], dtype=float)
    x2 = np.asarray(data["x2"], dtype=float)
    y = np.asarray(data["y"], dtype=float)

    #basic shape checks
    if x1.ndim != 1 or x2.ndim != 1 or y.ndim != 1:
        raise ValueError("x1, x2, y must be 1-D arrays.")
    if len(x1) != len(x2) or len(x1) != len(y):
        raise ValueError("x1, x2, and y must be the same length.")

    #stack x1 and x2 into a 2-D feature matrix
    X = np.column_stack([x1, x2]).astype(float)
    return X, y %%


Assessments

Quiz

Quiz Questions


Discussion

Discussion: [topic]

[Topic description]

Please respond to 2 classmates for this discussion.


Assignments


Assignment: [ ]

[directions]

Submission Instructions

  • You must submit a Word/PDF/RTF/other document
  • You must submit a Loom video

Assignment: [ Concept ] Notebook

Access the following course on LinkedInLearning:

  • [course title]
  • [URL]

You need to complete the following sections:

[picture of the course player]

As you complete the course, keep a notebook of your progress with screenshots of concepts along with your explanations of the concepts. Specific items to include are listed below:

Section Title

Section Title

Along with the screenshots, write a short explanation of what is happening in the screenshot.

Loom Video

  • Submit a very brief video (around 1 minute) showing me your notebook and highlighting the most important concept from the module

Submission Instructions

  • You must submit a Word/PDF/RTF/other document
  • You must submit a Loom video


Assignment: Programming Notebook

Access the following course on LinkedInLearning:

  • [course title]
  • [URL]

You need to complete the following sections:

[picture of the course player]

As you complete the course, keep a notebook of your progress with screenshots of successful item completions, including the following:

Section Title

Section Title

Along with the screenshots, write a short explanation of what is happening in the screenshot.

Loom Video

  • Submit a very brief video (around 1 minute) showing the end state of your program after the last tutorial and give a very brief explanation about what's going on.

Submission Instructions

  • You must submit a Word/PDF/RTF/other document
  • You must submit a Loom video