SQLDEV320A WEEK1

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 37

Instructor:

SQL Server boB Taylor


Developme
nt boB@sqlboBT.com
SQLDEV
320 A
Spring
2021 MCA, MCM, MCSM,
Week 1 MCSE, MCSD, MCT,
Data Scientist
TODAY REVIEW
• INTRODUCTIONS / REINTRODUCTIONS

COURSE LOGISTICS AND OBJECTIVES

REVIEW DATA SYSTEMS ARCHITECTURES

REVIEW DB PROGRAMMING

REVIEW RELATIONAL MODEL


boB Taylor
MCA,MCM, MCSM, MCSD, MCSE, MCT, MPP Data Science and Big
Data

boB ‘The Toolman’ Taylor


CodePlex Projects
SQL Server Compression Estimator
SQL Diag Configuration Tool
Reach out to me! ConnectToSQL
boB@SQLboBT.com
SQLCommandFilters
boB.Taylor@microsoft.com Temporal Data Capture
/ SQLboBT Xel2SQL
. @ SQLboBT Deadlock Dashboard
https://www.SQLboBT.com/blog
Intoductions
Or Re-introductions
Introductions / Reintroductions
About you?
• Industry knowledge
• If you were in last class, what have you been doing with your new knowledge
• Prior experience writing SQL
• Application development

5
Certificate
Program
Review
Certificate Program Review
Q1 Q2 Q3
SQL Server Database SQL Server
Fundamentals Programmin Applications
• Introduction to SQL Server • g
Intro to Database programming • Programming w/SQLCLR(.NET)
• Using SQL Server Tools • Using SQL – Thinking in Sets • Encryption
• SQL Server Objects &Transact-SQL • Transactions & Error Handling • Beyond Relational(XML,
• Database Design – Logical • Database programming with T-SQL JSON,Schema-less DB
• Database Design - Physical • Functions & Stored Procedures models)
• T-SQL & Team Integration • Database Triggers & Cursors • Building Data access solutions
• Data protection & Automation • Writing advanced SQL queries w/Entity Framework
• Security admin & permission • Concurrency: Locking & Blocking • Automation w/PowerShell
• Cloud Data Sources • Data Access Security • Data movement w/SSIS
• SQL Server Performance • Query optimization & Performance • Dynamic reports w/SSRS
tuning • Understand Data quality &
Master Data Management
• High Performance 5
Course Objectives

Concepts
• Using SQL - thinking in sets
• Understand development lifecycle & tools
• Understand and apply transactions and error handling

to master • Understand query processing and concurrency


• Understand data access vulnerabilities and security

Skills to
• Write simple to complex SQL queries
• Programming with Transact-SQL (T-SQL)
• Write stored procedures and views

acquire • Using system defined and user defined functions


• Query optimization

8
Logistics How to pass Program requires you to attend eight of the ten online
sessions
the course You will need at least 80% of assignments to pass the course

Weekly homework assignments


Assignments Forums this quarter are for collaboration – not graded
Bonus question

Ten sessions on Thursday from 6:00 – 9:00pm PST


Online sessions will be recorded and made available on
Sessions Canvas
Contact instructor if you can’t make it to class
Data Systems
Review of common architectures
Data System Architectures
Overview
1.Data-driven applications
2.Client-Server
3.Multi-database
4.NoSQL data stores
5.Reporting & analytics
Data System Architectures
1. Multi tier(N-Tier)
• Databas
Personalized user experiences e Cluster
• Multiple integrated applications
• Data
Discrete secure transactions SQL SPROC ORM
AccessLayer
• Centralized business logic
Applicatio
• Reporting & analytics n Servers
• Appropriate for OLTP Application
WEB API RIA
applications Data

UI /UX
Clients
(many devices
)
Data System Architectures
2. Client- Server
Single client protocol Database
Cluster
Heavy dependence on Server
Challenging to scale Data
SQL SPROC ORM
AccessLayer
Complex business logic
UI /UX
Data-oriented integration Clients
Appropriate for vertical applications (Mostly
Desktop)
Data System Architectures
Partitioned Databases
3.Multi-Database
Partitioned (shared) databases
Highly scalable (horizontal)
Challenging to query
Maste
Eventual consistency r
Appropriate for large data Index

workloads SQL SPROC ORM

UI /UX
Clients
Data System Partitioned Filesystems
Architectures
4. NoSQLDataStores HDFS

Schema-less data
Maste
storage(BigTable) r
Many different data stores (KV, Index
etc.) SQOOP Relational
Data
Highly distributed clusters Store
Eventual consistency
HIVE HBASE
Dramatic write performance
Challenging for reporting Reporting
Extracts
Appropriate for batch (map-
reduce)
Data System Multiple Backend DB Sources
Architectures
5. Reporting & Analytics
Data moves through multiple stages
Convert from source schema to EDM
IO workloads separated from OLTP ETL
Data Marts
Not time dependent
Rarely use transactions
ETL
Not real-time.
Business Data Views
Complex ETL required to synchronize
Appropriate for Business Intelligence Custom
Business
Reports

20
Database
Development
and SDLC
Review
Review - Database Development
Overview
Developer roles and responsibilities
Software Development Lifecycle
Review - Data Access

Developer Application Programming Interface


