SlideShare a Scribd company logo
   ODBC: Open Database Connectivity
    ◦ A driver manager
    ◦ Used for relational databases
   OLE DB: The OLE database protocol
    ◦ Allows a program to access information in many
      types of data source.
    ◦ Data provider: databases, spreadsheets, etc.
   ADO.NET: ActiveX Data Objects
    ◦ An Interface for OLE DB.
    ◦ Allow programmers to use a standard set of
      objects to refer to any OLE DB data source.
   ADO.NET
   VB.NET uses ADO.NET (Active-X Data Objects with .NET
    technology), a database technology that supports connection to
    different database products. ADO.NET:
   ·      Provides the application programming interface between
    the program application and the Database Management System
    that manages the database. The current API is ADO.NET 4.
   ·      Stores and transfers data using the Extensible Markup
    Language (XML).
   ·      Provides four different types of connections to databases
    across networks:
   o SQLClient – used to connect to Microsoft's SQL Server DBMS.
   o OracleClient – used to connect to Oracle Corporation’s Oracle
    DBMS.
   o OLEDB (Object Linking and Embedding Database) – used to
    connect to all other database formats – this includes Microsoft
    Access DBMS.
   o ODBC (Open Database Connectivity) – used to connect to
    miscellaneous data sources.
   ADO.NET supports database access using forms
    developed for either a Windows or Web Form
    environment.
   ·      ADO.NET provides controls that you add to
    a form that are used to connect to and manage
    data in a database table. Columns from a
    database table are bound to database controls.
   ·      Controls you can bind include: Label,
    TextBox, and ComboBox controls as well as some
    new controls such as the DataGridView control.
.Net Applications



               ADO.Net

