0% found this document useful (0 votes)
132 views10 pages

Cambrian College School of Business, Computer Studies & Eng. Tech. Course Outline

This document outlines a course on programming with SQL. The course will teach students to use SQL Server 2008 to create, update, delete and utilize database constructs like tables, views, stored procedures and triggers. It will focus on both the generic ANSI SQL standard and the Microsoft-specific T-SQL. The course aims to help students meet several vocational standards for computer programmer analysts and learn outcomes like using SQL Server Management Studio for tasks, writing T-SQL queries, and using SQL Server tools for database design.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
132 views10 pages

Cambrian College School of Business, Computer Studies & Eng. Tech. Course Outline

This document outlines a course on programming with SQL. The course will teach students to use SQL Server 2008 to create, update, delete and utilize database constructs like tables, views, stored procedures and triggers. It will focus on both the generic ANSI SQL standard and the Microsoft-specific T-SQL. The course aims to help students meet several vocational standards for computer programmer analysts and learn outcomes like using SQL Server Management Studio for tasks, writing T-SQL queries, and using SQL Server tools for database design.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Cambrian College

School of Business, Computer


Studies & Eng. Tech.
Course Outline

Course Title Programming with SQL

Course Code: STY2211 Credit Value: 5 Credit Hours: 75

Programs: CPPG Computer Programmer Analyst

Equivalencies Prerequisites STY2110 Corequisites

General Education Course: Eligible for PLAR:

COURSE DESCRIPTION
In this course, students will apply the fundamental concepts and practices taught in previous database
management courses to the study of SQL Server 2008. Students will use SQL, the premier language for relational
database systems, to create, update, delete and utilize various database constructs such as tables, views, stored
procedures and triggers. Where possible, the course content will focus on the generic SQL ANSI/ISO-92 standard
of SQL that can be used on most RDBMSs, but at times, the course will focus specifically on T-SQL, a Microsoft-
specific version of SQL.

Date: June 08, 2010

Prepared By: Diane Lajeunesse

T
Approved by:
Joan Campbell
Dean, School Of Business, Computer Studies & Eng. Tech.

Effective: Fall 2010

This is an important document and should be saved for future reference. It may be needed for page 1 of 10
certification, credit transfer and employment purposes.
Published: September 08, 2010
Cambrian College STY2211 - Programming with SQL

RELATIONSHIP TO PROGRAM VOCATIONAL OUTCOMES


PROGRAM LEVEL

This course contributes to your program by allowing you to demonstrate the following vocational outcomes:

Program(s) Vocational Standards (Subject Specific)

Computer Programmer Analyst Ministry Standards


1. Analyze and define the specifications of a system based on requirements.
2. Design, test, document, and deploy programs based on specifications.
3. Apply knowledge of the design, modeling, implementation, and maintenance
of a database.
4. Apply knowledge of networking concepts to develop, deploy, and maintain
programs.
5. Use relevant methodologies, policies, and standards to develop integrated
solutions.
6. Apply knowledge of security issues in the analysis, design, and
implementation of integrated solutions.
7. Articulate, defend, and conform to workplace expectations found in
information technology (IT) environments.

COURSE CURRICULUM

Topics/Concepts Covered in This Course


• SQL Server Management Studio 2008
• Essential SQL Skills
• Advanced SQL Skills
• CLR Integration

COURSE LEVEL: Learning Outcomes and Objectives

To earn credit for this course, you must reliably demonstrate your ability to:

Learning Outcome Objectives


1. Use SQL Server Management Studio to 1.1 Start or stop an instance of SQL Server.
perform management tasks. 1.2 Enable a remote connection to a database.
1.3 Navigate through the objects of a database.
1.4 Attach, detach, back up, or restore a database.
1.5 Set the compatibility level for a database
1.6 View the database diagrams for a database.
1.7 View the column definitions for a table in a database.
1.8 View or modify the data of a table in a database.
1.9 Modify the column definitions for a table in a database.

