SlideShare ist ein Scribd-Unternehmen logo
1 von 20
Introduction to Views Module 5
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Contents
Objectives ,[object Object],[object Object],[object Object],[object Object],[object Object]
Introduction to Views ,[object Object],[object Object],[object Object],[object Object]
Introduction to Views (Continued) ,[object Object],[object Object],[object Object]
Advantages of Views ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Example of a Views   This example shows creating a view called ‘ViewPublishers’ from the Publishers table. This view contains two columns ‘Pubid’ and ‘Pubname’ which are taken from the table. The actual data will be in the Publishers  table, which can be  viewed and manipulated from the ‘ViewPublishers’ view. Publishers PARIS IL Chicago Five lake 1622 USA CA Berkely Algodata 1389 USA DC Washington Binnet  0877 CHICAGO MA Boston New Moon  0736 Country State City Pubname Pubid ViewPublishers Five lake 1389 Algodata 0877 Binnet 0736 Pubname Pubid
To Create  Views ,[object Object],[object Object],[object Object],CREATE VIEW <ViewName> AS <Select Statement> CREATE VIEW ViewPublishers As SELECT * FROM Publishers CREATE VIEW ViewPublishers  AS SELECT  pubid, pubname , city FROM Publishers WHERE city =‘paris’
Simple views  ,[object Object],[object Object],[object Object],[object Object],[object Object],This example creates a simple view  ViewPublisher  which selects  all the data from Publishers Table CREATE VIEW ViewPublisher AS SELECT * FROM Publishers
Complex Views ,[object Object],[object Object],[object Object],[object Object],The example creates a complex view Dept_vw which selects the department name, minimum salary, maximum salary, and average salary. It uses three Aggregate functions and it joins two tables Employee and Department. CREATE VIEW Dept_vw  (deptname,minSalary,maxSalary,avgSalary) AS  SELECT d.deptName,min(e.salary),max(e.salary),avg(e.salary) FROM  Employee e, Department d WHERE  e.deptId = d.deptId GROUP BY d.deptName
View With Check option ,[object Object],[object Object],[object Object],CREATE VIEW empdept_vw as select empno,ename,deptno from emp where deptno =30 With check option; The example uses ‘With Check Option’ clause, which will restrict the insertion of a row that cannot be selected by the view
To Alter Views ,[object Object],[object Object],[object Object],Alters the view to add publishers’ country column of the Publishers table ALTER VIEW ViewPublishers As SELECT pubid, pubname, pubcity, country From publishers
To Drop Views ,[object Object],[object Object],DROP VIEW <ViewName>
To Rename Views ,[object Object],[object Object],[object Object],[object Object],sp_rename <Old_ViewName>,<New_ViewName> sp_rename Viewpublisher, VpubDetails
To Get  Information on view ,[object Object],[object Object],[object Object],[object Object]
To Get  Information on view (Continued) ,[object Object],[object Object],[object Object]
Key Points ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Activity Time (30 minutes) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Activity Time (30 minutes) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Questions & Comments

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Query Analyser , SQL Server Groups, Transact –SQL
Query Analyser , SQL Server Groups, Transact –SQLQuery Analyser , SQL Server Groups, Transact –SQL
Query Analyser , SQL Server Groups, Transact –SQL
 
View
ViewView
View
 
Sql viwes
Sql viwesSql viwes
Sql viwes
 
Computing assignment 02 ms access (bilal maqbool 10) se-i
Computing assignment 02   ms access (bilal maqbool 10)          se-iComputing assignment 02   ms access (bilal maqbool 10)          se-i
Computing assignment 02 ms access (bilal maqbool 10) se-i
 
SQL Views
SQL ViewsSQL Views
SQL Views
 
View & index in SQL
View & index in SQLView & index in SQL
View & index in SQL
 
My first slide
My first slideMy first slide
My first slide
 
SQL
SQLSQL
SQL
 
Create an android app for database creation using.pptx
Create an android app for database creation using.pptxCreate an android app for database creation using.pptx
Create an android app for database creation using.pptx
 
Lab1-android
Lab1-androidLab1-android
Lab1-android
 
Android App Development - 04 Views and layouts
Android App Development - 04 Views and layoutsAndroid App Development - 04 Views and layouts
Android App Development - 04 Views and layouts
 
SQL Views
SQL ViewsSQL Views
SQL Views
 
Android interface elements and controls-chapter8
Android interface elements and controls-chapter8Android interface elements and controls-chapter8
Android interface elements and controls-chapter8
 
