Introduction
This week in Chapter 12: Introducing
Databases you will learn about the final tier of Web
development - the database tier. In order to perform most of the
required tasks to develop a
modern day dynamic Web site you need to have a database. Databases
are used for
everything from storing user settings and posted data to recording
and conducting financial transactions. If you are new to databases,
relax, your text book author does an excellent job of explaining the
basics and walking you through the terminology and
the structured query language used for creating, reading, updating,
and deleting (C.R.U.D) data in a database.
Our approach to this assignment will be a little
different than in past weeks. Starting this week you will be
working on one assignment worth 200 points and it will take two weeks
to complete it. This means you will not be submitting an assignment for
scoring until we cover chapters 12 and 13 and all the
Try It Outs necessary to accomplish the actual assignment you will
submit for scoring.
Note: Although
this course uses Microsoft SQL server as its database server, the
structured query language (SQL) commands you learn in this chapter can
be used to query any SQL server including MySQL and Oracle's database
products.
Assignment
This first week is a light
load designed to get you ready for the next chapter. Be sure to
cover everything thoroughly and definitely don't put any of this
week's tasks off until next week. In order to be prepared to move on
to next week's tasks you must complete the following this week:
-
Read all of
Chapter 12: Introducing Databases in your text book and
- Download and Install SQL Server 2022 Express. Note: Double-click the downloaded installer file and then choose the Custom option once the installer is running on your computer.
- Download this
Create Planet Wrox Database.zip zip file by right-clicking the link and
downloading or saving (depending on your Web browser) the file on your computer. Unzip the contents of the zip file, then use the Create Planet Worx Database SQL script file as instructed in Step 6
on page 412 of the Creating the SQL Server Sample Database Try It Out that begins on page 411.
-
Complete all of the steps in all of the Try It Outs
in Chapter 12 to learn about what a database is, the
terminology used to describe its parts, and the structured query
language used to create, retrieve, update, and delete data in a SQL
database.
- Publish nothing this week.
Instructions
Use the following step-by-step instructions as a supplement to the SQL Server and SQL Server Management Studio instructions provided in your text book.
Step 1: Go to the download page for SQL Server (year) Express, scroll down past the first three options to Express and click on the Download Now button. The download of the installer should begin immediately.
Download and Install SQL Server (year) Express
Step 2: Check you Downloads folder for the downloaded installer executable file, the name will be obvious, something like SQL2022-SSEI...exe. Double-click on the downloaded file to begin the installer process. You will need to grant the installer administrative access to your computer in order to complete the installation, so click Yes to allow the install to run.
Step 3: If requested, use your MSJC email address and password to Sign in to Microsoft.
Example:
Microsoft
account: 7-digitStudentID.msjc.edu
Password: my MSJC student email
password.
Step 4: During the SQL preparation process you will see a screen asking which options you want installed. In addition to the items already selected be sure you add a check to the box beside "LocalDb". Other than adding LocalDb to the installation list, I recommend you leave the default installation options as they are and continue setup without any additional changes.
The actual SQL server service will be configured to run automatically each time you run Windows on your computer.
Download and Install SQL Server Management Studio
Now that you have the SQL database server installed, you need to install a tool to be able to access and modify its contents, security, and other settings. In the past we have always used the SQL Server Management Studio, however, even though the instructions in your textbook show you how to use the SQL Server Management Tools (SSMS) to create and manipulate a database, know that Visual Studio comes with a tool called the SQL Server Object Explorer which can perform the same tasks as the SSMS tool. You can open the SQL Server Object Explorer from the Visual Studio View menu.
I mention this because I find myself using the VS SQL Server Object Explorer more frequently than Management Tools. Just thought you'd like to know.
If you would like to use the SQL Server Management Studio, scroll down to the bottom of the page where you downloaded the SQL server installer and click on Download SQL Server Management Studio (SSMS) under the SQL Server tools and connectors heading. Once the file is downloaded, follow the same steps you did to install SQL Server on your computer. Once the installation is complete you will see the tool listed in your Start menu inside the Microsoft SQL Server Tools folder.
Help Downloading & Using the Planet Wrox SQL Query Script File
There is a sql file you need to have access to in order to populate your sample database. You will find this file in your Resources/Chapter 12
folder, named "Create Planet Wrox Database.sql"
Step 7: Once you have downloaded the SQL Server Express 2019 with Management Tools and have located the Create Planet Wrox Database.sql file you will be ready to complete all of the Try It Outs in Chapter 12 using your LocalDB SQL server on your computer. Next week, you will be creating this DB on the IA.MSJC.EDU Student SQL Server.
Please email me if you have any questions at all!
⇑Table of Contents
Lesson Summary
In this lesson you learned how to:
- Understand what a database is and which database are typically used with ASP.NET pages
- Recognize SQL and how to use it to manipulate data
- How important relationships are in databases
- Use the tools available in Visual Studio to manage database objects (such as tables) and how to use them
Congratulations, that's it for this assignment. You can get a head start on your next lesson by reading chapter 13 in your textbook.
⇑Table of Contents