SlideShare ist ein Scribd-Unternehmen logo
1 von 10
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

Weitere ähnliche Inhalte

Was ist angesagt?

Veterinary Nursing - Literature Searching
Veterinary Nursing - Literature SearchingVeterinary Nursing - Literature Searching
Veterinary Nursing - Literature Searching
Jamie Halstead
 

Was ist angesagt? (15)

Joining
JoiningJoining
Joining
 
SQL Joins
SQL JoinsSQL Joins
SQL Joins
 
IBM SPSS Statistics Interface - Navigation
IBM SPSS Statistics Interface - NavigationIBM SPSS Statistics Interface - Navigation
IBM SPSS Statistics Interface - Navigation
 
Worksheet and workbooks linking
Worksheet and workbooks linkingWorksheet and workbooks linking
Worksheet and workbooks linking
 
Basics of excel for medical profession
Basics of excel for medical professionBasics of excel for medical profession
Basics of excel for medical profession
 
Oracle Fusion Cloud HCM value sets
Oracle Fusion Cloud HCM value setsOracle Fusion Cloud HCM value sets
Oracle Fusion Cloud HCM value sets
 
conditional formatting
conditional formattingconditional formatting
conditional formatting
 
Fundamental of SPSS
Fundamental of SPSSFundamental of SPSS
Fundamental of SPSS
 
3 summary
3 summary3 summary
3 summary
 
How to merge and combine rows without losing data in excel
How to merge and combine rows without losing data in excelHow to merge and combine rows without losing data in excel
How to merge and combine rows without losing data in excel
 
Sql joins
Sql joinsSql joins
Sql joins
 
Veterinary Nursing - Literature Searching
Veterinary Nursing - Literature SearchingVeterinary Nursing - Literature Searching
Veterinary Nursing - Literature Searching
 
Ibm spss statistics 19 brief guide
Ibm spss statistics 19 brief guideIbm spss statistics 19 brief guide
Ibm spss statistics 19 brief guide
 
In press checking with crossref API
In press checking with crossref APIIn press checking with crossref API
In press checking with crossref API
 
Sql
SqlSql
Sql
 

Andere mochten auch (7)

6 integrity and security
6 integrity and security6 integrity and security
6 integrity and security
 
Lesson Five Building Table Relationships
Lesson Five   Building Table RelationshipsLesson Five   Building Table Relationships
Lesson Five Building Table Relationships
 
Normalisation
NormalisationNormalisation
Normalisation
 
Database Validation
Database ValidationDatabase Validation
Database Validation
 
18 database features
18 database features18 database features
18 database features
 
Normalisation
NormalisationNormalisation
Normalisation
 
The Key Features Of A Database
The Key Features Of A DatabaseThe Key Features Of A Database
The Key Features Of A Database
 

Ähnlich wie CIS 145 Test Review

Database Relationships
Database RelationshipsDatabase Relationships
Database Relationships
wmassie
 
introductiontodatabases-151106233350-lva1-app6892(2).pptx
introductiontodatabases-151106233350-lva1-app6892(2).pptxintroductiontodatabases-151106233350-lva1-app6892(2).pptx
introductiontodatabases-151106233350-lva1-app6892(2).pptx
KvkExambranch
 

Ähnlich wie CIS 145 Test Review (20)

CIS145 Final Review
CIS145 Final ReviewCIS145 Final Review
CIS145 Final Review
 
CIS 145 test 1 review
CIS 145 test 1 reviewCIS 145 test 1 review
CIS 145 test 1 review
 
Database Concepts and Terminologies
Database Concepts and TerminologiesDatabase Concepts and Terminologies
Database Concepts and Terminologies
 
Database Relationships
Database RelationshipsDatabase Relationships
Database Relationships
 
Referential integrity
Referential integrityReferential integrity
Referential integrity
 
Database.pptx
Database.pptxDatabase.pptx
Database.pptx
 
Chapter 2 part 1(Database System)
Chapter 2 part 1(Database System)Chapter 2 part 1(Database System)
Chapter 2 part 1(Database System)
 