Manual de macros en calc
Manual de macros en calcManual de macros en calc
Manual de macros en calc
 
Oracle truncate&amp;alter (1)
Oracle truncate&amp;alter (1)Oracle truncate&amp;alter (1)
Oracle truncate&amp;alter (1)
 
Android app
Android appAndroid app
Android app
 
Backendless apps
Backendless appsBackendless apps
Backendless apps
 
Dataweave by nagarjuna
Dataweave  by nagarjunaDataweave  by nagarjuna
Dataweave by nagarjuna
 
Part 26 login type2 using binding source count
Part 26 login type2 using binding source countPart 26 login type2 using binding source count
Part 26 login type2 using binding source count
 
Android - Saving data
Android - Saving dataAndroid - Saving data
Android - Saving data
 

Andere mochten auch

Multi-thematic spatial databases
Multi-thematic spatial databasesMulti-thematic spatial databases
Multi-thematic spatial databasesConor Mc Elhinney
 
Transact sql data definition language - ddl- reference
Transact sql data definition language - ddl- referenceTransact sql data definition language - ddl- reference
Transact sql data definition language - ddl- referenceSteve Xu
 
5 tsssisu sql_server_2012
5 tsssisu sql_server_20125 tsssisu sql_server_2012
5 tsssisu sql_server_2012Steve Xu
 
High Performance Front-End Development
High Performance Front-End DevelopmentHigh Performance Front-End Development
High Performance Front-End Developmentdrywallbmb
 
SQL Server 2008 for .NET Developers
SQL Server 2008 for .NET DevelopersSQL Server 2008 for .NET Developers
SQL Server 2008 for .NET Developersllangit
 
X query language reference
X query language referenceX query language reference
X query language referenceSteve Xu
 
Alasql.js - SQL сервер на JavaScript
Alasql.js - SQL сервер на JavaScriptAlasql.js - SQL сервер на JavaScript
Alasql.js - SQL сервер на JavaScriptAndrey Gershun
 
Spatialware_2_Sql08
Spatialware_2_Sql08Spatialware_2_Sql08
Spatialware_2_Sql08Mike Osbourn
 
SQL Server 2008 for Developers
SQL Server 2008 for DevelopersSQL Server 2008 for Developers
SQL Server 2008 for Developersllangit
 
Css introduction
Css introductionCss introduction
Css introductionSridhar P
 
Sql server ___________session3-normailzation
Sql server  ___________session3-normailzationSql server  ___________session3-normailzation
Sql server ___________session3-normailzationEhtisham Ali
 
Alasql - база данных SQL на JavaScript (MoscowJS)
Alasql - база данных SQL на JavaScript (MoscowJS)Alasql - база данных SQL на JavaScript (MoscowJS)
Alasql - база данных SQL на JavaScript (MoscowJS)Andrey Gershun
 
Multidimensional model programming
Multidimensional model programmingMultidimensional model programming
Multidimensional model programmingSteve Xu
 

Andere mochten auch (20)

Module03
Module03Module03
Module03
 
Multi-thematic spatial databases
Multi-thematic spatial databasesMulti-thematic spatial databases
Multi-thematic spatial databases
 
SQL Server 2008 Spatial Data - Getting Started
SQL Server 2008 Spatial Data - Getting StartedSQL Server 2008 Spatial Data - Getting Started
SQL Server 2008 Spatial Data - Getting Started
 
Transact sql data definition language - ddl- reference
Transact sql data definition language - ddl- referenceTransact sql data definition language - ddl- reference
Transact sql data definition language - ddl- reference
 
5 tsssisu sql_server_2012
5 tsssisu sql_server_20125 tsssisu sql_server_2012
5 tsssisu sql_server_2012
 
High Performance Front-End Development
High Performance Front-End DevelopmentHigh Performance Front-End Development
High Performance Front-End Development
 
Module01
Module01Module01
Module01
 
SQL Server 2008 for .NET Developers
SQL Server 2008 for .NET DevelopersSQL Server 2008 for .NET Developers
SQL Server 2008 for .NET Developers
 
X query language reference
X query language referenceX query language reference
X query language reference
 
Module07
Module07Module07
Module07
 
Alasql.js - SQL сервер на JavaScript
Alasql.js - SQL сервер на JavaScriptAlasql.js - SQL сервер на JavaScript
Alasql.js - SQL сервер на JavaScript
 
Module06
Module06Module06
Module06
 
Spatialware_2_Sql08
Spatialware_2_Sql08Spatialware_2_Sql08
Spatialware_2_Sql08
 
