1 / 16

Relational Databases

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

shyla
Download Presentation

Relational Databases

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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

  3. OLE DB 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.

  4. ADO 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.

  5. Database Definitions 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.

  6. Database Definitions • 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).

  7. Customer Table

  8. Customer Table Field Record

  9. Relationships

  10. Relationships 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. Join 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.

More Related