SlideShare una empresa de Scribd logo
1 de 25
BASI DI DATI ESERCITAZIONI -2- MSSQL - SQL Email: francesco.magagnino@ewave.it Università di Trento Corso di Laurea in Ingegneria dell’Informazione e dell’Organizzazione
NORTWIND  TABLES MSSQL 2000
NORTWIND  TABLES MSSQL 2005
MSSQL 2000 NORTWIND  TABLE Orders Table Design Table Per impostare un contatore Identity = Yes Per impostare Primary Key Pulsante dx -> Set Primary Key
Per impostare un contatore Identity = Yes Per impostare Primary Key Pulsante dx -> Set Primary Key MSSQL 2005 NORTWIND  TABLE Orders Table Design Table
Vincoli ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Data types -1- ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Data types -2- ,[object Object],[object Object],[object Object],[object Object],[object Object]
Data types -3- TextArea tipico campo da   NText TextField tipico campo da   Nvarchar
A globally unique identifier   uniqueidentifier   A database-wide unique number that gets updated every time a row gets updated   timestamp   A special data type used to store a result set for later processing   table   A data type that stores values of various data types, except text, ntext, timestamp, and sql_variant   sql_variant   A reference to a cursor   cursor   Variable-length binary data with a maximum length of 2^31 - 1 bytes   image   Variable-length binary data with a maximum length of 8,000 bytes   varbinary   Fixed-length binary data with a maximum length of 8,000 bytes   binary   Variable-length Unicode data with a maximum length of 2^30 - 1 characters   ntext   Variable-length Unicode data with a maximum length of 4,000 characters   nvarchar   Fixed-length Unicode data with a maximum length of 4,000 characters   nchar   Variable-length data with a maximum length of 2^31 - 1 characters   text   Variable-length data with a maximum of 8,000 characters   varchar   Fixed-length character data with a maximum length of 8,000 characters   char   Date and time data from January 1, 1900, through June 6, 2079, with an accuracy of one minute   smalldatetime   Date and time data from January 1, 1753, through December 31, 9999, with an accuracy of 3.33 milliseconds   datetime   Floating precision number data from -3.40E + 38 through 3.40E + 38   real   Floating precision number data from -1.79E + 308 through 1.79E + 308   float   Monetary data values from -214,748.3648 through +214,748.3647   smallmoney   Monetary data values from -2^63 through 2^63 - 1   money   Fixed precision and scale numeric data from -10^38 +1 through 10^38 -1   numeric   Fixed precision and scale numeric data from -10^38 +1 through 10^38 -1   decimal   Integer data with either a 1 or 0 value   bit   Integer data from 0 through 255   tinyint   Integer data from -2^15 through 2^15 - 1   smallint   Integer data from -2^31 through 2^31 - 1   int   Integer data from -2^63 through 2^63-1   bigint   Description   Data Types
Da sapere ,[object Object],[object Object]
Views ,[object Object],[object Object],[object Object],[object Object]
[object Object],NORTWIND  VIEWS Design View
 
Stored Procedures ,[object Object],[object Object],[object Object],[object Object]
Le Stored Procedures permettono di togliere tutto il carico di lavoro dall’applicazione esterna. L’applicazione non fa altro che passare le variabili alla SP.
Sintassi tabelle ,[object Object],[object Object],[object Object],[object Object],[object Object]
Sintassi tabelle di relazione ,[object Object],[object Object],[object Object],[object Object]
Sintassi Views e Stored Procedures ,[object Object],[object Object],[object Object],[object Object],[object Object]
Riassunto sulla sintassi in SQL ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
ESERCIZIO ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
ESERCIZIO
 
Lavorando sulle Views (e iniziando a guardare Sql) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Lavorando sulle Views (e iniziando a guardare Sql) ,[object Object],[object Object],[object Object]

Más contenido relacionado

La actualidad más candente

La actualidad más candente (6)

