SlideShare a Scribd company logo
Prepared By: Sajid Hussain
Prepared By: Sajid Hussain
Data access is making the application interactData access is making the application interact
with a database, where all the data is storedwith a database, where all the data is stored
Prepared By: Sajid Hussain
The first data access model, DAO (data access
model) was created for local databases with the
built-in Jet engine which had performance and
functionality issues.
Next came RDO (Remote Data Object) and ADO
(Active Data Object) which were designed for
Client Server architectures but soon ADO took over
RDO.
Prepared By: Sajid Hussain
ADO was a good architecture but as the language changes
so is the technology. With ADO, all the data is contained in
a recordset object which had problems when implemented
on the network and penetrating firewalls.
 ADO was a connected data access, which means that
when a connection to the database is established the
connection remains open until the application is closed.
 Leaving the connection open for the lifetime of the
application raises concerns about database security and
network traffic. 
Prepared By: Sajid Hussain
Also, as databases are becoming increasingly important
and as they are serving more people, a connected data
access model makes us think about its productivity.
For example, an application with connected data access
may do well when connected to two clients, the same may
do poorly when connected to 10 and might be unusable
when connected to 100 or more. Also, open database
connections use system resources to a maximum extent
making the system performance less effective. .
Prepared By: Sajid Hussain
VB .NET uses ADO .NET (Active X Data Object) as it's
data access and manipulation protocol which also enables
us to work with data on the Internet.
Prepared By: Sajid Hussain
ADO .NET interacts with databases by maintaining a
disconnected database access model.
 when an application interacts with the database, the
connection is opened to serve the request of the application
and is closed as soon as the request is completed.
if a database is Updated, the connection is opened long
enough to complete the Update operation and is closed.
Prepared By: Sajid Hussain
Connections are open for only a minimum period of time,
ADO .NET conserves system resources and provides
maximum security for databases and also has less impact
on system performance.
ADO .NET uses XML when interacting with  the database,
 and converts all the data into XML format for database
related operations making them more efficient
Prepared By: Sajid Hussain
Data Access in ADO.NET relies on two
omponents:
1- DataSet
2- Data Provider
Prepared By: Sajid Hussain
The dataset is a disconnected, in-memory representation
of data. It can be considered as a local copy of the
relevant portions of the database.
The DataSet is persisted in memory and the data in it can
be manipulated and updated independent of the database.
When the use of this DataSet is finished, changes can be
made back to the central database for updating.
The data in DataSet can be loaded from any valid data
source like Microsoft SQL server database, an Oracle
database or from a Microsoft Access database.
Prepared By: Sajid Hussain
The Data Provider is responsible for providing and
maintaining the connection to the database.
 A DataProvider is a set of related components that work
together to provide data in an efficient and performance
driven manner.
Prepared By: Sajid Hussain
 The .NET Framework currently comes with two
DataProviders:
1- SQL Data Provider which is designed only to work with
Microsoft's SQL Server 7.0 or later.
2- OleDb DataProvider which allows us to connect to other
types of databases like Access and Oracle.
Prepared By: Sajid Hussain
Each DataProvider consists of the following component
classes: .
Connection object
Command object
DataReader object
DataAdapter object
Prepared By: Sajid Hussain
A connection object establishes the connection for the
application with the database
The command object provides direct execution of the
command to the database.
If the command returns more than a single value, the
command object returns a DataReader to provide the data
Alternatively, the DataAdapter can be used to fill the
Dataset object
 The database can be updated using the command object
or the DataAdapter
Prepared By: Sajid Hussain
Prepared By: Sajid Hussain
The Connection object creates the connection to the
database. Microsoft Visual Studio .NET provides two types
of Connection classes:
1-SqlConnection object: Designed specifically to connect
to Microsoft SQL Server 7.0 or later
2-OleDbConnection object: Provide connections to a wide
range of database types like Microsoft Access and Oracle.
 The Connection object contains all of the information
required to open a connection to the database
Prepared By: Sajid Hussain
The Command object is represented by two corresponding classes:
SqlCommand and OleDbCommand.
Command objects are used to execute commands to a database
across a data connection.
The Command objects can be used to execute stored procedures on
the database, SQL commands, or return complete tables directly.
 Command objects provide three methods that are used to execute