This is an important document and should be saved for future reference. It may be needed for page 2 of 10
certification, credit transfer and employment purposes.
Published: September 08, 2010
Cambrian College STY2211 - Programming with SQL

Learning Outcome Objectives


1.10 Use the Management Studio to run, open, and save
SQL queries.
1.11 Use the Query Designer to build and run queries.
1.12 Use Books Online to look up information about SQL
Server.
1.13 Briefly describe the function of each of these client tools:
the Management Studio, the Query Designer, and Books
Online.
1.14 Distinguish between Windows authentication and SQL
Server authentication for connecting to a SQL Server
database.
1.15 Describe what “compatibility level” means when it is
applied to SQL Server.
2. Write, test and debug Transact-SQL (T- 2.1 Code and run SELECT statements that use the various
SQL) syntax to solve specific problems. T-SQL keywords.
2.2 Code and run SELECT statements that include inner
joins, left outer joins, right outer joins, full outer joins and
cross joins.
2.3 Code and run SELECT statements that use a union of
rows from a single table or multiple tables.
2.4 Code and run SELECT statements to return summary
data.
2.5 Code and run SELECT statements that require
subqueries.
2.6 Code and run SELECT statements that use common
table expressions.
2.7 Code and run MERGE statements and the INTO clause
of a SELECT statement.
2.8 Code queries that work with data types as well as
queries that require the use of scalar functions.
2.9 Describe the difference between standard character
data and Unicode character data.
2.10 Describe the differences between implicit and explicit
data type conversion.
2.11 Describe how the use of functions can solve the
problems associated with (1) sorting string data that
contains numeric values, and (2) doing date or time
searches.
3. Use SQL Server Management Studio, 3.1 Given a complete database design, write the SQL DDL
Query tool and scripting for database statements to create the database, including all tables,
design. relationships, constraints, and indexes.
3.2 Describe the criteria for indexing a column.
3.3 Describe the use of a script that contains one or more
batches for creating a database.
3.4 Describe the use of table dependencies.
This is an important document and should be saved for future reference. It may be needed for page 3 of 10
certification, credit transfer and employment purposes.
Published: September 08, 2010
Cambrian College STY2211 - Programming with SQL

Learning Outcome Objectives


4. Code and manage various SQL Server 4.1 Given a SELECT statement, create a new view based
objects to efficiently and securely store on the statement.
and retrieve data in an enterprise 4.2 Given a SELECT statement, use the View Designer to
business solution. create a new view based on the statement.
4.3 Use the View Designer to change the design of an
existing view.
4.4 Describe the use of views and the benefits that they
provide
4.5 Name the three SQL statements you use to work with
views.
4.6 Given a SELECT statement, determine whether it can
be used as the basis for a view.
4.7 Describe the benefits provided by views.
4.8 Describe the effects of the WITH SCHEMABINDING
and WITH ENCRYPTION clauses on a view.
4.9 Describe the effect of the WITH CHECK OPTION clause
on an updatable view.
4.10 Describe the use of SQL Server’s catalog views for
getting information from the system catalog.
4.11 Given a Transact-SQL script written as a single batch,
insert GO commands to divide the script into appropriate
batches.
4.12 Given the specification for a database problem, write a
script that solves it.
4.13 Use the SQLCMD utility to execute a query or a script.
4.14 Given a Transact-SQL script, explain what each
statement in the script does.
4.15 Given the specifications for a database problem, write a
stored procedure that solves it.
4.16 Given a formula or expression, write a scalar-valued
user-defined function based on the formula or
expression.
4.17 Given a SELECT statement with a WHERE clause, write
a table-valued user-defined function that replaces it.
4.18 Given the specifications for a database problem that
could be caused by an action query, write a trigger that
prevents the problem.
4.19 Given the specifications for a database problem that
could be caused by a DDL statement, write a trigger that
prevents the problem.
4.20 Explain why a stored procedure executes faster than an
equivalent SQL script.
4.21 Describe the basic process for validating data within a
stored procedure.