SQL Server 2008 for Developers
SQL Server 2008 for DevelopersSQL Server 2008 for Developers
SQL Server 2008 for Developers
 
Css introduction
Css introductionCss introduction
Css introduction
 
Sql server ___________session3-normailzation
Sql server  ___________session3-normailzationSql server  ___________session3-normailzation
Sql server ___________session3-normailzation
 
Alasql - база данных SQL на JavaScript (MoscowJS)
Alasql - база данных SQL на JavaScript (MoscowJS)Alasql - база данных SQL на JavaScript (MoscowJS)
Alasql - база данных SQL на JavaScript (MoscowJS)
 
Module04
Module04Module04
Module04
 
Module08
Module08Module08
Module08
 
Multidimensional model programming
Multidimensional model programmingMultidimensional model programming
Multidimensional model programming
 

Ähnlich wie Module05

Sql server ___________session_16(views)
Sql server  ___________session_16(views)Sql server  ___________session_16(views)
Sql server ___________session_16(views)Ehtisham Ali
 
MS SQL SERVER: Creating Views
MS SQL SERVER: Creating ViewsMS SQL SERVER: Creating Views
MS SQL SERVER: Creating Viewssqlserver content
 
La6 ict-topic-6-information-systems
La6 ict-topic-6-information-systemsLa6 ict-topic-6-information-systems
La6 ict-topic-6-information-systemsAzmiah Mahmud
 
La6 ict-topic-6-information-systems
La6 ict-topic-6-information-systemsLa6 ict-topic-6-information-systems
La6 ict-topic-6-information-systemsKak Yong
 
LearningMVCWithLINQToSQL
LearningMVCWithLINQToSQLLearningMVCWithLINQToSQL
LearningMVCWithLINQToSQLAkhil Mittal
 
need help completing week 6 ilab.. i will upload what I currently ha.docx
need help completing week 6 ilab.. i will upload what I currently ha.docxneed help completing week 6 ilab.. i will upload what I currently ha.docx
need help completing week 6 ilab.. i will upload what I currently ha.docxniraj57
 
Cis407 a ilab 6 web application development devry university
Cis407 a ilab 6 web application development devry universityCis407 a ilab 6 web application development devry university
Cis407 a ilab 6 web application development devry universitylhkslkdh89009
 
OBIEE publisher with Report creation - Tutorial
OBIEE publisher with Report creation - TutorialOBIEE publisher with Report creation - Tutorial
OBIEE publisher with Report creation - Tutorialonlinetrainingplacements
 
Getting Started with MySQL II
Getting Started with MySQL IIGetting Started with MySQL II
Getting Started with MySQL IISankhya_Analytics
 
PostgreSQL Performance Tables Partitioning vs. Aggregated Data Tables
PostgreSQL Performance Tables Partitioning vs. Aggregated Data TablesPostgreSQL Performance Tables Partitioning vs. Aggregated Data Tables
PostgreSQL Performance Tables Partitioning vs. Aggregated Data TablesSperasoft
 

Ähnlich wie Module05 (20)

Sql server ___________session_16(views)
Sql server  ___________session_16(views)Sql server  ___________session_16(views)
Sql server ___________session_16(views)
 
Les11
Les11Les11
Les11
 
MS SQL SERVER: Creating Views
MS SQL SERVER: Creating ViewsMS SQL SERVER: Creating Views
MS SQL SERVER: Creating Views
 
MS SQLSERVER:Creating Views
MS SQLSERVER:Creating ViewsMS SQLSERVER:Creating Views
MS SQLSERVER:Creating Views
 
Les10
Les10Les10
Les10
 
La6 ict-topic-6-information-systems
La6 ict-topic-6-information-systemsLa6 ict-topic-6-information-systems
La6 ict-topic-6-information-systems
 
Oracle view
Oracle viewOracle view
Oracle view
 
L6-information-systems
L6-information-systemsL6-information-systems
L6-information-systems
 
La6 ict-topic-6-information-systems
La6 ict-topic-6-information-systemsLa6 ict-topic-6-information-systems
La6 ict-topic-6-information-systems
 
L6-information-systems
L6-information-systemsL6-information-systems
L6-information-systems
 
LearningMVCWithLINQToSQL
LearningMVCWithLINQToSQLLearningMVCWithLINQToSQL
LearningMVCWithLINQToSQL
 
need help completing week 6 ilab.. i will upload what I currently ha.docx
need help completing week 6 ilab.. i will upload what I currently ha.docxneed help completing week 6 ilab.. i will upload what I currently ha.docx
need help completing week 6 ilab.. i will upload what I currently ha.docx
 