commands on the database:
1- ExecuteNonQuery: Executes commands that have no return values
such as INSERT, UPDATE or DELETE
2- ExecuteScalar: Returns a single value from a database query
3- ExecuteReader: Returns a result set by way of a DataReader
object
Prepared By: Sajid Hussain
The DataReader object provides a forward-only, read-only,
connected stream recordset from a database.
Unlike other components of the Data Provider, DataReader
objects cannot be directly instantiated. Rather, the
DataReader is returned as the result of the Command
object's ExecuteReader method.
 The SqlCommand.ExecuteReader method returns a
SqlDataReader object, and the
OleDbCommand.ExecuteReader method returns an
OleDbDataReader object.
Prepared By: Sajid Hussain
The DataReader can provide rows of data directly to
application logic when you do not need to keep the data
cached in memory.
Because only one row is in memory at a time, the
DataReader provides the lowest overhead in terms of
system performance but requires the exclusive use of an
open Connection object for the lifetime of the DataReader
Prepared By: Sajid Hussain
The DataAdapter is the class at the core of ADO .NET's
disconnected data access. It is essentially the middleman
facilitating all communication between the database and a
DataSet.
The DataAdapter is used either to fill a DataTable or DataSet
with data from the database with it's Fill method.
After the memory-resident data has been manipulated, the
DataAdapter can commit the changes to the database by
calling the Update method.
Prepared By: Sajid Hussain
 The DataAdapter provides four properties that represent database
commands:
1. SelectCommand
2. InsertCommand
3. DeleteCommand
4. UpdateCommand
When the Update method is called, changes in the DataSet are
copied
back to the database and the appropriate InsertCommand,
DeleteCommand, or UpdateCommand is executed
Prepared By: Sajid Hussain
System.Data
System.Data.Oledb
Sysetm.Data.SqlClient
System.XML
Prepared By: Sajid Hussain
Main data access library for ADO.NET
Prepared By: Sajid Hussain
It houses the components that provide access
via OLEDB provider
Prepared By: Sajid Hussain
It houses the data access components for SQL
Server
Prepared By: Sajid Hussain
This library contains XMLThis library contains XML
componentscomponents
Prepared By: Sajid Hussain
VB . NET ClientVB . NET Client Internet ExplorerInternet Explorer Any BrowserAny Browser
ApplicationApplication
ADO .NET ClassesADO .NET Classes
Managed ProvidersManaged Providers
SQL ClientSQL Client Ole DbOle Db
.NET Framework.NET Framework
OracleOracle
AccessAccess
DB/2DB/2
Data StoreData StoreSemi-StructuredSemi-Structured
datadata
Message StoreMessage Store
DocumentsDocuments
SQL dataSQL data
SQL ServerSQL Server
DataData

More Related Content

What's hot (20)

Asp.net.
Asp.net.Asp.net.
Asp.net.
Naveen Sihag
 
Php array
Php arrayPhp array
Php array
Nikul Shah
 
Procedures functions structures in VB.Net
Procedures  functions  structures in VB.NetProcedures  functions  structures in VB.Net
Procedures functions structures in VB.Net
tjunicornfx
 
JavaScript - Chapter 12 - Document Object Model
  JavaScript - Chapter 12 - Document Object Model  JavaScript - Chapter 12 - Document Object Model
JavaScript - Chapter 12 - Document Object Model
WebStackAcademy
 
SQLITE Android
SQLITE AndroidSQLITE Android
SQLITE Android
Sourabh Sahu
 
Floyd Warshall Algorithm
Floyd Warshall AlgorithmFloyd Warshall Algorithm
Floyd Warshall Algorithm
InteX Research Lab
 
Introduction of Html/css/js
Introduction of Html/css/jsIntroduction of Html/css/js
Introduction of Html/css/js
Knoldus Inc.
 
Chapter 06 constructors and destructors
Chapter 06 constructors and destructorsChapter 06 constructors and destructors
Chapter 06 constructors and destructors
Praveen M Jigajinni
 
software design principles
software design principlessoftware design principles
software design principles
Cristal Ngo
 
Queue ppt
Queue pptQueue ppt
Queue ppt
SouravKumar328
 
I/O Streams
I/O StreamsI/O Streams
I/O Streams
Ravi Chythanya
 
Dynamic method dispatch
Dynamic method dispatchDynamic method dispatch
Dynamic method dispatch
yugandhar vadlamudi
 
