1 Working with MS SQL Server. 2 Objectives You will be able to Use Visual Studio for GUI based interactive access to a Microsoft SQL Server database.

Slides:



Advertisements
Similar presentations
1 After completing this lesson, you will be able to: Create a database. Create a table using the Table Wizard. Create and modify a table in Design view.
Advertisements

Stored procedures and views You can see definitions for stored procedures and views in the demo databases but you can’t change them. For views, expand.
Microsoft Excel 2003 Illustrated Complete Excel Files and Incorporating Web Information Sharing.
® Microsoft Office 2010 Appendix A: Introduction to SkyDrive and Office Web Apps.
Let’s try Oracle. Accessing Oracle The Oracle system, like the SQL Server system, is client / server. For SQL Server, –the client is the Query Analyser.
John Cooney Research Systems Project, Training and Web Manager Monash Research Office Research Information Systems How to obtain your DIISR points via.
Macros Tutorial Week 20. Objectives By the end of this tutorial you should understand how to: Create macros Assign macros to events Associate macros with.
A Guide to MySQL 3. 2 Objectives Start MySQL and learn how to use the MySQL Reference Manual Create a database Change (activate) a database Create tables.
 Pages made using data in a database  Use scripting languages  Use of RDMS  Look and feel by templates, CSS  High scaling  Admin pages as back end.
RIMS II Online Order and Delivery System Tutorial on Downloading and Viewing Multipliers.
XP New Perspectives on Microsoft Access 2002 Tutorial 71 Microsoft Access 2002 Tutorial 7 – Integrating Access With the Web and With Other Programs.
MBAC 611.  We have been using MS Access to query and modify our databases.  MS Access provides a GUI (Graphical User Interface) that hides much of the.
1 Mapping a Drive on the USF IIS Server. 2 Mapping a Drive To map a drive to a network file directory in Windows you must be on a Microsoft local area.
1 Working with MS SQL Server II. 2 The sqlcmd Utility Command line utility for MS SQL Server databases. Previous version called osql Available on classroom.
1 SAMBA. 2 Module - SAMBA ♦ Overview The presence of diverse machines in the network environment is natural. So their interoperability is critical. This.
Introduction to. What is Office 365 Office 365 is the same Office you already know and use every day. Office 365 is powered by “the cloud” which is a.
A Guide to SQL, Eighth Edition Chapter Three Creating Tables.
Session 5: Working with MySQL iNET Academy Open Source Web Development.
Advanced Database Management System Lab no. 11. SQL Commands (for MySQL) –Update –Replace –Delete.
Programming with Microsoft Visual Basic 2012 Chapter 12: Web Applications.
Create Database Tables
European Computer Driving Licence Syllabus version 5.0 Module 4 – Spreadsheets Chapter 22 – Functions Pass ECDL5 for Office 2007 Module 4 Spreadsheets.
CHAPTER 9 Introducing Microsoft Office Learning Objectives Start Office programs and explore common elements Use the Ribbon Work with files Use.
Simple Database.
XP Modifying the Slide Master Click the View tab on the Ribbon, and then, in the Master Views group, click the Slide Master button Click the Slide Master.
Microsoft Access Get a green book. Page AC 2 Define Access Define database.
Websites 101 Technology Committee UPSOM. Web Class – Goals  Make a simple web page (or series of pages)  Upload that page to the internet  Feel comfortable.
Open Internet Explorer Go to: my.ccsd.net Type YOUR InterAct username and password. Then Submit Query.
U3A Computing Class Leader – Brian Moore Week 5 of 10 weeks. Mondays 4:15 to 5:45 pm Next week is half term then an Inset day So Next lesson is 4 November.
1 Data Bound Controls II Chapter Objectives You will be able to Use a Data Source control to get data from a SQL database and make it available.
1 Working with MS SQL Server Textbook Chapter 14.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Working with MSSQL Server Code:G0-C# Version: 1.0 Author: Pham Trung Hai CTD.
CONSTRUCTING RELATIVE & CUMULATIVE FREQUENCY DISTRIBUTIONS using EXCEL & WORD.
C# Tutorial -1 ASP.NET Web Application with Visual Studio 2005.
Installing and Using MySQL and phpMyAdmin. Last Time... Installing Apache server Installing PHP Running basic PHP scripts on the server Not necessary.
Key Applications Module Lesson 21 — Access Essentials
Chapter 17 Creating a Database.
® Microsoft Office 2010 Building a Database and Defining Table Relationships.
2 pt 3 pt 4 pt 5pt 1 pt 2 pt 3 pt 4 pt 5 pt 1 pt 2pt 3 pt 4pt 5 pt 1pt 2pt 3 pt 4 pt 5 pt 1 pt 2 pt 3 pt 4pt 5 pt 1pt Word- processing The Rest of the.
A Guide to MySQL 3. 2 Introduction  Structured Query Language (SQL): Popular and widely used language for retrieving and manipulating database data Developed.
XP Browser and Basics COM111 Introduction to Computer Applications.
By: Ms. Abeer Helwa 1. WORD WEB APP 2 Word Web App is a limited version of Word, enabling you to edit, format, and share documents online. Word Web App.
Creating and Populating a MS SQLServer Database Presented By: Dr. Adam P. Anthony.
Planning & Creating a Database By Ms. Naira Microsoft Access.
MySQL Getting Started BCIS 3680 Enterprise Programming.
05. Data from Bloomberg Add-in. Launch Bloomberg and Press GO.
By: Ms. Abeer Helwa 1. WORD WEB APP 2 Word Web App is a limited version of Word, enabling you to edit, format, and share documents online. Word Web App.
Tutor: Gerry Mc Cann Basic Computer Study for academic Skills.
1 Getting Started with C++ Part 1 Windows. 2 Objective You will be able to create, compile, and run a very simple C++ program on Windows, using Microsoft.
Microsoft Office 2013 Try It! Chapter 4 Storing Data in Access.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Address Book Application Introducing Database Programming.
Starting with Oracle SQL Plus. Today in the lab… Connect to SQL Plus – your schema. Set up two tables. Find the tables in the catalog. Insert four rows.
1 Connecting to a Database Server. 2 We all have accounts, with a single database each, on a Microsoft SQL Server on the USF network: allman.forest.usf.edu.
CSCI 3327 Visual Basic Chapter 13: Databases and LINQ UTPA – Fall 2011.
1 Working with MS SQL Server Beginning ASP.NET in C# and VB Chapter 12.
Chapter 28. Copyright 2003, Paradigm Publishing Inc. CHAPTER 28 BACKNEXTEND 28-2 LINKS TO OBJECTIVES Table Calculations Table Properties Fields in a Table.
SSMS SQL Server Management System. SQL Server Microsoft SQL Server is a Relational Database Management System (RDBMS) Relational Database Management System.
Services Course Assigning Homework Participant Guide.
Integrity Check As You Well Know, It Is A Violation Of Academic Integrity To Fake The Results On Any.
Chapter 9 Working with Databases. Copyright © 2011 Pearson Addison-Wesley Introduction In this chapter you will learn: – Basic database concepts – How.
MySQL Getting Started BCIS 3680 Enterprise Programming.
Database Essentials Lesson 1. Software Orientation.
Chapter 7 Creating Templates, Importing Data, and Working with SmartArt, Images, and Screen Shots Microsoft Excel 2013.
Microsoft Excel Illustrated Introductory Workbooks and Preparing them for the Web Managing.
XP Creating Web Pages with Microsoft Office
3 A Guide to MySQL.
DBMS Programs MS SQL Server & MySQL
Database application MySQL Database and PhpMyAdmin
Tutorial 7 – Integrating Access With the Web and With Other Programs
Ch 1 .Installing and configuring SQL Server 2005
Presentation transcript:

1 Working with MS SQL Server

