1 / 20

Welcome

Welcome. Nineteenth Lecture for ITEC 1010 3.0 A Professor G.E. Denzel. Go over some of the exam questions Review (again) material from Lecture 7 on relational databases. Go into more depth on some of the basics around relational databases.

lydie
Download Presentation

Welcome

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. Welcome Nineteenth Lecture for ITEC 1010 3.0 A Professor G.E. Denzel

  2. Go over some of the exam questions Review (again) material from Lecture 7 on relational databases. Go into more depth on some of the basics around relational databases. Emphasize that using MS Access to do the assignment requires going through the tutorials. Agenda

  3. Relational Data Model • Relational data model • All data elements are placed in two-dimensional tables, called relations, that are the logical equivalent of files Schematic

  4. Data Table 2: Department Table Data Table 1: Project Table Data Table 3: Manager Table

  5. Relational Database Terminology • Selecting • Data manipulation that eliminates rows according to certain criteria • Projecting • Data manipulation that eliminates columns in a table • Joining • Data manipulation that combines two or more tables • Linked • Related tables in a relational database together

  6. Linking Data Tables to Answer an Inquiry Schematic

  7. Relational Database Terminology • Relation <==> Table <==> Entity • Tuple <==> Row <==> Record • Attribute <==> Column <==> Field • Primary Key is one or more columns whose values together uniquely identify a row in a table • Normalization is the process of making the structure and contents of a database comply with some level of the Normal Form hierarchy (usually only the first three levels, but there are (at least) seven layers of increasing stringency.)

  8. Relational Database Terminology • Why Normalization? • Ensure data consistency and stability • Minimize data redundancy • Ensure consistent updatability and maintainability of data • Avoid update/delete anomalies which result in ambiguous data or inconsistent results

  9. Relational Database Terminology • What is a “good” way to store data?

  10. Themes(What is wrong with this table?) • Recreation

  11. Parent-child (master-detail) • ACTIVITY-FEE

  12. STUDENT-ACTIVITY Plus “relationships”

  13. It could be worse! • Recreation

  14. Principles of a “proper” table • Property 1: Entries in columns are single-valued (atomic). • Property 2: Entries in columns are of the same kind. • Property 3: Each row is unique. • Property 4: Sequence of columns is insignificant. • Property 5: Sequence of rows is insignificant. • Property 6: Each column has a unique name.

  15. RECREATION

  16. A Better Key • STUDENT-ID

  17. First Normal Form • Reduce entities to first normal form (1NF) by removing repeating or multivalued attributes to another, child entity.

  18. Second Normal Form • Reduce first normal form entities to second normal form (2NF) by removing attributes that are not dependent on the whole primary key.

  19. For more examples • http://www.15seconds.com/issue/020522.htm

More Related