JAVA AWT
JAVA AWTJAVA AWT
JAVA AWT
shanmuga rajan
 
LR(1) and SLR(1) parsing
LR(1) and SLR(1) parsingLR(1) and SLR(1) parsing
LR(1) and SLR(1) parsing
R Islam
 
Linked stacks and queues
Linked stacks and queuesLinked stacks and queues
Linked stacks and queues
Ramzi Alqrainy
 
Java interfaces
Java interfacesJava interfaces
Java interfaces
Raja Sekhar
 
Form Handling using PHP
Form Handling using PHPForm Handling using PHP
Form Handling using PHP
Nisa Soomro
 
Python: Modules and Packages
Python: Modules and PackagesPython: Modules and Packages
Python: Modules and Packages
Damian T. Gordon
 
RichControl in Asp.net
RichControl in Asp.netRichControl in Asp.net
RichControl in Asp.net
Bhumivaghasiya
 
Target language in compiler design
Target language in compiler designTarget language in compiler design
Target language in compiler design
Muhammad Haroon
 
Procedures functions structures in VB.Net
Procedures  functions  structures in VB.NetProcedures  functions  structures in VB.Net
Procedures functions structures in VB.Net
tjunicornfx
 
JavaScript - Chapter 12 - Document Object Model
  JavaScript - Chapter 12 - Document Object Model  JavaScript - Chapter 12 - Document Object Model
JavaScript - Chapter 12 - Document Object Model
WebStackAcademy
 
Introduction of Html/css/js
Introduction of Html/css/jsIntroduction of Html/css/js
Introduction of Html/css/js
Knoldus Inc.
 
Chapter 06 constructors and destructors
Chapter 06 constructors and destructorsChapter 06 constructors and destructors
Chapter 06 constructors and destructors
Praveen M Jigajinni
 
software design principles
software design principlessoftware design principles
software design principles
Cristal Ngo
 
LR(1) and SLR(1) parsing
LR(1) and SLR(1) parsingLR(1) and SLR(1) parsing
LR(1) and SLR(1) parsing
R Islam
 
Linked stacks and queues
Linked stacks and queuesLinked stacks and queues
Linked stacks and queues
Ramzi Alqrainy
 
Form Handling using PHP
Form Handling using PHPForm Handling using PHP
Form Handling using PHP
Nisa Soomro
 
Python: Modules and Packages
Python: Modules and PackagesPython: Modules and Packages
Python: Modules and Packages
Damian T. Gordon
 
RichControl in Asp.net
RichControl in Asp.netRichControl in Asp.net
RichControl in Asp.net
Bhumivaghasiya
 
Target language in compiler design
Target language in compiler designTarget language in compiler design
Target language in compiler design
Muhammad Haroon
 

Viewers also liked (17)

Web based database application design using vb.net and sql server
Web based database application design using vb.net and sql serverWeb based database application design using vb.net and sql server
Web based database application design using vb.net and sql server
Ammara Arooj
 
Database Connection
Database ConnectionDatabase Connection
Database Connection
John Joseph San Juan
 
Data base connectivity and flex grid in vb
Data base connectivity and flex grid in vbData base connectivity and flex grid in vb
Data base connectivity and flex grid in vb
Amandeep Kaur
 
Insert, Edit, Delete pada VB 2010 dengan DB Mysql dan Crystal Report
Insert, Edit, Delete pada VB 2010 dengan DB Mysql dan Crystal ReportInsert, Edit, Delete pada VB 2010 dengan DB Mysql dan Crystal Report
Insert, Edit, Delete pada VB 2010 dengan DB Mysql dan Crystal Report
Rahmat Taufiq Sigit
 
Ajs 4 c
Ajs 4 cAjs 4 c
Ajs 4 c
Niit Care
 
Vb net xp_04
Vb net xp_04Vb net xp_04
Vb net xp_04
Niit Care
 
Ajs 3 a
Ajs 3 aAjs 3 a
Ajs 3 a
Niit Care
 
ADO CONTROLS - Database usage
ADO CONTROLS - Database usageADO CONTROLS - Database usage
ADO CONTROLS - Database usage
Muralidharan Radhakrishnan
 
Active x
Active xActive x
Active x
Karthick Suresh
 
