• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
CIS 145 Test Review
 
  • 1,289 views

 

Statistics

Views

Total Views
1,289
Views on SlideShare
1,091
Embed Views
198

Actions

Likes
0
Downloads
17
Comments
0

2 Embeds 198

http://rriness.spscc.edu 197
http://www.slideshare.net 1

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    CIS 145 Test Review CIS 145 Test Review Presentation Transcript

    • Test 2 Review
      CIS-145
    • Relational Databases
      Have more than one table where tables are related to each other
      One to one
      One to many
      Many to many
      A combination of fields may be used for the table’s primary key
    • One to Many Relationships
      Each table contains data about a specific subject (customers, loans)
      Each table on the ‘one’ side has a primary key
      Primary key of the “one” table is a foreign key in the many table
    • Many to Many Relationships
      Two tables are related, but can have many records in each table in common
      One student can attend many courses; one course can be attended by many students
      Implement a many to many relationship by creating a pair of one to many relationships with a third table
      Third table is often referred to as a “join” or “junction” table
      Entries in the join table point to rows in the original tables
    • Foreign Key
      A foreign key points to a record in another table
      Foreign key “looks like” the related primary key
      Same number of fields
      Data types for each field must match
      Field names don’t matter
    • Referential Integrity
      Makes sure that the records in related tables are consistent
      Must have a customer in the customer table for an order assigned to that customer
      Avoids “orphans”
      Cannot delete a record or change the primary key in the one table when associated records are in the many table, unless have cascade delete and cascade update enabled
    • Editing Data
      Making new entries, changing existing entries, and deleting rows are all affected by referential integrity
      A customer can be added at any time
      Must have a customer before a loan can be entered and associated with a customer
      Referential integrity doesn’t require entry into a foreign key
      Can delete a loan at any time, but can only delete a customer if they don’t have any loans (assuming no cascade delete)
    • Cascading Changes
      When referential integrity is enforced can choose to include Cascade Update and/or Cascade Delete
      Cascade update passes changes to the primary key of the “one” table to the related rows in the “many” table
      Cascade delete removes rows from the “many” table when a primary key (row) is deleted from the “one” table
    • Relationships Window
      Where relationships between tables are created and defined
      Related fields must have the same data type
      Autonumber is related to number field with long integer field size
      The one table has a 1 next to it; the many has a  next to it
    • Autolookup Queries
      Use queries to automatically look up data from related tables
      Must contain the foreign key from the many table
      Can add, change or delete data in the source tables