primi comandi SQL con Mysql
primi comandi SQL con Mysqlprimi comandi SQL con Mysql
primi comandi SQL con Mysql
 
Sql 1
Sql 1Sql 1
Sql 1
 
IBM i db2 udb vs Microsoft SQL Server
IBM i db2 udb vs Microsoft SQL ServerIBM i db2 udb vs Microsoft SQL Server
IBM i db2 udb vs Microsoft SQL Server
 
MySQL
MySQLMySQL
MySQL
 
Strutture dati 07-multiindex
Strutture dati 07-multiindexStrutture dati 07-multiindex
Strutture dati 07-multiindex
 
12 Struct
12   Struct12   Struct
12 Struct
 

Similar a Basi Di Dati 02

Data profiling
Data profilingData profiling
Data profilingdodo_91
 
1.02 Rappresentazione dei dati
1.02 Rappresentazione dei dati1.02 Rappresentazione dei dati
1.02 Rappresentazione dei datiAngela Cristina
 
Lezione 20 (2 maggio 2012) prima parte
Lezione 20 (2 maggio 2012) prima parteLezione 20 (2 maggio 2012) prima parte
Lezione 20 (2 maggio 2012) prima parteSTELITANO
 
Lezione 10 (21 marzo 2012)
Lezione 10 (21 marzo 2012)Lezione 10 (21 marzo 2012)
Lezione 10 (21 marzo 2012)STELITANO
 
Lezione 10 (21 marzo 2012)
Lezione 10 (21 marzo 2012)Lezione 10 (21 marzo 2012)
Lezione 10 (21 marzo 2012)STELITANO
 
Presentazione Nuvola Vertica Full New1
Presentazione Nuvola Vertica Full New1Presentazione Nuvola Vertica Full New1
Presentazione Nuvola Vertica Full New1guest5c2d35b
 
Presentazione Nuvola Vertica Full
Presentazione Nuvola Vertica FullPresentazione Nuvola Vertica Full
Presentazione Nuvola Vertica FullAlberto.F
 
Presentazione Nuvola Vertica F
Presentazione Nuvola Vertica FPresentazione Nuvola Vertica F
Presentazione Nuvola Vertica FAlberto.F
 
Presentazione Nuvola Vertica Full New1
Presentazione Nuvola Vertica Full New1Presentazione Nuvola Vertica Full New1
Presentazione Nuvola Vertica Full New1Alberto.F
 
Presentazione Nuvola Vertica Full New1
Presentazione Nuvola Vertica Full New1Presentazione Nuvola Vertica Full New1
Presentazione Nuvola Vertica Full New1Alberto.F
 
Presentazione Nuvola Vertica Full New
Presentazione Nuvola Vertica Full NewPresentazione Nuvola Vertica Full New
Presentazione Nuvola Vertica Full NewAlberto.F
 
06 1 array_stringhe_typedef
06 1 array_stringhe_typedef06 1 array_stringhe_typedef
06 1 array_stringhe_typedefPiero Fraternali
 
Ldb 25 strumenti gis e webgis_2014-05-15 gullotta - 4 tabelle attributi e lor...
Ldb 25 strumenti gis e webgis_2014-05-15 gullotta - 4 tabelle attributi e lor...Ldb 25 strumenti gis e webgis_2014-05-15 gullotta - 4 tabelle attributi e lor...
Ldb 25 strumenti gis e webgis_2014-05-15 gullotta - 4 tabelle attributi e lor...laboratoridalbasso
 
corso web - Introduzione ai Database
corso web - Introduzione ai Databasecorso web - Introduzione ai Database
corso web - Introduzione ai DatabaseRiccardo Piccioni
 
ECDL modulo 1 ud1: algoritmi rappr informazione
ECDL modulo 1 ud1: algoritmi rappr informazioneECDL modulo 1 ud1: algoritmi rappr informazione
ECDL modulo 1 ud1: algoritmi rappr informazioneFabio Cantaro
 