ADO Controls - Database Usage from Exploring MS Visual Basic 6.0 Book
ADO Controls - Database Usage from Exploring MS Visual Basic 6.0 BookADO Controls - Database Usage from Exploring MS Visual Basic 6.0 Book
ADO Controls - Database Usage from Exploring MS Visual Basic 6.0 Book
Muralidharan Radhakrishnan
 
Visual basic 6
Visual basic 6Visual basic 6
Visual basic 6
allen cervantes
 
VB6 Using ADO Data Control
VB6 Using ADO Data ControlVB6 Using ADO Data Control
VB6 Using ADO Data Control
Notre Dame of Midsayap College
 
VISUAL BASIC .net data accesss vii
VISUAL BASIC .net data accesss viiVISUAL BASIC .net data accesss vii
VISUAL BASIC .net data accesss vii
argusacademy
 
Introduction to ADO.NET
Introduction to ADO.NETIntroduction to ADO.NET
Introduction to ADO.NET
rchakra
 
College Stationery Management System VB 6.0 and Microsoft Access Project
College Stationery Management System VB 6.0  and Microsoft Access ProjectCollege Stationery Management System VB 6.0  and Microsoft Access Project
College Stationery Management System VB 6.0 and Microsoft Access Project
Tushar Soni
 
Virtual base class
Virtual base classVirtual base class
Virtual base class
Tech_MX
 
State of the Word 2011
State of the Word 2011State of the Word 2011
State of the Word 2011
photomatt
 
Web based database application design using vb.net and sql server
Web based database application design using vb.net and sql serverWeb based database application design using vb.net and sql server
Web based database application design using vb.net and sql server
Ammara Arooj
 
Data base connectivity and flex grid in vb
Data base connectivity and flex grid in vbData base connectivity and flex grid in vb
Data base connectivity and flex grid in vb
Amandeep Kaur
 
Insert, Edit, Delete pada VB 2010 dengan DB Mysql dan Crystal Report
Insert, Edit, Delete pada VB 2010 dengan DB Mysql dan Crystal ReportInsert, Edit, Delete pada VB 2010 dengan DB Mysql dan Crystal Report
Insert, Edit, Delete pada VB 2010 dengan DB Mysql dan Crystal Report
Rahmat Taufiq Sigit
 
Vb net xp_04
Vb net xp_04Vb net xp_04
Vb net xp_04
Niit Care
 
ADO Controls - Database Usage from Exploring MS Visual Basic 6.0 Book
ADO Controls - Database Usage from Exploring MS Visual Basic 6.0 BookADO Controls - Database Usage from Exploring MS Visual Basic 6.0 Book
ADO Controls - Database Usage from Exploring MS Visual Basic 6.0 Book
Muralidharan Radhakrishnan
 
VISUAL BASIC .net data accesss vii
VISUAL BASIC .net data accesss viiVISUAL BASIC .net data accesss vii
VISUAL BASIC .net data accesss vii
argusacademy
 
Introduction to ADO.NET
Introduction to ADO.NETIntroduction to ADO.NET
Introduction to ADO.NET
rchakra
 
College Stationery Management System VB 6.0 and Microsoft Access Project
College Stationery Management System VB 6.0  and Microsoft Access ProjectCollege Stationery Management System VB 6.0  and Microsoft Access Project
College Stationery Management System VB 6.0 and Microsoft Access Project
Tushar Soni
 
Virtual base class
Virtual base classVirtual base class
Virtual base class
Tech_MX
 
State of the Word 2011
State of the Word 2011State of the Word 2011
State of the Word 2011
photomatt
 
Ad

Similar to Database programming in vb net (20)

Marmagna desai
Marmagna desaiMarmagna desai
Marmagna desai
jmsthakur
 
Unit4
Unit4Unit4
Unit4
Abha Damani
 
LECTURE 14 Data Access.pptx
LECTURE 14 Data Access.pptxLECTURE 14 Data Access.pptx
LECTURE 14 Data Access.pptx
AOmaAli
 
5.C#
5.C#5.C#
5.C#
Raghu nath
 
Ado .net
Ado .netAdo .net
Ado .net
Manish Singh
 
Chapter 4 event it theory programming.pptx
Chapter 4 event it theory programming.pptxChapter 4 event it theory programming.pptx
Chapter 4 event it theory programming.pptx
kmkkali41
 
the .NET Framework. It provides the claf
the .NET Framework. It provides the clafthe .NET Framework. It provides the claf
the .NET Framework. It provides the claf
TesfahunMaru1
 
