SlideShare a Scribd company logo
1 of 22
   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 systemSaibee Alam
 
Unit 4 rdbms study_material
Unit 4  rdbms study_materialUnit 4  rdbms study_material
Unit 4 rdbms study_materialgayaramesh
 
Physical architecture of sql server
Physical architecture of sql serverPhysical architecture of sql server
Physical architecture of sql serverDivya Sharma
 
Structured query language(sql)ppt
Structured query language(sql)pptStructured query language(sql)ppt
Structured query language(sql)pptGowarthini
 
Relational Database Fundamentals
Relational Database FundamentalsRelational Database Fundamentals
Relational Database FundamentalsKHALID C
 
Data Mining with MS Access
Data Mining with MS AccessData Mining with MS Access
Data Mining with MS AccessDhatri Jain
 
overview of database concept
overview of database conceptoverview of database concept
overview of database conceptgourav kottawar
 
Key database terms
Key database termsKey database terms
Key database termslistergc
 
MS Access and Database Fundamentals
MS Access and Database FundamentalsMS Access and Database Fundamentals
MS Access and Database FundamentalsAnanda 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.hetvii07HetviBhagat
 

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

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# courseNancy 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 EncapsulationCheezy 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 ExampleCheezy 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 3C# 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

COMPUTERS Database
COMPUTERS Database COMPUTERS Database
COMPUTERS Database Rc Os
 
Bca examination 2015 dbms
Bca examination 2015 dbmsBca examination 2015 dbms
Bca examination 2015 dbmsAnjaan Gajendra
 
NOSQL and MongoDB Database
NOSQL and MongoDB DatabaseNOSQL and MongoDB Database
NOSQL and MongoDB DatabaseTariqul 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.pptxLaxmi 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 lernetarunprajapati0t
 
PP DBMS - 1 (2).pptx
PP DBMS - 1 (2).pptxPP DBMS - 1 (2).pptx
PP DBMS - 1 (2).pptxskilljiolms
 
PP DBMS - 1 (1).pptx
PP DBMS - 1 (1).pptxPP DBMS - 1 (1).pptx
PP DBMS - 1 (1).pptxskilljiolms
 
PP DBMS - 1 (1).pptx
PP DBMS - 1 (1).pptxPP DBMS - 1 (1).pptx
PP DBMS - 1 (1).pptxskilljiolms
 
Database Management System, Lecture-1
Database Management System, Lecture-1Database Management System, Lecture-1
Database Management System, Lecture-1Sonia Mim
 
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 CoveredDanish Mehraj
 

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 (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
 
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

Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 

Recently uploaded (20)

Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 

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