Presentation is loading. Please wait.

Presentation is loading. Please wait.

Relational Databases Database Driven Applications Retrieving Data Changing Data Analysing Data What is a DBMS An application that holds the data manages.

Similar presentations


Presentation on theme: "Relational Databases Database Driven Applications Retrieving Data Changing Data Analysing Data What is a DBMS An application that holds the data manages."— Presentation transcript:

1 Relational Databases Database Driven Applications Retrieving Data Changing Data Analysing Data What is a DBMS An application that holds the data manages the data allows us to access the data Access, Oracle, Sybase, MySQL Connect from VB to DBMS (Access) Using ADO/ODBC/OLEDB Can use ADO to connect to any DBMS that as an OLEDB interface

2 ODBC (Open Database Connectivity) is a standard Application Programming Interface (API) for accessing information from different database systems and different storage formats. The purpose of ODBC is to enable you to access a diverse selection of databases and data formats without having to learn the features and peculiarities of each. There is an ODBC driver for each popular database, which creates a database-independent environment. ODBC

3 OLEDB is Microsoft’s technology that allows applications to access data from multiple data providers. Any data source can be an OLE DB provider as long as the proper library routines allow low level access to the data. OLE DB is a standardized interface that allows the developer to use one set of programming tools to refer to data from any source. OLE DB

4 ActiveX Data Objects (ADO) is Microsoft’s latest database object model. The goal of ADO is to allow VB developers to use a standard set of objects to refer to any OLE DB source. ADO

5 Database -A container (usually a file or set of files) used to store organized data. Tables – A structured list of data of a specific type. Every table has a unique name. Fields –A field is a column in a table. A field contains a particular piece of information. All tables are made up of one or more fields. Fields have an associated data type. Records –Data in a table is stored in rows. The rows are called records. Database Definitions

6 Primary Key – A column or set or columns whose values uniquely identify every row in a table. To be a primary key a set of column or column must meet the following conditions: No two rows can have the same primary key value Every row must have a value in the Primary Key column (no Null values). Database Definitions

7 Customer Table

8 Field Record

9 Relationships

10 PK FK Primary Key – A column or set or columns whose values uniquely identify every row in a table. Foreign Key – A column in a table whose value must be listed in a primary key in another table or be null.

11 Schema Schema – Information about relationships and tables in a database.

12 What is SQL? SQL is a language designed specifically for communicating with databases. Advantages of SQL SQL is not a proprietary language. So multiple databases support SQL. Standard SQL is governed by the ANSI standards committee and I s called ANSI SQL, all major DBMS support ANSI SQL even if they have their own extensions. SQL is very powerful and also fairly simple. You will be able to perform very complex and sophisticated database operations by only knowing a few commands.

13 Relational Algebra Select – takes a horizontal subset of a table. Select retrieves certain rows that meet our user defined criteria. Project – takes a vertical subset of the table. Project retrieves only certain columns from a table) Join— Join allows us to pull together data from more than one table. The join forms a new table that contains the columns of both the tables. Rows are the concatenation of row from first table and row from second table.

14 Join

15 Rows in the joined table are the concatenation of row from first table and row from second table. Inner Join – only rows that have matching values in both table are included.

16 Outer Join Outer Join – all values from both tables included.


Download ppt "Relational Databases Database Driven Applications Retrieving Data Changing Data Analysing Data What is a DBMS An application that holds the data manages."

Similar presentations


Ads by Google