Presentation on the ADO.NET framework in C#
Presentation on the ADO.NET framework in C#Presentation on the ADO.NET framework in C#
Presentation on the ADO.NET framework in C#
kittu57736
 
Ado.Net Architecture
Ado.Net ArchitectureAdo.Net Architecture
Ado.Net Architecture
Umar Farooq
 
Ado.net
Ado.netAdo.net
Ado.net
Iblesoft
 
Introduction to ado
Introduction to adoIntroduction to ado
Introduction to ado
Harman Bajwa
 
Ado
AdoAdo
Ado
actacademy
 
ADO.NET
ADO.NETADO.NET
ADO.NET
Wani Zahoor
 
ADO .Net
ADO .Net ADO .Net
ADO .Net
DrSonali Vyas
 
Lecture 6. ADO.NET Overview.
Lecture 6. ADO.NET Overview.Lecture 6. ADO.NET Overview.
Lecture 6. ADO.NET Overview.
Alexey Furmanov
 
Ado
AdoAdo
Ado
abhay singh
 
Chapter 3: ado.net
Chapter 3: ado.netChapter 3: ado.net
Chapter 3: ado.net
Ngeam Soly
 
Is2215 lecture7 lecturer_ado_intro
Is2215 lecture7 lecturer_ado_introIs2215 lecture7 lecturer_ado_intro
Is2215 lecture7 lecturer_ado_intro
dannygriff1
 
ADO architecture of XML andd Windows form
ADO architecture of XML andd Windows formADO architecture of XML andd Windows form
ADO architecture of XML andd Windows form
RamaSubramanian79
 
Ado.net
Ado.netAdo.net
Ado.net
pacatarpit
 
Marmagna desai
Marmagna desaiMarmagna desai
Marmagna desai
jmsthakur
 
LECTURE 14 Data Access.pptx
LECTURE 14 Data Access.pptxLECTURE 14 Data Access.pptx
LECTURE 14 Data Access.pptx
AOmaAli
 
Chapter 4 event it theory programming.pptx
Chapter 4 event it theory programming.pptxChapter 4 event it theory programming.pptx
Chapter 4 event it theory programming.pptx
kmkkali41
 
the .NET Framework. It provides the claf
the .NET Framework. It provides the clafthe .NET Framework. It provides the claf
the .NET Framework. It provides the claf
TesfahunMaru1
 
Presentation on the ADO.NET framework in C#
Presentation on the ADO.NET framework in C#Presentation on the ADO.NET framework in C#
Presentation on the ADO.NET framework in C#
kittu57736
 
Ado.Net Architecture
Ado.Net ArchitectureAdo.Net Architecture
Ado.Net Architecture
Umar Farooq
 
Introduction to ado
Introduction to adoIntroduction to ado
Introduction to ado
Harman Bajwa
 
Lecture 6. ADO.NET Overview.
Lecture 6. ADO.NET Overview.Lecture 6. ADO.NET Overview.
Lecture 6. ADO.NET Overview.
Alexey Furmanov
 
Chapter 3: ado.net
Chapter 3: ado.netChapter 3: ado.net
Chapter 3: ado.net
Ngeam Soly
 
Is2215 lecture7 lecturer_ado_intro
Is2215 lecture7 lecturer_ado_introIs2215 lecture7 lecturer_ado_intro
Is2215 lecture7 lecturer_ado_intro
dannygriff1
 
ADO architecture of XML andd Windows form
ADO architecture of XML andd Windows formADO architecture of XML andd Windows form
ADO architecture of XML andd Windows form
RamaSubramanian79
 
Ad

Recently uploaded (20)

Your startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean accountYour startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean account
angelo60207
 
Introduction to Typescript - GDG On Campus EUE
Introduction to Typescript - GDG On Campus EUEIntroduction to Typescript - GDG On Campus EUE
Introduction to Typescript - GDG On Campus EUE
Google Developer Group On Campus European Universities in Egypt
 
FCF- Getting Started in Cybersecurity 3.0
FCF- Getting Started in Cybersecurity 3.0FCF- Getting Started in Cybersecurity 3.0
FCF- Getting Started in Cybersecurity 3.0
RodrigoMori7
 