This is an important document and should be saved for future reference. It may be needed for page 4 of 10
certification, credit transfer and employment purposes.
Published: September 08, 2010
Cambrian College STY2211 - Programming with SQL

Learning Outcome Objectives


4.22 Describe the basic purpose of the system stored
procedures.
4.23 Describe the two types of user-defined functions.
4.24 Describe the two types of triggers.
4.25 Describe the effects of the WITH ENCRYPTION
and WITH SCHEMABINDING clauses on a stored
procedure, user-defined function, or trigger.
4.26 Given a stored procedure, user-defined function, or
trigger, explain what each statement does.
5. Integrate the Common Language Runtime 5.1 Enable CLR integration for your instance of SQL Server.
(CLR) into a SQL Server solution. 5.2 Given the .NET code for a CLR object, use Visual Studio
to develop, deploy, test, and debug the object.
5.3 Describe the use of CLR objects.
5.4 Give three reasons for developing CLR objects.
5.5 List the five types of CLR objects.
5.6 Describe the implementation of CLR objects in terms of
classes, structures, methods, and attributes.
5.7 Describe the way SQL statements are used to deploy
CLR objects.
5.8 Given the specifications for a CLR stored procedure,
function, or trigger, implement the object using Visual
Studio.
5.9 Explain why using the data types in the SqlTypes
namespace within CLR stored procedures and functions
results in code that is faster and safer than using
the .NET data types.
5.10 Describe the basic components of the declaration for a
CLR stored procedure, function, and trigger.
5.11 Describe the purpose of the connection string you use
for a connection between a CLR object and a SQL
Server database.
5.12 Name the properties of the SqlContext class that you
can use to get a SqlPipe and SqlTriggerContext object.
5.13 Describe two methods of the SqlPipe class that you can
use to return data to the client.
5.14 Describe the properties of the SqlFunction attribute that
you can use to provide for reading data from a database
or the system catalogs and for creating a table-valued
function.
5.15 Describe the properties of the SqlTrigger attribute
that you can use to name a trigger, identify the table,
database, or server the trigger applies to, and identify
the type of trigger and the event that fires the trigger.
5.16 Describe two properties of the SqlTriggerContext object
that you can use to get information about a trigger.

This is an important document and should be saved for future reference. It may be needed for page 5 of 10
certification, credit transfer and employment purposes.
Published: September 08, 2010
Cambrian College STY2211 - Programming with SQL

Learning Outcome Objectives


5.17 Given the specifications for an aggregate function,
implement the aggregate using Visual Studio and then
use the aggregate in a SELECT statement.
5.18 Given the specifications for a user-defined type,
implement the type using Visual Studio and then use the
type for a column in a table or for a variable.
5.19 Use the properties and methods of a user-defined type
to work with the type.
5.20 Describe the basic components of the declaration for a
CLR aggregate function or user-defined type.
5.21 Describe the purpose of the four methods that must be
included in the code for an aggregate function.
5.22 Explain how you use the five most common properties of
the SqlUserDefinedAggregate attribute.
5.23 Describe the interface that you must implement to use
UserDefined serialization with an aggregate function or
user-defined type.
5.24 Describe the purpose of the four properties and methods
that must be included in the code for a user-defined
type.
5.25 Describe the interface that you must implement for any
user-defined type.
5.26 Explain how you use the four most common properties
of the SqlUserDefinedType attribute.
6. Investigate, design and implement 6.1 Investigate and implement a SQL Server Reporting
a solution using various SQL Server Services solution as a proof of concept.
Services. 6.2 Investigate and implement a SQL Server Integration
Services solution as a proof of concept.
7. Use more advanced tools for enterprise 7.1 Given the specifications for a database problem that can
database management. be solved by using Transact-SQL cursors, write a script
that solves it.
7.2 Describe the use of cursors.
7.3 Given a script, stored procedure, user-defined function,
or trigger that uses a cursor, explain what each
statement does.
7.4 Given a set of statements to be combined into a
transaction, insert the Transact-SQL statements to
explicitly begin, commit, and roll back the transaction.
7.5 Describe the use of implicit and explicit transactions.
7.6 Describe the use of: save points, and the COMMIT
TRAN statement and the @@TRANCOUNT function
within nested transactions.
7.7 Define these types of concurrency problems: lost
updates, dirty reads, nonrepeatable reads, and phantom
reads.