Centralized business logic
Roles and Secure confidential data

Responsibilitie Data Movement


s Extract, Transform, Load
Extract, Load, Transform
Data Integration

Decision Support

Report Query Logic


Data Visualizations
Software Development Lifecycle
1. Planning
2. Detailed design
3. Estimation and resource
planning
4. Development
5. System testing
6. User Acceptance Testing
7. Deployment
8. Validation
9. Repeat
Development
Lifecycle
Development Lifecycle

• Interactions
• Customer
collaboration
Agile • Responding to change
• Continuous
Model development
• Sprint planning
• Scrum meetings
Relational
Theory Review
And a little deeper
The
Foundations Edgar F. Codd
Relational Completeness of Data Base
of Relational Sublanguages
Database Original document
Additional readings
Systems
A Relational Model of Data for Large
Shared Data Banks
Original Document
Relational Theory - Set theory review
A set is an unordered collection of objects, with no repetitions
• All objects of the set share a characteristic that makes them be part of the set.
• Sets are, usually, denoted with capital letters.
• The objects of the set are called elements or members of the set.
• Elements or members are usually denoted with lowercase letters.
• The set that contains all items of the set is called the universe.
• A universe set does not need to have infinite elements to be a universe; it only
needs to have all possible elements of the set.
• The universe set of the English letters has 26 elements.
• If an element is part of a certain set, the element is said to pertain to the set and
• the relationship is denoted: a ∈ A
Relational Theory - Set theory review
Subsets
A subset is a set where all elements of the set are part of
another set.
The subset relationship is denoted by the symbol: ⊂
The empty set is a set with no elements in it.
The empty set is subset of all sets

Set Equality
Two sets are said to be equal when (a) all elements of the first
set are contained in the second set and (b) all elements of
the second set are contained in the first set.
Relational Theory - Set theory review
Set Operations
Union := Creates a new set from two or more sets where every element of the new
set belongs to, at least, one of the forming sets.
• Union is denoted by the symbol: U or +

Intersection := Creates a new set from two or more sets where every element of
the new set belongs to every set of the forming sets.
• Intersection is denoted by the symbol: ∩

Difference := Creates a new set from two sets where every element of the new set
is in the first set and not in the second set.
• Difference is denoted by the symbol: −

All sets mentioned in the operator definitions, above, are subsets of a common universe
Relational Theory -
Set theory review
Set Operations
Union is a commutative operation.
• => A + B = B + A
Intersection is a commutative operation.
• => A ∩ B = B ∩ A
Difference is not a commutative
operation.
• => A − B ≠ B − A, for every
A≠B
Relational Theory - Set theory review
Cartesian Product
• Creates a new set from two or more sets; where each new element is an array of
elements made from one element of the first set, one element of the second set,
one element of the third set and one element of each other set included in the
product.
• Every element of every set is combined with every element of all other sets.
• The array of elements is called a tuple.
• A tuple is equivalent to an element in a set; it is indivisible or atomic.
• The number of tuples in the new set is given by the product of the number of
elements in each participating set in the Cartesian Product.
• The Cartesian Product operator is denoted by the symbol: *
All sets mentioned in the Cartesian Product operator, above, are subsets of, possibly, different universes.
Relational Theory -
Set theory review
Cartesian Product
Let’s have A = {a, b, c}
Let’s have B = {1, 2}.
• => A*B = { (a,1), (a,2), (b,1),
(b,2), (c,1), (c,2)}
Note:
In math, A*B ≠ B*A; always, even if A = B
In database practice, A*B ≈ B*A
Relational Theory
Relation definition
A relation is a subset of the Cartesian Product
of the universes involved
Relational
Theory
Domain definition
Domain is a synonym for
set universe
Relational Theory

Relational Operators: ⊂
Since a relation is a subset, all set operators apply to relations.
Let’s have:
R ⊂ A*B*C, and S ⊂ A*B*C
Then:
(R + S) ⊂ A*B*C (remember, with no duplicates by definition)
(R ∩ S) ⊂ A*B*C (remember, an empty set is a valid outcome)
(R − S) ⊂ A*B*C (remember, an empty set is a valid outcome)
Relational Theory
Relational Operators: *

Since a relation is a Let’s have: Then:


subset, all set • T ⊂ A*B*C, and V ⊂ • (T * V) ⊂ A*B*C*D*E
operators apply to D*E
relations.
Relational Theory

Relational Operators: Selection ∫


The selection operator allows to create a subset of the relation
based on certain criteria (usually from the domains of the
relation).
Let’s have: R ⊂ A*B*C
Then:
({ a1, a2, …}*{b1, b2, …}*{c1, c2, …}) + ({ a3, a4, …}*{b3, b4,
T=∫

…}*{c3, c4, …}) + … R

Where ai ∈ A, bj ∈ B and ck ∈ C
T ⊂ R => T ⊂ A*B*C
Relational Theory
Relational Operators: Projection ⊗
The projection operator allows to create a subset of the relation taken, usually,
less columns from the relation.
Let’s have:
W ⊂ C*D
R = ⊂ A*B*C*D*E
Then:

T = ⊗ (C,D) R
=> T = W
Review Week 1 Assignment

Quiz 1 Reading Assignment

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy