Tutorial SQL Server and Matlab - PowerPoint PPT Presentation

Loading...

PPT – Tutorial SQL Server and Matlab PowerPoint presentation | free to download - id: 510e26-NTlkZ



Loading


The Adobe Flash plugin is needed to view this content

Get the plugin now

View by Category
About This Presentation
Title:

Tutorial SQL Server and Matlab

Description:

Tutorial SQL Server and Matlab CIS 526 Build a New Database in SQL server Connect SQL Server to ODBC driver Click control panel- Administrative Tools - Data Source ... – PowerPoint PPT presentation

Number of Views:724
Avg rating:3.0/5.0
Slides: 15
Provided by: hongb1
Category:
Tags: sql | data | matlab | panel | server | tutorial

less

Write a Comment
User Comments (0)
Transcript and Presenter's Notes

Title: Tutorial SQL Server and Matlab


1
Tutorial SQL Server and Matlab
  • CIS 526

2
Build a New Database in SQL server
3
Connect SQL Server to ODBC driver
  • Click control panel-gt Administrative Tools -gt
    Data Source (ODBC)

4
  • Click Add

5
Build tables for your data
  • Click SQL server enterprise manager

6
How to connect Matlab to SQL server
7
Import data into SQL server
8
Import data using Matlab
conn database(demoDB','','') setdbprefs colnamecustID',age,gender,zip_code Insert(conn,person',colname,data) person is table name which we already built in sql server colname is the names of column in table person data is person data which we read from file using Matlab, it is a cell format variable type, for example datam,n close(conn)
9
Executing SQL command
  • Using query analyzer

Question How many movies did not receive any
vote?
select distinct movie.movID, movie.movName from
movie where movie.movID not in ( select
Vote.movID from Vote)
10
Using Matlab Querybuilder
11
Some times Query is not easy!
  • Question for all movies receiving more than 30
    votes, find the 5 with highest and 5 with lowest
    scores.
  • Not a easy job for query analyzer
  • select movID, avg(rate1)as pop from Vote
    group by movID having count() gt30 order by pop
  • But for querybuilder bonded with matlab program,
    it will be much more easier!

12
  • If the question change to for all movies
    receiving more than 30 votes, find the 5 with
    highest and 5 with lowest average scores exclude
    the top 5 and lowest 5 of the rating?
  • SQL analyzer may not helpful
  • But Matlab will sure did !

13
(No Transcript)
14
Thank you !!!
About PowerShow.com