View
ViewView
View
 
Cis407 a ilab 6 web application development devry university
Cis407 a ilab 6 web application development devry universityCis407 a ilab 6 web application development devry university
Cis407 a ilab 6 web application development devry university
 
OBIEE publisher with Report creation - Tutorial
OBIEE publisher with Report creation - TutorialOBIEE publisher with Report creation - Tutorial
OBIEE publisher with Report creation - Tutorial
 
Getting Started with MySQL II
Getting Started with MySQL IIGetting Started with MySQL II
Getting Started with MySQL II
 
PostgreSQL Performance Tables Partitioning vs. Aggregated Data Tables
PostgreSQL Performance Tables Partitioning vs. Aggregated Data TablesPostgreSQL Performance Tables Partitioning vs. Aggregated Data Tables
PostgreSQL Performance Tables Partitioning vs. Aggregated Data Tables
 
Views
ViewsViews
Views
 
Views
ViewsViews
Views
 
Views
ViewsViews
Views
 

Kürzlich hochgeladen

2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 

Kürzlich hochgeladen (20)

2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 

Module05

  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7. Example of a Views This example shows creating a view called ‘ViewPublishers’ from the Publishers table. This view contains two columns ‘Pubid’ and ‘Pubname’ which are taken from the table. The actual data will be in the Publishers table, which can be viewed and manipulated from the ‘ViewPublishers’ view. Publishers PARIS IL Chicago Five lake 1622 USA CA Berkely Algodata 1389 USA DC Washington Binnet 0877 CHICAGO MA Boston New Moon 0736 Country State City Pubname Pubid ViewPublishers Five lake 1389 Algodata 0877 Binnet 0736 Pubname Pubid
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.

Hinweis der Redaktion

  1. Faculty Notes: Views are virtual tables (tables which don’t occupy memory) whose contents are taken or derived from other tables. Just like other table, a view consists of rows with columns, and you can retrieve data from a view. Views can be used to join two tables in database and present the underlying data as if the data were coming from a single table Views can be used as a security mechanism to restrict the data available to end users Views can also be used to aggregate data
  2. Faculty Notes: A VIEW is basically a table that only exists when you use the view in a query. It is considered a virtual table because it acts like a table in the sense that the operations that can be performed on a table can be performed on a view. This virtual table does not exist in the database. It gets created when we use the view and then deleted. The named VIEW is the only thing that persists.
  3. Faculty Notes: Views make your life easier by simplifying your complex queries into a simple command. You won’t have to create complicated joins and subqueries repeatedly when you create a view instead. Your view hides the complexity of the underlying query. You can create views that hide information that isn’t needed by the user. You can allow users to see just the information they need, while keeping the sensitive information hidden using a view.
  4. Faculty Notes: Focuses data for users : It can be used as security mechanism by allowing user to access data through view, without granting permission to directly access the base table. Hides data complexity : Views hide the complexity of the database design from the user. This enables developers to change database design without affecting user interaction with the database. Simplifies permission management : Instead of granting permission to users for querying specific columns of the base tables,database owners can grant them permission for querying data only through views. Organizes data for export to other applications : User can create view based on a complex query that joins two or more tables. This appears to the user as single table. Reduces object size: views do not contain data, server stores only the definition of the view in the database
  5. Faculty Notes: Instructor has to Use inbuilt database table Database: Pubs Tables Publishers
  6. Faculty Notes: The example creates a simple view ViewPublisher which selects all the data from Publisher Table.
  7. Faculty Notes: The syntax of Complex view is similar to Create View Complex view is a view which normally contains GROUP BY as well as joins. Data in the underlying tables cannot be updated using Complex views.
  8. Faculty Notes: The “With Check option” clause specifies that Inserts and Updates performed through the View are not allowed to create rows which the view cannot select, and therefore allows integrity constraints and data validation checks to be enforced on data begin Inserted or Updated. For instance, Through this view you would not be able to insert data where deptno is anything other that 30.
  9. Faculty Notes: If you need to change the view itself without losing on it’s name along with the permissions set for the view, you may choose to alter the view rather than deleting the existing view and creating a new view with the same name.
  10. Faculty notes: There are some system stored procedures that help retrieve information on views . sp_help: This system stored procedure displays view related information. sp_depends: Determines the dependencies by looking at the sys.sql_dependencies view. sp_helptext: Retrieves and displays the view definition.The object must be in the current database.
  11. Faculty Notes: sp_columns: This stored procedure is equivalent to SQLCOLUMS in ODBC.