This is an important document and should be saved for future reference. It may be needed for page 6 of 10
certification, credit transfer and employment purposes.
Published: September 08, 2010
Cambrian College STY2211 - Programming with SQL

Learning Outcome Objectives


7.8 Describe the way locking and the transaction isolation
level help to prevent concurrency problems.
7.9 Describe the way SQL Server manages locking in terms
of granularity, lock escalation, shared locks, exclusive
locks, and lock promotion.
7.10 Describe deadlocks and the way SQL Server handles
them.
7.11 Describe four coding techniques that can reduce
deadlocks.
7.12 Given the specifications for a new user's security
permissions, write the Transact-SQL statements that
create the new user and grant the security permissions.
7.13 Given the specifications for a new user's security
permissions, use the Management Studio to create the
new user and grant the security permissions.
7.14 Given the specifications for a set of security
permissions, write the Transact-SQL statements to
create a new role and assign users or groups to it.
7.15 Given the specifications for a set of security
permissions, use the Management Studio to create a
new role and assign users or groups to it.
7.16 Use system stored procedures or the Management
Studio to add users to the fixed server roles or to add
users and roles to the fixed database roles.
7.17 Identify the two ways that SQL Server can authenticate
a login ID.
7.18 Identify the two SQL Server authentication modes.
7.19 Describe these terms: principals and securables.
7.20 Describe the difference between an object permission
and a database permission.
7.21 Describe what a user can do when given any of the
standard permissions for a SQL Server object: Select,
Update, Insert, Delete, Execute, and References.
7.22 Describe the two types of fixed roles provided by SQL
Server: fixed server roles and fixed database roles.
8. Work with XML and BLOB data in a SQL 8.1 Given the specifications for a table that requires an xml
Server database. data type, create the table and then add and retrieve
XML data from the table.
8.2 Use the XML Editor to display the XML returned by a
query.
8.3 Use the XML Editor to create an XML Schema Definition
for an XML document.
8.4 Use the methods of the xml type to work with XML data.
8.5 Given an XML Schema Definition, code a statement that
adds it to a database.

This is an important document and should be saved for future reference. It may be needed for page 7 of 10
certification, credit transfer and employment purposes.
Published: September 08, 2010
Cambrian College STY2211 - Programming with SQL

Learning Outcome Objectives


8.6 Use an XML Schema Definition to provide XML
validation for a column or variable.
8.7 Describe the structure and content of an XML document.
8.8 Describe the use of an XML schema, an XQuery and
XML DML.
8.9 Describe XML validation.
8.10 Describe the basic function of the FOR XML clause of
the SELECT statement.
8.11 Describe the basic function of the OPENXML statement.
8.12 Use SQL to create and use tables that use a
varbinary(max) column to store BLOB values.
8.13 Use SQL to create and use tables that use a
varbinary(max) column with FILESTREAM storage to
store BLOB values.
8.14 Describe the difference between (1) using a varchar
column to store a string that points to a binary file, (2)
using a varbinary(max) column to store binary data in
the database, and (3) using a varbinary(max) column
with FILESTREAM storage to store binary data.
8.15 Describe when it makes sense to use the FILESTREAM
storage feature.
8.16 In general terms, describe the way you use a .NET
application to read BLOB data from a table and to write
BLOB data to a table.

Essential Employability Skills


Communication Numeracy Critical Thinking and Problem
• reading • understanding and applying Solving
• writing math concepts and reasoning • analyzing
• speaking • analyzing and using numerical • synthesizing
• presenting data • evaluating
• listening • conceptualizing • decision making
• visual literacy • creative and innovative thinking

Information Management Interpersonal Personal