noSQL La nuova frontiera dei Database [DB05-S]
noSQL La nuova frontiera dei Database [DB05-S]noSQL La nuova frontiera dei Database [DB05-S]
noSQL La nuova frontiera dei Database [DB05-S]Andrea Maddalena
 
Access parte terza
Access parte terzaAccess parte terza
Access parte terzaMatekanc
 

Similar a Basi Di Dati 02 (20)

Data profiling
Data profilingData profiling
Data profiling
 
1.02 Rappresentazione dei dati
1.02 Rappresentazione dei dati1.02 Rappresentazione dei dati
1.02 Rappresentazione dei dati
 
SQL Server2000
SQL Server2000SQL Server2000
SQL Server2000
 
Database
DatabaseDatabase
Database
 
Lezione 20 (2 maggio 2012) prima parte
Lezione 20 (2 maggio 2012) prima parteLezione 20 (2 maggio 2012) prima parte
Lezione 20 (2 maggio 2012) prima parte
 
Lezione 10 (21 marzo 2012)
Lezione 10 (21 marzo 2012)Lezione 10 (21 marzo 2012)
Lezione 10 (21 marzo 2012)
 
Lezione 10 (21 marzo 2012)
Lezione 10 (21 marzo 2012)Lezione 10 (21 marzo 2012)
Lezione 10 (21 marzo 2012)
 
Presentazione Nuvola Vertica Full New1
Presentazione Nuvola Vertica Full New1Presentazione Nuvola Vertica Full New1
Presentazione Nuvola Vertica Full New1
 
Presentazione Nuvola Vertica Full
Presentazione Nuvola Vertica FullPresentazione Nuvola Vertica Full
Presentazione Nuvola Vertica Full
 
Presentazione Nuvola Vertica F
Presentazione Nuvola Vertica FPresentazione Nuvola Vertica F
Presentazione Nuvola Vertica F
 
Presentazione Nuvola Vertica Full New1
Presentazione Nuvola Vertica Full New1Presentazione Nuvola Vertica Full New1
Presentazione Nuvola Vertica Full New1
 
Presentazione Nuvola Vertica Full New1
Presentazione Nuvola Vertica Full New1Presentazione Nuvola Vertica Full New1
Presentazione Nuvola Vertica Full New1
 
Presentazione Nuvola Vertica Full New
Presentazione Nuvola Vertica Full NewPresentazione Nuvola Vertica Full New
Presentazione Nuvola Vertica Full New
 
06 1 array_stringhe_typedef
06 1 array_stringhe_typedef06 1 array_stringhe_typedef
06 1 array_stringhe_typedef
 
Ldb 25 strumenti gis e webgis_2014-05-15 gullotta - 4 tabelle attributi e lor...
Ldb 25 strumenti gis e webgis_2014-05-15 gullotta - 4 tabelle attributi e lor...Ldb 25 strumenti gis e webgis_2014-05-15 gullotta - 4 tabelle attributi e lor...
Ldb 25 strumenti gis e webgis_2014-05-15 gullotta - 4 tabelle attributi e lor...
 
corso web - Introduzione ai Database
corso web - Introduzione ai Databasecorso web - Introduzione ai Database
corso web - Introduzione ai Database
 
ECDL modulo 1 ud1: algoritmi rappr informazione
ECDL modulo 1 ud1: algoritmi rappr informazioneECDL modulo 1 ud1: algoritmi rappr informazione
ECDL modulo 1 ud1: algoritmi rappr informazione
 
noSQL La nuova frontiera dei Database [DB05-S]
noSQL La nuova frontiera dei Database [DB05-S]noSQL La nuova frontiera dei Database [DB05-S]
noSQL La nuova frontiera dei Database [DB05-S]
 
Access parte terza
Access parte terzaAccess parte terza
Access parte terza
 
Information technology
Information technologyInformation technology
Information technology
 

Más de Francesco Magagnino