Down the Rabbit Hole – Solving 5 Training Roadblocks
Down the Rabbit Hole – Solving 5 Training RoadblocksDown the Rabbit Hole – Solving 5 Training Roadblocks
Down the Rabbit Hole – Solving 5 Training Roadblocks
Rustici Software
 
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdfcnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
AmirStern2
 
Data Virtualization: Bringing the Power of FME to Any Application
Data Virtualization: Bringing the Power of FME to Any ApplicationData Virtualization: Bringing the Power of FME to Any Application
Data Virtualization: Bringing the Power of FME to Any Application
Safe Software
 
ISOIEC 42005 Revolutionalises AI Impact Assessment.pptx
ISOIEC 42005 Revolutionalises AI Impact Assessment.pptxISOIEC 42005 Revolutionalises AI Impact Assessment.pptx
ISOIEC 42005 Revolutionalises AI Impact Assessment.pptx
AyilurRamnath1
 
6th Power Grid Model Meetup - 21 May 2025
6th Power Grid Model Meetup - 21 May 20256th Power Grid Model Meetup - 21 May 2025
6th Power Grid Model Meetup - 21 May 2025
DanBrown980551
 
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Impelsys Inc.
 
Soulmaite review - Find Real AI soulmate review
Soulmaite review - Find Real AI soulmate reviewSoulmaite review - Find Real AI soulmate review
Soulmaite review - Find Real AI soulmate review
Soulmaite
 
“How Qualcomm Is Powering AI-driven Multimedia at the Edge,” a Presentation f...
“How Qualcomm Is Powering AI-driven Multimedia at the Edge,” a Presentation f...“How Qualcomm Is Powering AI-driven Multimedia at the Edge,” a Presentation f...
“How Qualcomm Is Powering AI-driven Multimedia at the Edge,” a Presentation f...
Edge AI and Vision Alliance
 
Developing Schemas with FME and Excel - Peak of Data & AI 2025
Developing Schemas with FME and Excel - Peak of Data & AI 2025Developing Schemas with FME and Excel - Peak of Data & AI 2025
Developing Schemas with FME and Excel - Peak of Data & AI 2025
Safe Software
 
Oracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI ProfessionalOracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI Professional
VICTOR MAESTRE RAMIREZ
 
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc Webinar - 2025 Global Privacy SurveyTrustArc Webinar - 2025 Global Privacy Survey
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc
 
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdfvertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
AmirStern2
 
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
Jasper Oosterveld
 
Murdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementaryMurdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementary
JorgeSemperteguiMont
 
Trends Artificial Intelligence - Mary Meeker
Trends Artificial Intelligence - Mary MeekerTrends Artificial Intelligence - Mary Meeker
Trends Artificial Intelligence - Mary Meeker
Clive Dickens
 
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
Edge AI and Vision Alliance
 
Jeremy Millul - A Talented Software Developer
Jeremy Millul - A Talented Software DeveloperJeremy Millul - A Talented Software Developer
Jeremy Millul - A Talented Software Developer
Jeremy Millul
 
Your startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean accountYour startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean account
angelo60207
 
FCF- Getting Started in Cybersecurity 3.0
FCF- Getting Started in Cybersecurity 3.0FCF- Getting Started in Cybersecurity 3.0
FCF- Getting Started in Cybersecurity 3.0
RodrigoMori7
 
Down the Rabbit Hole – Solving 5 Training Roadblocks
Down the Rabbit Hole – Solving 5 Training RoadblocksDown the Rabbit Hole – Solving 5 Training Roadblocks
Down the Rabbit Hole – Solving 5 Training Roadblocks
Rustici Software
 
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdfcnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
AmirStern2
 
Data Virtualization: Bringing the Power of FME to Any Application
Data Virtualization: Bringing the Power of FME to Any ApplicationData Virtualization: Bringing the Power of FME to Any Application
Data Virtualization: Bringing the Power of FME to Any Application
Safe Software
 
ISOIEC 42005 Revolutionalises AI Impact Assessment.pptx
ISOIEC 42005 Revolutionalises AI Impact Assessment.pptxISOIEC 42005 Revolutionalises AI Impact Assessment.pptx
ISOIEC 42005 Revolutionalises AI Impact Assessment.pptx
AyilurRamnath1
 
6th Power Grid Model Meetup - 21 May 2025
6th Power Grid Model Meetup - 21 May 20256th Power Grid Model Meetup - 21 May 2025
6th Power Grid Model Meetup - 21 May 2025
DanBrown980551
 
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Impelsys Inc.
 
