sqlessentials-learning_outline_2

Upload: natalinog2002

Post on 02-Jun-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/10/2019 SqlEssentials-Learning_Outline_2

    1/6

    Copyright Embark Blue Inc. 2012 P a g e | 1

    SQL Server Essentials Learning Outline

    Module 1 Introduction to Databases

    Lesson #1Overview of Databases

    In order to have a good foundation, we need to start out with some information on what a database is.

    This video will give you short history of the different types of databases we encounter and then work

    our way to the Relational Database Management System (RDBMS). SQL Server is a RDBMS. We then

    move into some examples of companies that use Relational Databases.

    Lesson #2SQL, How to Talk to Databases

    In order to use a database, you must know the steps that are needed to start a conversation with the

    database. This is especially important when you are trying to access a database you havent accessed

    before. In this video, I outline the 8 steps to help you start talking to a database. Once you have gone

    through the steps a few times, you wont even know you are using them.

    Lesson #3Client Server Relationships Part 1

    When working with a database it is crucial that you understand the basics of a Client/Server

    relationship. In this lesson, I explain the Client/Server relationship and give you some pictures to help

    you visualize what is going on. This is part 1 of lessons on the Client/Server relationship.

    Lesson #4Client Server Relationships Part 2

    In this lesson I demonstrate some of the tools involved with the Client Server relationships. We talk

    more about Domains, IP Addresses, and how SQL Server runs as a Service. These concepts will help

    demystify how SQL Server runs.

    Module 2 Management Studio

    Lesson #5 Introduction to Management Studio Part 1

    Part 1 of this lesson is a short introduction on where Management Studio lives in the Client

    Server relationship. This will help you understand the spatial relationship between the

    Management Studio Client and the SQL Server.

    Lesson #6 Introduction to Management Studio Part 2

    Part 2 of this lesson digs into the Sql Server Management Studio tool. This tool is where

    most of your SQL work will happen. Understanding how to navigate around ManagementStudio will help you get through future lessons.

    Lesson #7 Database Objects Part 1

    Understanding the database hierarchy will help you find items in the database and help you

    understand how the database objects all fit together. In Part 1, I draw some diagrams to

    help show these concepts.

  • 8/10/2019 SqlEssentials-Learning_Outline_2

    2/6

    Copyright Embark Blue Inc. 2012 P a g e | 2

    Lesson #8 Database Objects Part 2

    In this lesson I want to familiarize you with how the database hierarchy actually looks

    inside a database in Management Studio. I will show you actual schemas, tables, and more.

    You will need to install the AdventureWorks2012 database if you want to follow along as

    the video is playing.

    Lesson #9 Tables Part 1

    You must first understand tables before you can start to work with relational databases. In

    part 1 of this lesson, I draw a few examples of tables and give you a very small introduction

    into table/relational theory. Not too much theory, just enough to expose you to it.

    Lesson #10 Tables Part 2

    We explore tables and data types in part 2 of the Tables lesson. Understanding data types

    will save you hours of difficulty and frustration working with tables. You will need to have

    the SqlTrainingOnlineSimpleDB installed to follow along in this lesson and in most of the

    future lessons.

    Lesson #11 Creating Stuff Part 1

    Its time to start creating things! In Part 1, we are starting by using the GUI tools inside of

    Management Studio to help us create a database, table, and add some data to the table.

    Creating things with the techniques I am demonstrating will give you a shortcut to

    memorizing all of the SQL commands that are out there.

    Lesson #12 Creating Stuff Part 2

    In Part 2, we continue creating tables using the GUI tools inside of Management Studio.

    But, we go even further by creating the Primary and Foreign Key relationships that set the

    relational database apart from other types of databases. Understanding the existence of

    Primary and Foreign Keys is the first step to understanding data integrity and keeping data

    clean and reliable.

    Lesson #13 Creating Stuff with Scripts Part 1

    We are starting to make our transition from using the GUI tools inside of Management

    Studio to using SQL to create our objects. In Part 1, I will show you how to create a

    database from a script. Knowing how to create and save scripts will give you a way to save

    your work and recreate items in seconds.

    Lesson #14 Creating Stuff with Scripts Part 2

    After this lesson, you will have a script that drops and creates a database, creates a table,

    and then populates that table with some data. This script will do the work from previous

    videos in less than a second! This is the power of SQL.

    Module 3 Writing SQL

    Lesson #15 CRUD Part 1

  • 8/10/2019 SqlEssentials-Learning_Outline_2

    3/6

    Copyright Embark Blue Inc. 2012 P a g e | 3

    When manipulating data in a table, there are four operations: Create, Retrieve, Update, and

    Delete. That is what CRUD stands and I will cover Create and Retrieve in part 1. Make sure

    to pay particular attention to the Retrieve part because we have a number of lessons

    coming up that build on these initial concepts.

    Lesson #16 CRUD Part 2

    In Part 2 of the CRUD lesson, I demonstrate how to Update and Delete records from a table.I will also get into the Undo functionality in SQL. The undo functionality is called

    Transactions. When talking to people about relational processes, transactions will often

    come up, so you should make sure you understand the concept.

    Lesson #17 Beginning Select Statements

    In this lesson, I give you a quick introduction to the Select syntax and take you through

    refreshing your training database so that you get the same answers that I do during the

    upcoming lessons. You will want to get this refresh done so you can follow along in the

    lessons.

    Lesson #18

    Where Clause Part 1The Where Clause allows you to filter data that you retrieve from a table. This is the start

    to mastering the retrieval of data from a database. We are starting slow, but we will keep

    building until you can create complex objects.

    Lesson #19 Where Clause Part 2

    We continue with filters in this Part 2 of the Where Clause. I start to get more complex by

    adding multiple filters which is how you will normally use the where clause in day to day

    operations.

    Lesson #20 Sorting

    Sorting happens through the Order By clause in SQL. You will pick this up very quickly, so I

    also give examples of using it with your newly learned Where clause/filtering skills. This is

    the methodology we will use in all of the upcoming lessons, where we keep building on the

    skills that you have already learned.

    Lesson #21 Column List Part 1

    So much can happen in the Column List of the Select Statement. The Column List defines

    what you want to return in your Query. In Part 1, we talk about concatenation, aliasing,

    conversions, and more. Make sure you are trying these queries as I show them to you. This

    will help you cement these operations in your brain.

    Lesson #22 Column List Part 2

    In Part 2, I demonstrate the use of built in functions, aggregations, mathematical

    operations, and more string manipulation. After you understand the basics of these

    operators and how to use them, I will show you how to find more of them, and you will

    become self-sufficient when working with built in functions and operators.

    Lesson #23 Group By

  • 8/10/2019 SqlEssentials-Learning_Outline_2

    4/6

    Copyright Embark Blue Inc. 2012 P a g e | 4

    Grouping your results allows you to find totals by departments, or cities, or salesmen.

    Grouping is a valuable tool to help you retrieve rolled up information to be further

    analyzed in Excel, or Access, or any other tool. I show you how to use grouping in this

    lesson.

    Lesson #24 Having Clause

    The Having Clause is used with the Group By clause to filter your results after you havegrouped them. This is valuable when validating your data doesnt have duplicates or you

    just want to narrow down your results. In this lesson we continue building on the

    knowledge from the previous video.

    Lesson #25 Joining Part 1

    Joining can take a while to digest, but it is a very important piece to the relational database.

    Since our data is usually spread across multiple tables, you bring all of this data back

    together through a table join. Take your time and watch this and the next lesson a couple

    times to make sure you understand how to Join tables.

    Lesson #26

    Joining Part 2In Part 2, I demonstrate an Outer Join and how it is different from the Inner Join in the last

    lesson. It is important that you have kept up with the other videos to this point, because I

    start bringing everything together toward the end of this video. After you are finished with

    this lesson, you should be able to query most relational databases that you will face. You

    will only need to combine the different techniques from the previous videos.

    Module 4 Advanced Objects

    Lesson #27

    Views Part 1Now that you have learned how to write queries using SQL, you will eventually end up with

    big queries that are complicated and can get pretty messy. That is where Views come in! A

    view lets you take a complex query and make it look simple. Part 1 will introduce the view

    to you.

    Lesson #28 Views Part 2

    Views have a few more uses other than making a complex query look simple. Part 2

    explores some of those other uses adding even more firepower to your ever growing SQL

    tool belt! After you complete this lesson, you should feel comfortable with the concept of a

    view and how it can be used.

    Lesson #29 Scripting with Variables Part 1

    Scripting enhances the power of SQL and moves toward programming with TSQL (Transact

    SQL). This shift is not dramatic and can be as simple as putting multiple SQL statements

    together. In this lesson we explore the way SQL Server allows you to simply do a select

    without a table. You will have to watch the video to see what I mean!

    Lesson #30 Scripting with Variables Part 2

  • 8/10/2019 SqlEssentials-Learning_Outline_2

    5/6

    Copyright Embark Blue Inc. 2012 P a g e | 5

    In Part 2, we start using variables to store information so that we can use it later in the

    script. This is an important part to programming and is quite different from the SQL we

    have been using up until this point. Variables are the most important concept for you

    moving into the next lessons where you will start creating Stored Procedures.

    Lesson #31

    Stored Procedures Part 1In this lesson, I will introduce you to Stored Procedures which allow you to program inside

    of the database. I wont get that deep into all of the features of SQL Server Stored

    procedures, but after this lesson you will have basic knowledge and be able to

    communicate with others about stored procedures.

    Lesson #32 Stored Procedures Part 2

    Now it is time to get a little more complex with the stored procedures by having more than

    one statement, storing a result, then returning it. You will want to make sure you are

    following along with your local SQL Server and practicing as you are watching the lesson.

    This will help you with your understanding of stored procedures.

    Lesson #33 Functions Part 1

    Do you remember using the aggregate functions Sum, Avg, Min, and Max? Well, now you

    will learn to create your own functions. They dont have to be too complex, but can be very

    useful when regular SQL techniques dont quite give you what you want. In Part 1, we will

    introduce the syntax to create a function and use some of our stored procedure and

    scripting with variable knowledge to make learning Functions easier.

    Lesson #34 Functions Part 2

    The Function can be used to lookup values and in many 3rdparty systems I have worked

    with they do just that. In this lesson, I will give you an example of a lookup using a

    Function and we will also explore how you can call a user created function. Even if you

    never write a Function in a production system, understanding their structure will help you

    understand and decipher the data you are working with.

    Module 5 Advanced Database Concepts

    Lesson #35 Security Part 1

    With all of the credit card and identity theft you hear about in the news, it is even more

    important than ever to understand the security mechanisms that are available. I draw

    diagrams of 6 levels of security that you can use to keep the information in your databasesecure.

    Lesson #36 Security Part 2

    Now I move to the computer and show you how the security is used inside the actual

    database. In Part 2, I secure an individual user by granting permissions directly to that

    user. This will work for a small number of users and is a great way for you to get started

    learning SQL Server security.

  • 8/10/2019 SqlEssentials-Learning_Outline_2

    6/6

    Copyright Embark Blue Inc. 2012 P a g e | 6

    Lesson #37 Security Part 3

    In Part 3, I use roles to secure objects. As there are more users in the database, you will

    want to use roles for security because it will be easier for you to manage. If you already

    work for a large company, you will probably see role-based security already implemented.

    This concept is a great addition to your knowledge as it translated to all types of security.

    Lesson #38 Backups Part 1

    Here, I introduce database backups and the different types that are in SQL Server. Without

    backups, you should be scared to put any data of significance into a database. So, backups

    are of the utmost importance and understanding the concept and the different types of

    backups will help you understand some of the worries that a DBA has and help you

    understand what questions you should be asking your DBA.

    Lesson #39 Backups Part 2

    Here, I head back to the computer and actually backup and recover one of our practice

    databases. I even recover it to a different database name. Being able to backup and restoreyour own databases can help you when you are troubleshooting issues and if you are a

    developer, you can use this knowledge to get your own development database play area.

    SQL Server Management Studio really simplifies this process and makes it easier to learn.

    Lesson #40 Indexes Part 1

    If you had to find a persons name in the phone book, but it wasnt alphabetized, how long

    would that take? Indexes are essentially the same as alphabetizing the phonebook. They

    provide a huge performance boost to your tables. In this lesson, I draw some diagrams to

    introduce the concept of an index.

    Lesson #41

    Indexes Part 2

    Im back at the whiteboard to talk about Clustered and Non-Clustered indexes. Without the

    Clustered index (which I will explain in the video), the regular index we spoke of in Part 1

    wont have the impact it is supposed to. As you start to deal with Big Data, you will need to

    understand the concept of indexing and its effect on performance.

    Lesson #42 Indexes Part 3

    In Part 3, I will create some indexes and show you how SQL Server reacts to different

    indexes. I introduce the concept of Full Table Scan and Index Seek and you will see these

    when we show SQL Servers Query Plan. After this lesson, you will be familiar with these

    concepts and you will also be able to answer the question of why not just put an index on

    every column to speed up all queries? (Which you shouldnt do by the way.)