SQL Server             OLE DB
.Net Data Provider     .Net Data Provider




 SQL Server          OLE DB      OLE DB
 Data Source         Provider    Provider


                                 OLE DB
                     ODBC
                                 Data Source


                     ODBC
                     Data Source
   Concepts and Terminology
   Terminology – learn these terms:
   ·      Database – a special repository—consists
    of one or more physical files—used to store and
    retrieve data.
   ·      Relational database – a specific type of
    database where data rows are stored in separate
    tables, and the tables are related to each other by
    key values (see figures showing table data later
    in these notes).
   ·      Table – basic database object that stores
    data – looks like a spreadsheet when you're
    viewing data. This figure shows a Student table
    diagram from a Microsoft SQL Server database.
   Rows and Columns – a table consists of rows
    and columns.
     Row = a row is a record for an individual
    course or student.
     Column = a column is a field of data stored
    for each course such as CourseID, Title,
    Department, or for each student such as the
    StudentSSN, LastName, and FirstName.
      Key Column (Field) – uniquely identifies a
    row in a table – almost all database tables
    require one or more columns that form the
    key column(s) to identify rows uniquely –
    eliminates the occurrence of duplicate rows.
   Database Products – VB.NET stores and
    retrieves data for many different database
    products including, but not limited to:
      Oracle (by Oracle Corporation) and DB2 (by
    IBM) for large systems—these are competing
    relational database management systems.
      Microsoft SQL Server for mid-sized
    systems and larger scalable systems.
      Microsoft Access and other small-sized,
    individual user or small group systems.
   Entities and Relationships – a database stores
    data about individual entities in separate tables –
    example university database entities include
    Students, Courses, Enrollment (the enrollment of
    students in courses), and States.
   ·      This figure shows an entity-relationship
    diagram for tables in a Microsoft SQL Server
    version of the VB University database.
   Relationship – the lines
    connecting entities represent
    relationships between the rows
    in one table and rows in another
    table.
   One-to-many relationship – this
    is the relationship from rows in
    the Student table to rows in the
    Enrollment table (there can be
    multiple enrollments by students
    in a course).
   The key symbol represents the
    one side of the relationship; the
    infinity symbol represents the
    many side of the relationship.
   A student can have many
    enrollments, but an enrollment
    row belongs (is associated) to
    only one student row.
   The relationship from Course to Enrollment is also one-
    to-many – a course can have many enrollments.
   o There are other kinds of relationships that you will
    study in your course on database modeling and design.
   Primary Key Columns –table rows are uniquely identified
    by one or more primary key columns. Each table has a
    different primary key. In the above figure the primary
    key column for the various tables are:
   Student table key = StudentSSN (social security
    number).
   States table key = StateCode (2-character abbreviation
    for the state name).
   Course table key = CourseID (up to 7-characters
    identifying a course).
    Enrollment table key = CourseID + StudentSSN +
    TermCode + YearEnrolled (all four columns are required
    to uniquely identify a row in this table since students
    enroll in a course more than once. Terms are coded
   Connecting to a Database or Data Source with
    VB
   This figure shows the steps in setting up a
    connection to a database or other type of
    data source.
   Configure a binding source.
    The binding source links to a
    data source – a data source
    is usually a specific database
    file, but can be another data
    source such as an array or
    text file. Note: Your text
    erroneously states that the
    data source objects replaces
    the connection object used
    in earlier versions of VB –
    actually the data source
    object is used to configure
    the connection object – they
    are two different objects.
   Configure a table adapter. A table adapter
    handles data retrieval and updating. The
    table adapter creates a dataset.
   ·      Create a dataset. A dataset stores data
    rows that have been retrieved.
   ·      Add controls to the form and set
    properties of the controls to bind the controls
    to the columns of a specific table in the
    dataset.
   ·      VB will automatically write the code
    needed to fill a dataset.
   Databases Used for Class Projects
   For our projects, you may work at home or in the
    computer laboratory. We will use Microsoft Access
    – there are copies of the databases saved as
    Microsoft SQL Server version files for those of you
    who wish to experiment in using SQL Server.
   ·      MS Access databases are stored in a single
    file.
   o A MS Access database file is much smaller than
    the same data stored in MS SQL Server and is very
    portable.
   o You will learn to access data in the file through
    Visual Basic so you need not have Microsoft Office
    installed on your home computer.
   o The database files are named with a .mdb file
    name extension.
     MS SQL Server Express is a free version of
    this Microsoft DBMS.
   o The free Express version is downloadable
    from Microsoft.
   o SQL Server and VB make it easy to move
    small SQL Server databases along with your
    projects for testing. You will learn how to do
    this as part of the in-class exercise.
   o The database has at least two files – one is
    named with a .mdf filename extension and
    the accompany log file used for data recovery
    has a .ldf filename extension.
DATABASE EXERCISES
STUDENT
 SSN         Enrollmen       Course
 FirstName     t TABLE        Table
 LastName
              RegNo
 Mi
              SSN             CourseId
    Zip                       Title
 Telephone   CourseID
                              Departmen
 Email       DateEnrol         t
                ed
                              Units


              Click on referential Integrity
CourseId -
Title
Department
Units
Enrollmen
  t TABLE
RegNo
SSN
CourseID
DateEnrol
  ed
Enrollmen
  t TABLE
RegNo
SSN
CourseID
DateEnrol
  ed

More Related Content

What's hot

Object relational database management system
Object relational database management systemObject relational database management system
Object relational database management system
Saibee Alam
 
Oracle
OracleOracle
Sql Server Basics
Sql Server BasicsSql Server Basics
Sql Server Basics
rainynovember12
 
Unit 4 rdbms study_material
Unit 4  rdbms study_materialUnit 4  rdbms study_material
Unit 4 rdbms study_material
gayaramesh
 
RDMS AND SQL
RDMS AND SQLRDMS AND SQL
RDMS AND SQL
milanmehta7
 
Physical architecture of sql server
Physical architecture of sql serverPhysical architecture of sql server
Physical architecture of sql server
Divya Sharma
 
Ordbms
OrdbmsOrdbms
DBMS
DBMSDBMS
DBMS
emran nur
 
Structured query language(sql)ppt
Structured query language(sql)pptStructured query language(sql)ppt
Structured query language(sql)ppt
Gowarthini
 
Relational Database Fundamentals
Relational Database FundamentalsRelational Database Fundamentals
Relational Database Fundamentals
KHALID C
 
Data Mining with MS Access
Data Mining with MS AccessData Mining with MS Access
Data Mining with MS AccessDhatri Jain
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
MLG College of Learning, Inc
 
overview of database concept
overview of database conceptoverview of database concept
overview of database concept
gourav kottawar
 
Key database terms
Key database termsKey database terms
Key database termslistergc
 
Data base
Data baseData base
Data base
Girish Gowda
 
MS Access and Database Fundamentals
MS Access and Database FundamentalsMS Access and Database Fundamentals
MS Access and Database Fundamentals
Ananda Gupta
 
Introduction to database with ms access.hetvii
Introduction to database with ms access.hetviiIntroduction to database with ms access.hetvii
Introduction to database with ms access.hetvii
07HetviBhagat
 

What's hot (19)

Object relational database management system
Object relational database management systemObject relational database management system
Object relational database management system
 
Oracle
OracleOracle
Oracle
 
Sql Server Basics
Sql Server BasicsSql Server Basics
Sql Server Basics
 
Unit 4 rdbms study_material
Unit 4  rdbms study_materialUnit 4  rdbms study_material
Unit 4 rdbms study_material
 
RDMS AND SQL
RDMS AND SQLRDMS AND SQL
RDMS AND SQL
 
Physical architecture of sql server
Physical architecture of sql serverPhysical architecture of sql server
Physical architecture of sql server
 
Ordbms
OrdbmsOrdbms
Ordbms
 
DBMS
DBMSDBMS
DBMS
 
Sql basics
Sql basicsSql basics
Sql basics
 
Relational databases
Relational databasesRelational databases
Relational databases
 
Structured query language(sql)ppt
Structured query language(sql)pptStructured query language(sql)ppt
Structured query language(sql)ppt
 
Relational Database Fundamentals
Relational Database FundamentalsRelational Database Fundamentals
Relational Database Fundamentals
 
Data Mining with MS Access
Data Mining with MS AccessData Mining with MS Access
Data Mining with MS Access
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
 
overview of database concept
overview of database conceptoverview of database concept
overview of database concept
 
Key database terms
Key database termsKey database terms
Key database terms
 
Data base
Data baseData base
Data base
 
MS Access and Database Fundamentals
MS Access and Database FundamentalsMS Access and Database Fundamentals
MS Access and Database Fundamentals
 
Introduction to database with ms access.hetvii
Introduction to database with ms access.hetviiIntroduction to database with ms access.hetvii
Introduction to database with ms access.hetvii
 

Viewers also liked

Array y Objects C#
Array y Objects C#Array y Objects C#
Array y Objects C#
Manuel Antonio
 
c# training | c# training videos | c# object oriented programming | c# course
c# training | c# training videos | c# object oriented programming | c# coursec# training | c# training videos | c# object oriented programming | c# course
c# training | c# training videos | c# object oriented programming | c# course
Nancy Thomas
 
Object Oriented Programming with C#
Object Oriented Programming with C#Object Oriented Programming with C#
Object Oriented Programming with C#
foreverredpb
 
Abstraction and Encapsulation
Abstraction and EncapsulationAbstraction and Encapsulation
Abstraction and Encapsulation
Cheezy Code
 
Classes and Objects In C# With Example
Classes and Objects In C# With ExampleClasses and Objects In C# With Example
Classes and Objects In C# With Example
Cheezy Code
 
Learn Concept of Class and Object in C# Part 3
Learn Concept of Class and Object in C#  Part 3Learn Concept of Class and Object in C#  Part 3
Learn Concept of Class and Object in C# Part 3
C# Learning Classes
 

Viewers also liked (7)

Array y Objects C#
Array y Objects C#Array y Objects C#
Array y Objects C#
 
c# training | c# training videos | c# object oriented programming | c# course
c# training | c# training videos | c# object oriented programming | c# coursec# training | c# training videos | c# object oriented programming | c# course
c# training | c# training videos | c# object oriented programming | c# course
 
Object Oriented Programming with C#
Object Oriented Programming with C#Object Oriented Programming with C#
Object Oriented Programming with C#
 
Abstraction and Encapsulation
Abstraction and EncapsulationAbstraction and Encapsulation
Abstraction and Encapsulation
 
Objects and Types C#
Objects and Types C#Objects and Types C#
Objects and Types C#
 
Classes and Objects In C# With Example
Classes and Objects In C# With ExampleClasses and Objects In C# With Example
Classes and Objects In C# With Example
 
Learn Concept of Class and Object in C# Part 3
Learn Concept of Class and Object in C#  Part 3Learn Concept of Class and Object in C#  Part 3
Learn Concept of Class and Object in C# Part 3
 

Similar to Databases

WEB_DATABASE_chapter_4.pptx
WEB_DATABASE_chapter_4.pptxWEB_DATABASE_chapter_4.pptx
WEB_DATABASE_chapter_4.pptx
Koteswari Kasireddy
 
COMPUTERS Database
COMPUTERS Database COMPUTERS Database
COMPUTERS Database
Rc Os
 
Bca examination 2015 dbms
Bca examination 2015 dbmsBca examination 2015 dbms
Bca examination 2015 dbms
Anjaan Gajendra
 
NOSQL and MongoDB Database
NOSQL and MongoDB DatabaseNOSQL and MongoDB Database
NOSQL and MongoDB Database
Tariqul islam
 
DATABASE MANAGEMENT SYSTEM-MRS. LAXMI B PANDYA FOR 25TH AUGUST,2022.pptx
DATABASE MANAGEMENT SYSTEM-MRS. LAXMI B PANDYA FOR 25TH AUGUST,2022.pptxDATABASE MANAGEMENT SYSTEM-MRS. LAXMI B PANDYA FOR 25TH AUGUST,2022.pptx
DATABASE MANAGEMENT SYSTEM-MRS. LAXMI B PANDYA FOR 25TH AUGUST,2022.pptx
Laxmi Pandya
 
data base system to new data science lerne
data base system to new data science lernedata base system to new data science lerne
data base system to new data science lerne
tarunprajapati0t
 
Database Systems Concepts, 5th Ed
Database Systems Concepts, 5th EdDatabase Systems Concepts, 5th Ed
Database Systems Concepts, 5th Ed
Daniel Francisco Tamayo
 
PP DBMS - 1 (1).pptx
PP DBMS - 1 (1).pptxPP DBMS - 1 (1).pptx
PP DBMS - 1 (1).pptx
skilljiolms
 
PP DBMS - 1 (2).pptx
PP DBMS - 1 (2).pptxPP DBMS - 1 (2).pptx
PP DBMS - 1 (2).pptx
skilljiolms
 
PP DBMS - 1 (1).pptx
PP DBMS - 1 (1).pptxPP DBMS - 1 (1).pptx
PP DBMS - 1 (1).pptx
skilljiolms
 
Introduction to ms access database
Introduction to ms access databaseIntroduction to ms access database
Introduction to ms access database
Obuasi Senior High Technical School
 
DATABASE MANAGEMENT SYSTEM
DATABASE MANAGEMENT SYSTEMDATABASE MANAGEMENT SYSTEM
DATABASE MANAGEMENT SYSTEM
Mahmud Hasan Tanvir
 
Database Management System, Lecture-1
Database Management System, Lecture-1Database Management System, Lecture-1
Database Management System, Lecture-1
Sonia Mim
 
Session x(ado.net)
Session x(ado.net)Session x(ado.net)
Session x(ado.net)
Shrijan Tiwari
 
Dbms Lec Uog 02
Dbms Lec Uog 02Dbms Lec Uog 02
Dbms Lec Uog 02smelltulip
 
SQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics CoveredSQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics Covered
Danish Mehraj
 
Database fundamentals
Database fundamentalsDatabase fundamentals
Database fundamentals
Then Murugeshwari
 
No sq lv2
No sq lv2No sq lv2
No sq lv2
Nusrat Sharmin
 

Similar to Databases (20)

WEB_DATABASE_chapter_4.pptx
WEB_DATABASE_chapter_4.pptxWEB_DATABASE_chapter_4.pptx
WEB_DATABASE_chapter_4.pptx
 
COMPUTERS Database
COMPUTERS Database COMPUTERS Database
COMPUTERS Database
 
Bca examination 2015 dbms
Bca examination 2015 dbmsBca examination 2015 dbms
Bca examination 2015 dbms
 
NOSQL and MongoDB Database
NOSQL and MongoDB DatabaseNOSQL and MongoDB Database
NOSQL and MongoDB Database
 
DATABASE MANAGEMENT SYSTEM-MRS. LAXMI B PANDYA FOR 25TH AUGUST,2022.pptx
DATABASE MANAGEMENT SYSTEM-MRS. LAXMI B PANDYA FOR 25TH AUGUST,2022.pptxDATABASE MANAGEMENT SYSTEM-MRS. LAXMI B PANDYA FOR 25TH AUGUST,2022.pptx
DATABASE MANAGEMENT SYSTEM-MRS. LAXMI B PANDYA FOR 25TH AUGUST,2022.pptx
 
data base system to new data science lerne
data base system to new data science lernedata base system to new data science lerne
data base system to new data science lerne
 
Database Systems Concepts, 5th Ed
Database Systems Concepts, 5th EdDatabase Systems Concepts, 5th Ed
Database Systems Concepts, 5th Ed
 
PP DBMS - 1 (1).pptx
PP DBMS - 1 (1).pptxPP DBMS - 1 (1).pptx
PP DBMS - 1 (1).pptx
 
PP DBMS - 1 (2).pptx
PP DBMS - 1 (2).pptxPP DBMS - 1 (2).pptx
PP DBMS - 1 (2).pptx
 
PP DBMS - 1 (1).pptx
PP DBMS - 1 (1).pptxPP DBMS - 1 (1).pptx
PP DBMS - 1 (1).pptx
 
Introduction to ms access database
Introduction to ms access databaseIntroduction to ms access database
Introduction to ms access database
 
DATABASE MANAGEMENT SYSTEM
DATABASE MANAGEMENT SYSTEMDATABASE MANAGEMENT SYSTEM
DATABASE MANAGEMENT SYSTEM
 
Presentation1
Presentation1Presentation1
Presentation1
 
Database Management System, Lecture-1
Database Management System, Lecture-1Database Management System, Lecture-1
Database Management System, Lecture-1
 
Ch10
Ch10Ch10
Ch10
 
Session x(ado.net)
Session x(ado.net)Session x(ado.net)
Session x(ado.net)
 
Dbms Lec Uog 02
Dbms Lec Uog 02Dbms Lec Uog 02
Dbms Lec Uog 02
 
SQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics CoveredSQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics Covered
 
Database fundamentals
Database fundamentalsDatabase fundamentals
Database fundamentals
 
No sq lv2
No sq lv2No sq lv2
No sq lv2
 

More from John Joseph San Juan (7)

Consciousness
ConsciousnessConsciousness
Consciousness
 
2nd normal form
2nd normal form2nd normal form
2nd normal form
 
1st normal form
1st normal form1st normal form
1st normal form
 
Database Connection
Database ConnectionDatabase Connection
Database Connection
 
Land Pollution
Land PollutionLand Pollution
Land Pollution
 
Software Vendor (Norton Anti-Virus)
Software Vendor (Norton Anti-Virus)Software Vendor (Norton Anti-Virus)
Software Vendor (Norton Anti-Virus)
 
Consciousness
ConsciousnessConsciousness
Consciousness
 

Recently uploaded

Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
bennyroshan06
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
Col Mukteshwar Prasad
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
Fundacja Rozwoju Społeczeństwa Przedsiębiorczego
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
PedroFerreira53928
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 

Recently uploaded (20)

Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 

Databases

  • 1.
  • 2. ODBC: Open Database Connectivity ◦ A driver manager ◦ Used for relational databases  OLE DB: The OLE database protocol ◦ Allows a program to access information in many types of data source. ◦ Data provider: databases, spreadsheets, etc.  ADO.NET: ActiveX Data Objects ◦ An Interface for OLE DB. ◦ Allow programmers to use a standard set of objects to refer to any OLE DB data source.
  • 3. ADO.NET  VB.NET uses ADO.NET (Active-X Data Objects with .NET technology), a database technology that supports connection to different database products. ADO.NET:  · Provides the application programming interface between the program application and the Database Management System that manages the database. The current API is ADO.NET 4.  · Stores and transfers data using the Extensible Markup Language (XML).  · Provides four different types of connections to databases across networks:  o SQLClient – used to connect to Microsoft's SQL Server DBMS.  o OracleClient – used to connect to Oracle Corporation’s Oracle DBMS.  o OLEDB (Object Linking and Embedding Database) – used to connect to all other database formats – this includes Microsoft Access DBMS.  o ODBC (Open Database Connectivity) – used to connect to miscellaneous data sources.
  • 4. ADO.NET supports database access using forms developed for either a Windows or Web Form environment.  · ADO.NET provides controls that you add to a form that are used to connect to and manage data in a database table. Columns from a database table are bound to database controls.  · Controls you can bind include: Label, TextBox, and ComboBox controls as well as some new controls such as the DataGridView control.
  • 5. .Net Applications ADO.Net SQL Server OLE DB .Net Data Provider .Net Data Provider SQL Server OLE DB OLE DB Data Source Provider Provider OLE DB ODBC Data Source ODBC Data Source
  • 6. Concepts and Terminology  Terminology – learn these terms:  · Database – a special repository—consists of one or more physical files—used to store and retrieve data.  · Relational database – a specific type of database where data rows are stored in separate tables, and the tables are related to each other by key values (see figures showing table data later in these notes).  · Table – basic database object that stores data – looks like a spreadsheet when you're viewing data. This figure shows a Student table diagram from a Microsoft SQL Server database.
  • 7.
  • 8. Rows and Columns – a table consists of rows and columns.  Row = a row is a record for an individual course or student.  Column = a column is a field of data stored for each course such as CourseID, Title, Department, or for each student such as the StudentSSN, LastName, and FirstName.  Key Column (Field) – uniquely identifies a row in a table – almost all database tables require one or more columns that form the key column(s) to identify rows uniquely – eliminates the occurrence of duplicate rows.
  • 9. Database Products – VB.NET stores and retrieves data for many different database products including, but not limited to:  Oracle (by Oracle Corporation) and DB2 (by IBM) for large systems—these are competing relational database management systems.  Microsoft SQL Server for mid-sized systems and larger scalable systems.  Microsoft Access and other small-sized, individual user or small group systems.
  • 10. Entities and Relationships – a database stores data about individual entities in separate tables – example university database entities include Students, Courses, Enrollment (the enrollment of students in courses), and States.  · This figure shows an entity-relationship diagram for tables in a Microsoft SQL Server version of the VB University database.
  • 11. Relationship – the lines connecting entities represent relationships between the rows in one table and rows in another table.  One-to-many relationship – this is the relationship from rows in the Student table to rows in the Enrollment table (there can be multiple enrollments by students in a course).  The key symbol represents the one side of the relationship; the infinity symbol represents the many side of the relationship.  A student can have many enrollments, but an enrollment row belongs (is associated) to only one student row.
  • 12. The relationship from Course to Enrollment is also one- to-many – a course can have many enrollments.  o There are other kinds of relationships that you will study in your course on database modeling and design.  Primary Key Columns –table rows are uniquely identified by one or more primary key columns. Each table has a different primary key. In the above figure the primary key column for the various tables are:  Student table key = StudentSSN (social security number).  States table key = StateCode (2-character abbreviation for the state name).  Course table key = CourseID (up to 7-characters identifying a course).  Enrollment table key = CourseID + StudentSSN + TermCode + YearEnrolled (all four columns are required to uniquely identify a row in this table since students enroll in a course more than once. Terms are coded
  • 13. Connecting to a Database or Data Source with VB  This figure shows the steps in setting up a connection to a database or other type of data source.
  • 14. Configure a binding source. The binding source links to a data source – a data source is usually a specific database file, but can be another data source such as an array or text file. Note: Your text erroneously states that the data source objects replaces the connection object used in earlier versions of VB – actually the data source object is used to configure the connection object – they are two different objects.
  • 15. Configure a table adapter. A table adapter handles data retrieval and updating. The table adapter creates a dataset.  · Create a dataset. A dataset stores data rows that have been retrieved.  · Add controls to the form and set properties of the controls to bind the controls to the columns of a specific table in the dataset.  · VB will automatically write the code needed to fill a dataset.
  • 16. Databases Used for Class Projects  For our projects, you may work at home or in the computer laboratory. We will use Microsoft Access – there are copies of the databases saved as Microsoft SQL Server version files for those of you who wish to experiment in using SQL Server.  · MS Access databases are stored in a single file.  o A MS Access database file is much smaller than the same data stored in MS SQL Server and is very portable.  o You will learn to access data in the file through Visual Basic so you need not have Microsoft Office installed on your home computer.  o The database files are named with a .mdb file name extension.
  • 17. MS SQL Server Express is a free version of this Microsoft DBMS.  o The free Express version is downloadable from Microsoft.  o SQL Server and VB make it easy to move small SQL Server databases along with your projects for testing. You will learn how to do this as part of the in-class exercise.  o The database has at least two files – one is named with a .mdf filename extension and the accompany log file used for data recovery has a .ldf filename extension.
  • 19. STUDENT  SSN Enrollmen Course  FirstName t TABLE Table  LastName RegNo  Mi SSN CourseId Zip Title  Telephone CourseID Departmen  Email DateEnrol t ed Units Click on referential Integrity
  • 21. Enrollmen t TABLE RegNo SSN CourseID DateEnrol ed
  • 22. Enrollmen t TABLE RegNo SSN CourseID DateEnrol ed