Soulmaite review - Find Real AI soulmate review
Soulmaite review - Find Real AI soulmate reviewSoulmaite review - Find Real AI soulmate review
Soulmaite review - Find Real AI soulmate review
Soulmaite
 
“How Qualcomm Is Powering AI-driven Multimedia at the Edge,” a Presentation f...
“How Qualcomm Is Powering AI-driven Multimedia at the Edge,” a Presentation f...“How Qualcomm Is Powering AI-driven Multimedia at the Edge,” a Presentation f...
“How Qualcomm Is Powering AI-driven Multimedia at the Edge,” a Presentation f...
Edge AI and Vision Alliance
 
Developing Schemas with FME and Excel - Peak of Data & AI 2025
Developing Schemas with FME and Excel - Peak of Data & AI 2025Developing Schemas with FME and Excel - Peak of Data & AI 2025
Developing Schemas with FME and Excel - Peak of Data & AI 2025
Safe Software
 
Oracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI ProfessionalOracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI Professional
VICTOR MAESTRE RAMIREZ
 
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc Webinar - 2025 Global Privacy SurveyTrustArc Webinar - 2025 Global Privacy Survey
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc
 
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdfvertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
AmirStern2
 
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
Jasper Oosterveld
 
Murdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementaryMurdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementary
JorgeSemperteguiMont
 
Trends Artificial Intelligence - Mary Meeker
Trends Artificial Intelligence - Mary MeekerTrends Artificial Intelligence - Mary Meeker
Trends Artificial Intelligence - Mary Meeker
Clive Dickens
 
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
Edge AI and Vision Alliance
 
Jeremy Millul - A Talented Software Developer
Jeremy Millul - A Talented Software DeveloperJeremy Millul - A Talented Software Developer
Jeremy Millul - A Talented Software Developer
Jeremy Millul
 