• gathering and managing • not applicable • managing self
information • managing change and being
• selecting and using appropriate flexible and adaptable
tools and technology for a task • engaging in reflective practices
or project • demonstrating personal
• computer literacy responsibility
• internet skills

This is an important document and should be saved for future reference. It may be needed for page 8 of 10
certification, credit transfer and employment purposes.
Published: September 08, 2010
Cambrian College STY2211 - Programming with SQL

Learning Activities
• Lectures
• Class Discussions
• Labs
• Group Work
• Internet Research
• eLearning
• Presentations
• Scenario Testing
• In-Class Exercises

Resources Required
Books
Bryan Severson, Joel Murach, Murach's SQL Server 2008 for Developers, Murach
ISBN: 9781890774516

Evaluation Plan
Grading Scheme
A 80% - 100%
B 70% - 79%
C 60% - 69%
D 50% - 59%
F 0% - 49%

Evaluation Method Value (%)


Test/Exam 50%
2 tests @ 25% each

Labs 50%
10 labs @ 5% each

ADDITIONAL INFORMATION

College
Academic Policies
Students must adhere to the following policies (available on AcadNet): Attendance Policy, Cheating Policy, Code of
Conduct, Procedures for Student Misconduct, and Students' Rights and Responsibilities.
Prior Learning Assessment and Recognition (PLAR)
Students may discuss PLAR with their faculty member or program coordinator, or contact

PLAR Facilitator
Phone: (705) 566-8101, Ext. 7584
Toll free in Ontario: 1-800-461-7145, ext. 7584
E-mail: [email protected]
Office location: ASK ME CENTRE, Barrydowne Campus

This is an important document and should be saved for future reference. It may be needed for page 9 of 10
certification, credit transfer and employment purposes.
Published: September 08, 2010
Cambrian College STY2211 - Programming with SQL

Student with a Disability


If you are a student with a disability, we encourage you to identify yourself by going in person to our Glenn
Crombie Centre for disability services (Room 2504); by calling (705) 566-8101, Ext. 7420; or by e-mailing
[email protected] so that support services may be arranged for you.

If you require alternative format for any course material due to a disabling condition, please make your request as
soon as possible to your Disabilty Advisor at The Glenn Crombie Centre.
Transfer Credit
Students wishing to have courses from other programs or institutions assessed for equivalency and transfer credit
should arrange a meeting with the program/subject coordinator to discuss eligibility and required documentation
within the first two weeks of the course.
Indigenous, Aboriginal, First Nations, Metis, Inuit Students
We encourage you to come to Wabnode Institute, Room 2133, to access the student services and other resources
available.
College Sanctioned Events
As per the College's Attendance Policy, students should not be penalized for being absent due to a College
sanctioned event (e.g., varsity sports, field trips, placements); however, they must notify the instructor prior to taking
part in any such event.
Electronic Devices
Non-approved electronic devices including cell phones are not to be turned on while in class or in tests.
Evaluation Protocol
Cambrian College reserves the right to alter the "Evaluation" factors in any course under exceptional circumstances
(e.g., pandemic events, force majeur, unplanned College closures, labour interruptions, unplanned faculty staffing
changes). Professors will notify students regarding any resulting changes to the "Evaluation" criteria. Students will
be responsible for obtaining this information from the faculty.

School of Business, Computer Studies & Eng. Tech. Regulations


Quizzes
Surprise quizzes may be utilized as part of the curriculum.
Lab Attendance
Lab attendance is mandatory since lab grades include an evaluation of lab reports and lab performance. Lab
performance can only be judged in person, requiring that students attend all scheduled labs.
Missed tests
Missed tests, examinations or quizzes will receive a grade of zero unless there is some extenuating circumstance.
In such cases, the student is to notify the professor of the anticipated absences. In case of serious extenuating
circumstances, the student must telephone the professor prior to test or exam day. A student who misses a test or
examination for a valid reason may be required to write a replacement test at the discretion of the professor.

This is an important document and should be saved for future reference. It may be needed for page 10 of 10
certification, credit transfer and employment purposes.
Published: September 08, 2010

You might also like