Understanding about relational database m-square systems inc
Understanding about relational database m-square systems incUnderstanding about relational database m-square systems inc
Understanding about relational database m-square systems inc
 
Database Management System
Database Management SystemDatabase Management System
Database Management System
 
Manjeet Singh.pptx
Manjeet Singh.pptxManjeet Singh.pptx
Manjeet Singh.pptx
 
Relational schemas - Primary key.pdf
Relational schemas - Primary key.pdfRelational schemas - Primary key.pdf
Relational schemas - Primary key.pdf
 
Create List Relationships by Using Unique and Lookup Columns - SharePoint 201...
Create List Relationships by Using Unique and Lookup Columns - SharePoint 201...Create List Relationships by Using Unique and Lookup Columns - SharePoint 201...
Create List Relationships by Using Unique and Lookup Columns - SharePoint 201...
 
introductiontodatabases-151106233350-lva1-app6892(2).pptx
introductiontodatabases-151106233350-lva1-app6892(2).pptxintroductiontodatabases-151106233350-lva1-app6892(2).pptx
introductiontodatabases-151106233350-lva1-app6892(2).pptx
 
Introduction to databases
Introduction to databasesIntroduction to databases
Introduction to databases
 
DB- Lect #1 Intro.pdf
DB- Lect #1 Intro.pdfDB- Lect #1 Intro.pdf
DB- Lect #1 Intro.pdf
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database Design
 
Database
DatabaseDatabase
Database
 
Access07 l1 ch2
Access07 l1 ch2Access07 l1 ch2
Access07 l1 ch2
 
MIS201 SQL database .pdf
MIS201  SQL database .pdfMIS201  SQL database .pdf
MIS201 SQL database .pdf
 
Access 05
Access 05Access 05
Access 05
 

Mehr von Randy Riness @ South Puget Sound Community College

Mehr von Randy Riness @ South Puget Sound Community College (20)

Stored procedures
Stored proceduresStored procedures
Stored procedures
 
3 sql overview
3 sql overview3 sql overview
3 sql overview
 
Normalization
NormalizationNormalization
Normalization
 
CIS160 final review
CIS160 final reviewCIS160 final review
CIS160 final review
 
SQL Constraints
SQL ConstraintsSQL Constraints
SQL Constraints
 
CIS 245 Final Review
CIS 245 Final ReviewCIS 245 Final Review
CIS 245 Final Review
 
Cis166 Final Review C#
Cis166 Final Review C#Cis166 Final Review C#
Cis166 Final Review C#
 
Classes and Objects
Classes and ObjectsClasses and Objects
Classes and Objects
 
CIS245 sql
CIS245 sqlCIS245 sql
CIS245 sql
 
CSS
CSSCSS
CSS
 
XPath
XPathXPath
XPath
 
XSLT Overview
XSLT OverviewXSLT Overview
XSLT Overview
 
Views
ViewsViews
Views
 
CIS282 Midterm review
CIS282 Midterm reviewCIS282 Midterm review
CIS282 Midterm review
 
Schemas 2 - Restricting Values
Schemas 2 - Restricting ValuesSchemas 2 - Restricting Values
Schemas 2 - Restricting Values
 
XML schemas
XML schemasXML schemas
XML schemas
 
Document type definitions part 2
Document type definitions part 2Document type definitions part 2
Document type definitions part 2
 
Document type definitions part 1
Document type definitions part 1Document type definitions part 1
Document type definitions part 1
 
DOM specifics
DOM specificsDOM specifics
DOM specifics
 
SQL overview and software
SQL overview and softwareSQL overview and software
SQL overview and software
 

Kürzlich hochgeladen

Goa Call "Girls Service 9316020077 Call "Girls in Goa
Goa Call "Girls  Service   9316020077 Call "Girls in GoaGoa Call "Girls  Service   9316020077 Call "Girls in Goa
Goa Call "Girls Service 9316020077 Call "Girls in Goa
sexy call girls service in goa
 