Database programming in vb net

  • 2. Prepared By: Sajid Hussain Data access is making the application interactData access is making the application interact with a database, where all the data is storedwith a database, where all the data is stored
  • 3. Prepared By: Sajid Hussain The first data access model, DAO (data access model) was created for local databases with the built-in Jet engine which had performance and functionality issues. Next came RDO (Remote Data Object) and ADO (Active Data Object) which were designed for Client Server architectures but soon ADO took over RDO.
  • 4. Prepared By: Sajid Hussain ADO was a good architecture but as the language changes so is the technology. With ADO, all the data is contained in a recordset object which had problems when implemented on the network and penetrating firewalls.  ADO was a connected data access, which means that when a connection to the database is established the connection remains open until the application is closed.  Leaving the connection open for the lifetime of the application raises concerns about database security and network traffic. 
  • 5. Prepared By: Sajid Hussain Also, as databases are becoming increasingly important and as they are serving more people, a connected data access model makes us think about its productivity. For example, an application with connected data access may do well when connected to two clients, the same may do poorly when connected to 10 and might be unusable when connected to 100 or more. Also, open database connections use system resources to a maximum extent making the system performance less effective. .
  • 6. Prepared By: Sajid Hussain VB .NET uses ADO .NET (Active X Data Object) as it's data access and manipulation protocol which also enables us to work with data on the Internet.
  • 7. Prepared By: Sajid Hussain ADO .NET interacts with databases by maintaining a disconnected database access model.  when an application interacts with the database, the connection is opened to serve the request of the application and is closed as soon as the request is completed. if a database is Updated, the connection is opened long enough to complete the Update operation and is closed.
  • 8. Prepared By: Sajid Hussain Connections are open for only a minimum period of time, ADO .NET conserves system resources and provides maximum security for databases and also has less impact on system performance. ADO .NET uses XML when interacting with  the database,  and converts all the data into XML format for database related operations making them more efficient
  • 9. Prepared By: Sajid Hussain Data Access in ADO.NET relies on two omponents: 1- DataSet 2- Data Provider
  • 10. Prepared By: Sajid Hussain The dataset is a disconnected, in-memory representation of data. It can be considered as a local copy of the relevant portions of the database. The DataSet is persisted in memory and the data in it can be manipulated and updated independent of the database. When the use of this DataSet is finished, changes can be made back to the central database for updating. The data in DataSet can be loaded from any valid data source like Microsoft SQL server database, an Oracle database or from a Microsoft Access database.
  • 11. Prepared By: Sajid Hussain The Data Provider is responsible for providing and maintaining the connection to the database.  A DataProvider is a set of related components that work together to provide data in an efficient and performance driven manner.
  • 12. Prepared By: Sajid Hussain  The .NET Framework currently comes with two DataProviders: 1- SQL Data Provider which is designed only to work with Microsoft's SQL Server 7.0 or later. 2- OleDb DataProvider which allows us to connect to other types of databases like Access and Oracle.
  • 13. Prepared By: Sajid Hussain Each DataProvider consists of the following component classes: . Connection object Command object DataReader object DataAdapter object
  • 14. Prepared By: Sajid Hussain A connection object establishes the connection for the application with the database The command object provides direct execution of the command to the database. If the command returns more than a single value, the command object returns a DataReader to provide the data Alternatively, the DataAdapter can be used to fill the Dataset object  The database can be updated using the command object or the DataAdapter
  • 16. Prepared By: Sajid Hussain The Connection object creates the connection to the database. Microsoft Visual Studio .NET provides two types of Connection classes: 1-SqlConnection object: Designed specifically to connect to Microsoft SQL Server 7.0 or later 2-OleDbConnection object: Provide connections to a wide range of database types like Microsoft Access and Oracle.  The Connection object contains all of the information required to open a connection to the database
  • 17. Prepared By: Sajid Hussain The Command object is represented by two corresponding classes: SqlCommand and OleDbCommand. Command objects are used to execute commands to a database across a data connection. The Command objects can be used to execute stored procedures on the database, SQL commands, or return complete tables directly.  Command objects provide three methods that are used to execute commands on the database: 1- ExecuteNonQuery: Executes commands that have no return values such as INSERT, UPDATE or DELETE 2- ExecuteScalar: Returns a single value from a database query 3- ExecuteReader: Returns a result set by way of a DataReader object
  • 18. Prepared By: Sajid Hussain The DataReader object provides a forward-only, read-only, connected stream recordset from a database. Unlike other components of the Data Provider, DataReader objects cannot be directly instantiated. Rather, the DataReader is returned as the result of the Command object's ExecuteReader method.  The SqlCommand.ExecuteReader method returns a SqlDataReader object, and the OleDbCommand.ExecuteReader method returns an OleDbDataReader object.
  • 19. Prepared By: Sajid Hussain The DataReader can provide rows of data directly to application logic when you do not need to keep the data cached in memory. Because only one row is in memory at a time, the DataReader provides the lowest overhead in terms of system performance but requires the exclusive use of an open Connection object for the lifetime of the DataReader
  • 20. Prepared By: Sajid Hussain The DataAdapter is the class at the core of ADO .NET's disconnected data access. It is essentially the middleman facilitating all communication between the database and a DataSet. The DataAdapter is used either to fill a DataTable or DataSet with data from the database with it's Fill method. After the memory-resident data has been manipulated, the DataAdapter can commit the changes to the database by calling the Update method.
  • 21. Prepared By: Sajid Hussain  The DataAdapter provides four properties that represent database commands: 1. SelectCommand 2. InsertCommand 3. DeleteCommand 4. UpdateCommand When the Update method is called, changes in the DataSet are copied back to the database and the appropriate InsertCommand, DeleteCommand, or UpdateCommand is executed
  • 22. Prepared By: Sajid Hussain System.Data System.Data.Oledb Sysetm.Data.SqlClient System.XML
  • 23. Prepared By: Sajid Hussain Main data access library for ADO.NET
  • 24. Prepared By: Sajid Hussain It houses the components that provide access via OLEDB provider
  • 25. Prepared By: Sajid Hussain It houses the data access components for SQL Server
  • 26. Prepared By: Sajid Hussain This library contains XMLThis library contains XML componentscomponents
  • 27. Prepared By: Sajid Hussain VB . NET ClientVB . NET Client Internet ExplorerInternet Explorer Any BrowserAny Browser ApplicationApplication ADO .NET ClassesADO .NET Classes Managed ProvidersManaged Providers SQL ClientSQL Client Ole DbOle Db .NET Framework.NET Framework OracleOracle AccessAccess DB/2DB/2 Data StoreData StoreSemi-StructuredSemi-Structured datadata Message StoreMessage Store DocumentsDocuments SQL dataSQL data SQL ServerSQL Server DataData