Presentazione TEDxVerona a AIDP 2015
Presentazione TEDxVerona a AIDP 2015Presentazione TEDxVerona a AIDP 2015
Presentazione TEDxVerona a AIDP 2015Francesco Magagnino
 
Wiki for Governance Risk and Compliance
Wiki for Governance Risk and ComplianceWiki for Governance Risk and Compliance
Wiki for Governance Risk and ComplianceFrancesco Magagnino
 
L’approccio web 2.0 e le sue ricadute sulle applicazioni di E-Learning: lo ...
L’approccio web 2.0 e le sue ricadute sulle applicazioni di E-Learning: lo ...L’approccio web 2.0 e le sue ricadute sulle applicazioni di E-Learning: lo ...
L’approccio web 2.0 e le sue ricadute sulle applicazioni di E-Learning: lo ...Francesco Magagnino
 
L’approccio web 2.0 e le sue ricadute sulle applicazioni di E-Learning: lo ...
L’approccio web 2.0 e le sue ricadute sulle applicazioni di E-Learning: lo ...L’approccio web 2.0 e le sue ricadute sulle applicazioni di E-Learning: lo ...
L’approccio web 2.0 e le sue ricadute sulle applicazioni di E-Learning: lo ...Francesco Magagnino
 
Web-line. From web 1.0 to web 2.0 and on!
Web-line. From web 1.0 to web 2.0 and on!Web-line. From web 1.0 to web 2.0 and on!
Web-line. From web 1.0 to web 2.0 and on!Francesco Magagnino
 
Il Modello Pragmatico Elementare per lo sviluppo di Sistemi Adattivi - Tesi
Il Modello Pragmatico Elementare per lo sviluppo di Sistemi Adattivi - TesiIl Modello Pragmatico Elementare per lo sviluppo di Sistemi Adattivi - Tesi
Il Modello Pragmatico Elementare per lo sviluppo di Sistemi Adattivi - TesiFrancesco Magagnino
 
Considerazioni E Mail Marketing, Spamming E Ipersfruttamento Delle Risorse ...
Considerazioni   E Mail Marketing, Spamming E Ipersfruttamento Delle Risorse ...Considerazioni   E Mail Marketing, Spamming E Ipersfruttamento Delle Risorse ...
Considerazioni E Mail Marketing, Spamming E Ipersfruttamento Delle Risorse ...Francesco Magagnino
 
Il Modello Pragmatico Elementare per lo sviluppo di Sistemi Adattivi - Presen...
Il Modello Pragmatico Elementare per lo sviluppo di Sistemi Adattivi - Presen...Il Modello Pragmatico Elementare per lo sviluppo di Sistemi Adattivi - Presen...
Il Modello Pragmatico Elementare per lo sviluppo di Sistemi Adattivi - Presen...Francesco Magagnino
 

Más de Francesco Magagnino (9)

Presentazione TEDxVerona a AIDP 2015
Presentazione TEDxVerona a AIDP 2015Presentazione TEDxVerona a AIDP 2015
Presentazione TEDxVerona a AIDP 2015
 
Enterprise 2.0 Framework
Enterprise 2.0 FrameworkEnterprise 2.0 Framework
Enterprise 2.0 Framework
 
Wiki for Governance Risk and Compliance
Wiki for Governance Risk and ComplianceWiki for Governance Risk and Compliance
Wiki for Governance Risk and Compliance
 
L’approccio web 2.0 e le sue ricadute sulle applicazioni di E-Learning: lo ...
L’approccio web 2.0 e le sue ricadute sulle applicazioni di E-Learning: lo ...L’approccio web 2.0 e le sue ricadute sulle applicazioni di E-Learning: lo ...
L’approccio web 2.0 e le sue ricadute sulle applicazioni di E-Learning: lo ...
 
L’approccio web 2.0 e le sue ricadute sulle applicazioni di E-Learning: lo ...
L’approccio web 2.0 e le sue ricadute sulle applicazioni di E-Learning: lo ...L’approccio web 2.0 e le sue ricadute sulle applicazioni di E-Learning: lo ...
L’approccio web 2.0 e le sue ricadute sulle applicazioni di E-Learning: lo ...
 
