Presentation is loading. Please wait.

Presentation is loading. Please wait.

Data Access Data Retrieval and Query Fundamentals.

Similar presentations


Presentation on theme: "Data Access Data Retrieval and Query Fundamentals."— Presentation transcript:

1 Data Access Data Retrieval and Query Fundamentals

2 Relational Data Model zRelations zRelationships zOperations z Table z Foreign Keys z SQL or Query by Example

3 Tables zEach table represents a person, place, or concept about which we store data. zEach row represents a unique occurrence. Rows cannot be duplicates. zEach column is an atomic attribute. Only one value per column.

4 Tables Data depends on the key, the whole key, and nothing but the key. zIdentify a primary key for each table zIf an attribute (or group of attributes) has multiple values, create a new table for it. zStore data about each entity in its own separate table.

5 Relationships zModel each 1:M relationship as a foreign key in the many file. zModel each M:N relationship as a link file with keys from both associated files.

6 Participation ( Rules for Maintaining Relationships ) zReferential Integrity zCascade Delete Update

7 Relational Operations zSelect Choose rows for display zProject Choose columns for display zJoin Connect rows from different tables zAppend Attach additional rows to a table

8 Select

9 Project

10 Join (Natural Join on X)

11 Join (Outer Join on X)

12 Append

13 Efficiency zIndexes zJoins and denormalization zPartitions zExtracts and samples

14 Structured Query Language) zA standard query language for relational databases proposed by ANSI (American National Standards Institute) in 1986 zHas become the standard for relational databases. zSupported by many network and hierarchical databases as well.

15 COMPONENTS OF SQL zDATA DEFINITION: Create tables and views and specify constraints. zDATA MANIPULATION: Extract data from tables and organize displays. zDATA MODIFICATION: Add and modify data in existing tables. zTRANSACTION INTEGRITY: Maintain the relationships among data in multiple table operations.

16 THE BASIC SELECT STATEMENT The basic syntax for data retrieval in the SQL Relational Calculus is: SELECT columns FROM tables WHERE row conditions ORDER BY columns GROUP BY columns for control breaks HAVING group conditions

17 Processing Issues zSecurity zIntegrity zConcurrency zTransaction control Data warehouse principles try to avoid these issues by creating read-only databases.


Download ppt "Data Access Data Retrieval and Query Fundamentals."

Similar presentations


Ads by Google