Call Girls Agency In Goa 💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...
Call Girls  Agency In Goa  💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...Call Girls  Agency In Goa  💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...
Call Girls Agency In Goa 💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...
russian goa call girl and escorts service
 
Karnal Call Girls 8860008073 Dyal Singh Colony Call Girls Service in Karnal E...
Karnal Call Girls 8860008073 Dyal Singh Colony Call Girls Service in Karnal E...Karnal Call Girls 8860008073 Dyal Singh Colony Call Girls Service in Karnal E...
Karnal Call Girls 8860008073 Dyal Singh Colony Call Girls Service in Karnal E...
Apsara Of India
 
CHEAP Call Girls in Malviya Nagar, (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in  Malviya Nagar, (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in  Malviya Nagar, (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Malviya Nagar, (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Kürzlich hochgeladen (20)

Model Call Girls In Velappanchavadi WhatsApp Booking 7427069034 call girl ser...
Model Call Girls In Velappanchavadi WhatsApp Booking 7427069034 call girl ser...Model Call Girls In Velappanchavadi WhatsApp Booking 7427069034 call girl ser...
Model Call Girls In Velappanchavadi WhatsApp Booking 7427069034 call girl ser...
 
↑Top Model (Kolkata) Call Girls Behala ⟟ 8250192130 ⟟ High Class Call Girl In...
↑Top Model (Kolkata) Call Girls Behala ⟟ 8250192130 ⟟ High Class Call Girl In...↑Top Model (Kolkata) Call Girls Behala ⟟ 8250192130 ⟟ High Class Call Girl In...
↑Top Model (Kolkata) Call Girls Behala ⟟ 8250192130 ⟟ High Class Call Girl In...
 
↑Top Model (Kolkata) Call Girls Rajpur ⟟ 8250192130 ⟟ High Class Call Girl In...
↑Top Model (Kolkata) Call Girls Rajpur ⟟ 8250192130 ⟟ High Class Call Girl In...↑Top Model (Kolkata) Call Girls Rajpur ⟟ 8250192130 ⟟ High Class Call Girl In...
↑Top Model (Kolkata) Call Girls Rajpur ⟟ 8250192130 ⟟ High Class Call Girl In...
 
Science City Kolkata ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sex...
Science City Kolkata ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sex...Science City Kolkata ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sex...
Science City Kolkata ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sex...
 
Goa Call "Girls Service 9316020077 Call "Girls in Goa
Goa Call "Girls  Service   9316020077 Call "Girls in GoaGoa Call "Girls  Service   9316020077 Call "Girls in Goa
Goa Call "Girls Service 9316020077 Call "Girls in Goa
 
↑Top Model (Kolkata) Call Girls Sonagachi ⟟ 8250192130 ⟟ High Class Call Girl...
↑Top Model (Kolkata) Call Girls Sonagachi ⟟ 8250192130 ⟟ High Class Call Girl...↑Top Model (Kolkata) Call Girls Sonagachi ⟟ 8250192130 ⟟ High Class Call Girl...
↑Top Model (Kolkata) Call Girls Sonagachi ⟟ 8250192130 ⟟ High Class Call Girl...
 
Hotel And Home Service Available Kolkata Call Girls Howrah ✔ 6297143586 ✔Call...
Hotel And Home Service Available Kolkata Call Girls Howrah ✔ 6297143586 ✔Call...Hotel And Home Service Available Kolkata Call Girls Howrah ✔ 6297143586 ✔Call...
Hotel And Home Service Available Kolkata Call Girls Howrah ✔ 6297143586 ✔Call...
 
Call Girls Agency In Goa 💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...
Call Girls  Agency In Goa  💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...Call Girls  Agency In Goa  💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...
Call Girls Agency In Goa 💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...
 
Book Sex Workers Available Kolkata Call Girls Service Airport Kolkata ✔ 62971...
Book Sex Workers Available Kolkata Call Girls Service Airport Kolkata ✔ 62971...Book Sex Workers Available Kolkata Call Girls Service Airport Kolkata ✔ 62971...
Book Sex Workers Available Kolkata Call Girls Service Airport Kolkata ✔ 62971...
 
Independent Hatiara Escorts ✔ 9332606886✔ Full Night With Room Online Booking...
Independent Hatiara Escorts ✔ 9332606886✔ Full Night With Room Online Booking...Independent Hatiara Escorts ✔ 9332606886✔ Full Night With Room Online Booking...
Independent Hatiara Escorts ✔ 9332606886✔ Full Night With Room Online Booking...
 
Karnal Call Girls 8860008073 Dyal Singh Colony Call Girls Service in Karnal E...
Karnal Call Girls 8860008073 Dyal Singh Colony Call Girls Service in Karnal E...Karnal Call Girls 8860008073 Dyal Singh Colony Call Girls Service in Karnal E...
Karnal Call Girls 8860008073 Dyal Singh Colony Call Girls Service in Karnal E...
 
𓀤Call On 6297143586 𓀤 Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...
𓀤Call On 6297143586 𓀤 Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...𓀤Call On 6297143586 𓀤 Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...
𓀤Call On 6297143586 𓀤 Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...
 
Kanpur call girls 📞 8617697112 At Low Cost Cash Payment Booking
Kanpur call girls 📞 8617697112 At Low Cost Cash Payment BookingKanpur call girls 📞 8617697112 At Low Cost Cash Payment Booking
Kanpur call girls 📞 8617697112 At Low Cost Cash Payment Booking
 
Hotel And Home Service Available Kolkata Call Girls Sonagachi ✔ 6297143586 ✔C...
Hotel And Home Service Available Kolkata Call Girls Sonagachi ✔ 6297143586 ✔C...Hotel And Home Service Available Kolkata Call Girls Sonagachi ✔ 6297143586 ✔C...
Hotel And Home Service Available Kolkata Call Girls Sonagachi ✔ 6297143586 ✔C...
 
Hotel And Home Service Available Kolkata Call Girls South End Park ✔ 62971435...
Hotel And Home Service Available Kolkata Call Girls South End Park ✔ 62971435...Hotel And Home Service Available Kolkata Call Girls South End Park ✔ 62971435...
Hotel And Home Service Available Kolkata Call Girls South End Park ✔ 62971435...
 
2k Shot Call girls Laxmi Nagar Delhi 9205541914
2k Shot Call girls Laxmi Nagar Delhi 92055419142k Shot Call girls Laxmi Nagar Delhi 9205541914
2k Shot Call girls Laxmi Nagar Delhi 9205541914
 
CHEAP Call Girls in Malviya Nagar, (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in  Malviya Nagar, (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in  Malviya Nagar, (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Malviya Nagar, (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
College Call Girls Pune 8617697112 Short 1500 Night 6000 Best call girls Service
College Call Girls Pune 8617697112 Short 1500 Night 6000 Best call girls ServiceCollege Call Girls Pune 8617697112 Short 1500 Night 6000 Best call girls Service
College Call Girls Pune 8617697112 Short 1500 Night 6000 Best call girls Service
 
Model Call Girls In Ariyalur WhatsApp Booking 7427069034 call girl service 24...
Model Call Girls In Ariyalur WhatsApp Booking 7427069034 call girl service 24...Model Call Girls In Ariyalur WhatsApp Booking 7427069034 call girl service 24...
Model Call Girls In Ariyalur WhatsApp Booking 7427069034 call girl service 24...
 
Model Call Girls In Pazhavanthangal WhatsApp Booking 7427069034 call girl ser...
Model Call Girls In Pazhavanthangal WhatsApp Booking 7427069034 call girl ser...Model Call Girls In Pazhavanthangal WhatsApp Booking 7427069034 call girl ser...
Model Call Girls In Pazhavanthangal WhatsApp Booking 7427069034 call girl ser...
 

CIS 145 Test Review

  • 1. Test 2 Review CIS-145
  • 2. 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
  • 3. 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
  • 4. 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
  • 5. 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
  • 6. 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
  • 7. 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)
  • 8. 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
  • 9. 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
  • 10. 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