2 Objectives You will be able to Use Visual Studio for GUI based interactive access to a Microsoft SQL Server database. Populate a table with data from an Excel worksheet. Use sqlcmd for command line interactive access to a Microsoft SQL Server database. Using either Visual Studio or sqlcmd Create and delete tables. Modify table definitions. Insert new rows into tables. Modify existing rows. Retrieve and display table data.

3 We all have accounts, with own database, on a Microsoft SQL Server on the CoE network: scorpius.eng.usf.edu Classroom and lab computers can access the CoE database directly. A VPN is required for your home computer or wireless laptop to access the CoE database server. Or maybe not! CoE Resources

4 VPN Software Download VPN client software can be downloaded from Academic Computing: Caution: Some network oriented software on your computer may not work correctly while you have the VPN connection in place. Example: Sending

5 Setting Up a VPN Connection

6

7 Click Start

8 The Connection is Up This is Windows XP. The window will be different on other systems, but you should see the same information. If you don't get a window similar to this, your connection has not been established.

9 Using Visual Studio 2008 Visual Studio 2008 includes database access functions. View "Server Explorer" Set up a Data Connection

10 Data Connections in Visual Studio 2008 Right click on Data Connections and select Add Connection.

11 Adding a Data Connection

12 Adding a Data Connection Your SQL Server Username Your SQL Server Password

13 Test the Connection Click here

14 Adding a Table We will create a new table to hold the addresses in file Addresses.csv.

15 Adding a Table

16 Adding a Table

17 Data Types Common SQL Data Types int nvarchar(n)n = max number chars char(n)n = number chars decimal (p,s)p = total number of digits s = number decimal places datetime Many more!

18 Setting an ID Field It is good practice to include an ID field for every row. Unique identifier Not present in the Excel worksheet.

19 Setting an ID Field We will designate this as the “Primary ID”

20 Setting the Primary Key Right Click here System ensures that the Primary Key is unique.

21 Define Other Columns

22 Save the Table Definition Save

23 Table "Addresses" is Now Present

24 Viewing Table Data Right click on Addresses and select “Show Table Data”.

25 Viewing Table Data Table is currently empty.

26 Populating a Table Download file Addresses.csv from the Downloads area of the class web site: Downloads/ File Addresses.csv Downloads/ Double click to open in Excel

27 Excel Worksheet

28 Add ID Field In order to use this data in the database table we need to add an ID field. In Excel (2007), right click on the column header “A” and select “insert” in the dropdown menu. Adds a new column.

29 Adding an ID Column

30 Setting ID Values Set the ID for the first row to 1. Select ID on second row Press = Click the cell above (ID of the first row) Click in the formula window and add “+1” Formula window should now say =A1+1

31 Setting ID Values Press Enter

32 Setting ID Values

33 Setting ID Values Copy the formula in 2A down into all the cells below it. Click on 2A Shift click on 175A Press Ctrl-d (to copy Down) Should now see consecutive numbers 1 – 175 in the first column

34 Addresses with IDs

35 Populating the Database Table We will use the contents of this Excel worksheet to populate the Address table in the database. Click inside the worksheet, then press Ctrl-A to select all. Press Ctrl-C to copy the entire worksheet to the clipboard.

36 Populating the Database Table Click here to select all of the table. Press Ctrl-V to paste the clipboard into the table. (This may take a while to complete.)

37 The Table is Populated

38 The sqlcmd Utility Command line utility for MS SQL Server databases. Previous version called osql Available on classroom and lab PCs. In Windows command window Connect to a Database Server Enter SQL commands on the command line. Results output to the console.

39 Getting and Installing sqlcmd Included with Management Studio Express. Free download from Microsoft, Documentation available in SQL Server 2005 Books Online Free download from Microsoft. In Visual Studio 2008, search for sqlcmd.

40 The SQL Language The following slides demonstrate SQL commands using the sqlcmd program. Remember SQL is used everywhere we interact with a database server: Command line Database management programs Our own programs

41 Using sqlcmd The Server My Username Password entered here Execute commands in buffer Continued next class.