Lecture #8 - Relational Databases

Tables, relationships, SQL Server

Web Resources
MS SQL Server Tutorial - tutorialspoint.com, SQL Server Tutorial - techonthenet.com, SQL Server Functions - w3schools.com
SQL Server Documentation - MSDN, Create SQL Project with Visual Studio
Working with SQL Server LocalDB, Connection String
SQL Server Tools for VS, Visual Studio Server Mgmt Studio, Tutorials for SQL Server Mgmt Studio
MySQL for Visual Studio, SQL - w3schools.com, SQL - tutorialspoint.com


This lecture focuses on Relational Data models, implemented with SQLServer.
  1. Syllabus describes topics to be covered, reading material for you to digest before coming to class, and due dates for the assigned projects.
  2. Projects: Final Project #1, Final Project #2, Final Project #3
    You will do one of these - the choice of which is yours to make - and present on the last day of classes.
    Additional Requirements
    You are expressly requested to refrain from using site editors like Wix, web.com, or other web designers. You may use any of the facilities of Visual Studio or any other text editor of your choice. This same rule applies to your lab submissions as well. For your Final Project demos you will be required to use only page links for navigation. You may host and demonstrate your labs in the built-in Visual Studio web server.
    All projects must use:
    • Asp.net core MVC - main site
    • Asp.net Web API - web service
    • Web API Client
    • SQL db storage
    • At least one static page that uses new features of HTML5, CSS3, and JavaScript6.
  3. Lab Grades

    Lab Grades through Lab #6
  4. Midterm Examination on Wednesday
  5. Relational Database Presentation and Examples:

    The Relational Database Model, pptx Database Schema Examples, 101 LINQ Samples
  6. Sample Code

    Visual Studio project for Books Database SQL Management Studio - db to attach
  7. Useful bits:

    Create Database with LINQ
    This demo creates and manipulates a database programmatically. It shows you a little bit of what Entity Framework does. Adding Query Strings to ActionLink
    This can occasionally be useful.
  8. LINQ:

    Net Prerequisites, delegate structure
    IEnumerable Interface, IEnumerator Interface, IQueryable Interface Linq Examples, Linq Query Examples, Linq to Demo DB, Examples of Queries on collections and LINQ to XML.
  9. LINQ to SQL

    These examples were built with .Net 4.5 and Asp.Net Mvc 4. They won't build unless you have that older framework installed. If not, and you attempt to load their solutions you will get a message with information about how to get the older frameworks. I've left the examples here in case you find yourself needing to work with older code. MVC Books example Creating DropDownList in MVC
    I used some of the code described here to populate DropDowns in TestBooksDB. The site has a lot of useful discussion with code snippets. Accessing Data with ADO.NET, .Net Framework 4
    Accessing Data with ADO.NET, .Net Framework 4.5
    Accessing Data with ASP.NET
  10. Relational Database Tutorials:

  11. SQL Server Management Studio

    SSMS - video
    This video has some interesting details presented by a very knowledgable instructor.
    The video starts slowly, but stay with it because it gets useful after a minute or two.
  12. LINQ to SQL tutorials:

  13. ADO Tutorials: ADO QuickStart, Overview of ADO Operations, Asp QuickStart, ADO articles, Single Table Commands
  14. ADO Notes: ADO Presentation, Murat's SQL Queries with Joins Presentation pptx
  15. Structured Query Language (SQL) Tutorials: SqlZoo, w3schools, Microsoft PDC, sqlTeam, sqlCourse2, sql-tutorial, Introduction to SQL, SQL Tutorial, firstsql
  16. Lab #8 - Note: due before Sunday Midnight, 3/10/2019