Web-line. From web 1.0 to web 2.0 and on!
Web-line. From web 1.0 to web 2.0 and on!Web-line. From web 1.0 to web 2.0 and on!
Web-line. From web 1.0 to web 2.0 and on!
 
Il Modello Pragmatico Elementare per lo sviluppo di Sistemi Adattivi - Tesi
Il Modello Pragmatico Elementare per lo sviluppo di Sistemi Adattivi - TesiIl Modello Pragmatico Elementare per lo sviluppo di Sistemi Adattivi - Tesi
Il Modello Pragmatico Elementare per lo sviluppo di Sistemi Adattivi - Tesi
 
Considerazioni E Mail Marketing, Spamming E Ipersfruttamento Delle Risorse ...
Considerazioni   E Mail Marketing, Spamming E Ipersfruttamento Delle Risorse ...Considerazioni   E Mail Marketing, Spamming E Ipersfruttamento Delle Risorse ...
Considerazioni E Mail Marketing, Spamming E Ipersfruttamento Delle Risorse ...
 
Il Modello Pragmatico Elementare per lo sviluppo di Sistemi Adattivi - Presen...
Il Modello Pragmatico Elementare per lo sviluppo di Sistemi Adattivi - Presen...Il Modello Pragmatico Elementare per lo sviluppo di Sistemi Adattivi - Presen...
Il Modello Pragmatico Elementare per lo sviluppo di Sistemi Adattivi - Presen...
 

Último

Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...
Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...
Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...Associazione Digital Days
 
Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...
Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...
Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...Associazione Digital Days
 
Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”
Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”
Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”Associazione Digital Days
 
Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...
Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...
Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...Associazione Digital Days
 
Mael Chiabrera, Software Developer; Viola Bongini, Digital Experience Designe...
Mael Chiabrera, Software Developer; Viola Bongini, Digital Experience Designe...Mael Chiabrera, Software Developer; Viola Bongini, Digital Experience Designe...
Mael Chiabrera, Software Developer; Viola Bongini, Digital Experience Designe...Associazione Digital Days
 
Gabriele Mittica, CEO @Corley Cloud – “Come creare un’azienda “nativa in clou...
Gabriele Mittica, CEO @Corley Cloud – “Come creare un’azienda “nativa in clou...Gabriele Mittica, CEO @Corley Cloud – “Come creare un’azienda “nativa in clou...
Gabriele Mittica, CEO @Corley Cloud – “Come creare un’azienda “nativa in clou...Associazione Digital Days
 
Programma Biennale Tecnologia 2024 Torino
Programma Biennale Tecnologia 2024 TorinoProgramma Biennale Tecnologia 2024 Torino
Programma Biennale Tecnologia 2024 TorinoQuotidiano Piemontese
 
Alessandro Nasi, COO @Djungle Studio – “Cosa delegheresti alla copia di te st...
Alessandro Nasi, COO @Djungle Studio – “Cosa delegheresti alla copia di te st...Alessandro Nasi, COO @Djungle Studio – “Cosa delegheresti alla copia di te st...
Alessandro Nasi, COO @Djungle Studio – “Cosa delegheresti alla copia di te st...Associazione Digital Days
 
Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...
Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...
Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...Associazione Digital Days
 

Último (9)

Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...
Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...
Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...
 
Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...
Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...
Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...
 
Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”
Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”
Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”
 
Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...
Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...
Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...
 
Mael Chiabrera, Software Developer; Viola Bongini, Digital Experience Designe...
Mael Chiabrera, Software Developer; Viola Bongini, Digital Experience Designe...Mael Chiabrera, Software Developer; Viola Bongini, Digital Experience Designe...
Mael Chiabrera, Software Developer; Viola Bongini, Digital Experience Designe...
 
Gabriele Mittica, CEO @Corley Cloud – “Come creare un’azienda “nativa in clou...
Gabriele Mittica, CEO @Corley Cloud – “Come creare un’azienda “nativa in clou...Gabriele Mittica, CEO @Corley Cloud – “Come creare un’azienda “nativa in clou...
Gabriele Mittica, CEO @Corley Cloud – “Come creare un’azienda “nativa in clou...
 
Programma Biennale Tecnologia 2024 Torino
Programma Biennale Tecnologia 2024 TorinoProgramma Biennale Tecnologia 2024 Torino
Programma Biennale Tecnologia 2024 Torino
 
Alessandro Nasi, COO @Djungle Studio – “Cosa delegheresti alla copia di te st...
Alessandro Nasi, COO @Djungle Studio – “Cosa delegheresti alla copia di te st...Alessandro Nasi, COO @Djungle Studio – “Cosa delegheresti alla copia di te st...
Alessandro Nasi, COO @Djungle Studio – “Cosa delegheresti alla copia di te st...
 
Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...
Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...
Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...
 

Basi Di Dati 02

  • 1. BASI DI DATI ESERCITAZIONI -2- MSSQL - SQL Email: francesco.magagnino@ewave.it Università di Trento Corso di Laurea in Ingegneria dell’Informazione e dell’Organizzazione
  • 2. NORTWIND TABLES MSSQL 2000
  • 3. NORTWIND TABLES MSSQL 2005
  • 4. MSSQL 2000 NORTWIND TABLE Orders Table Design Table Per impostare un contatore Identity = Yes Per impostare Primary Key Pulsante dx -> Set Primary Key
  • 5. Per impostare un contatore Identity = Yes Per impostare Primary Key Pulsante dx -> Set Primary Key MSSQL 2005 NORTWIND TABLE Orders Table Design Table
  • 6.
  • 7.
  • 8.
  • 9. Data types -3- TextArea tipico campo da NText TextField tipico campo da Nvarchar
  • 10. A globally unique identifier uniqueidentifier A database-wide unique number that gets updated every time a row gets updated timestamp A special data type used to store a result set for later processing table A data type that stores values of various data types, except text, ntext, timestamp, and sql_variant sql_variant A reference to a cursor cursor Variable-length binary data with a maximum length of 2^31 - 1 bytes image Variable-length binary data with a maximum length of 8,000 bytes varbinary Fixed-length binary data with a maximum length of 8,000 bytes binary Variable-length Unicode data with a maximum length of 2^30 - 1 characters ntext Variable-length Unicode data with a maximum length of 4,000 characters nvarchar Fixed-length Unicode data with a maximum length of 4,000 characters nchar Variable-length data with a maximum length of 2^31 - 1 characters text Variable-length data with a maximum of 8,000 characters varchar Fixed-length character data with a maximum length of 8,000 characters char Date and time data from January 1, 1900, through June 6, 2079, with an accuracy of one minute smalldatetime Date and time data from January 1, 1753, through December 31, 9999, with an accuracy of 3.33 milliseconds datetime Floating precision number data from -3.40E + 38 through 3.40E + 38 real Floating precision number data from -1.79E + 308 through 1.79E + 308 float Monetary data values from -214,748.3648 through +214,748.3647 smallmoney Monetary data values from -2^63 through 2^63 - 1 money Fixed precision and scale numeric data from -10^38 +1 through 10^38 -1 numeric Fixed precision and scale numeric data from -10^38 +1 through 10^38 -1 decimal Integer data with either a 1 or 0 value bit Integer data from 0 through 255 tinyint Integer data from -2^15 through 2^15 - 1 smallint Integer data from -2^31 through 2^31 - 1 int Integer data from -2^63 through 2^63-1 bigint Description Data Types
  • 11.
  • 12.
  • 13.
  • 14.  
  • 15.
  • 16. Le Stored Procedures permettono di togliere tutto il carico di lavoro dall’applicazione esterna. L’applicazione non fa altro che passare le variabili alla SP.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 23.  
  • 24.
  • 25.