SlideShare a Scribd company logo
1 of 30
Karina Joyce E. Limbo
Jedan Tipura
BLIS-III

RELATIONAL DATABASE MODEL:
LOGICAL VIEW OF DATA
AND
KEYS
Logical View of Data



 Logical simplicity yields simpler and more
  effective database design methodologies.
• The model was first proposed by E.F.Codd in
   1970.
Entity
An entity is simply a person, place, event, or
  thing for which we intend to collect data.
Examples:
❖ University -- Students, Faculty
  Members, Courses
❖ Airlines -- Pilots, Aircraft, Routes, Supplier
Attributes

Each entity has certain characteristics known as
  attributes.
Examples:
❖ Student -- Student
  Number, Name, GPA, Date of
  Enrollment, Data of Birth, Home
  Address, Phone Number, Major
❖ Aircraft -- Aircraft Number, Data of Last
  Maintenance, Total Hours Flown, Hours
  Flown since Last Maintenance
Entities and Attributes

     A grouping of related entities becomes
  an entity set.
Examples:
❖ The STUDENT entity set contains all student
  entities.
❖ The FACULTY entity set contains all faculty
  entities.
❖ The AIRCRAFT entity set contains all aircraft
  entities
Tables and Their
Characteristics
 A table is perceived as a two-dimensional
  structure composed of rows and columns.
 Each table row (tuple) represents a single
  entity within the entity set.
 Each column represents an attribute and
  each column has a distinct name.
 Each row/column intersection represents a
  single data value
 All values in a column must conform to the
  same data format.
 Each column has a specific range of values
  known as the attribute domain.
 The order of the rows and columns is
  immaterial to the DBMS
 Each table must have an attribute or a
  combination of attributes that uniquely
  identifies each row.
Table Name: STUDENT
E   STU_FNAME   STU_INIT   STU_DOB   STU_HRS   STU_CLASS STU_GPA   STU_TRAN   DEPT
                                                                   SFER       CODE
    William     C          12-Feb-   42        So       2.84       No         BIOL
                           1975
n   Anne        K          15-Nov-   81        Jr       3.27       Yes        CIS
                           1981
    Juliette    F          23-Aug-   36        So       2.26       Yes        ACCT
                           1969
Relational Schema
Keys



 It is an attribute that determines the values of
  other attributes within the entity.
 The key’s role is based on a concept known as
  determination.

  The shorthand notation for “A determines B”
  is A     B. If A determines B, C and D, you
  write A     B, C, D.
Example:

STU_NUM
  STU_LNAME, STU_FNAME, STU_INIT
Functional Dependence



 Can be generalized to cover the case in which
  the determining attribute values occur more
  than once in a table.
 Attribute A determines Attribute B (that is, B
  is functionally dependent on A) if all of the
  rows in the table that agree in value for
  attribute A also agree in value for attribute B.
STUDENT CLASSIFICATION
HOURS COMPLETED            CLASSIFICATION
Less than 30               Fr
30-59                      So
60-89                      Jr
90 or more                 Sr
STU_HRS      STU_CLASS

    But specific number of hours is not
 dependent on the classification. In other
 words, the classification (STU_CLASS) does
 not determine one and only one value for
 completed hours (STU_HRS).
Key Attribute

Any attribute that is part of a key.

Examples:
STU_LNAME,STU_FNAME,STU_INIT,
STU_PHONE     STU_HRS,STU_CLASS
Relational Database Keys



Superkey
 An attribute (or combination of attributes)
  that uniquely identifies each entity in a table.
Example:
In the STUDENT table..

STU_NUM
STU_NUM, STU_LNAME
STU_NUM, STU_LNAME, STU_INIT
Candidate Key
 A minimal superkey. A superkey that does not
  contain a subset of attributes that is itself a
  superkey.
STU_NUM,STU_LNAME
is a superkey, but it is not a candidate key
   because STU_NUM by itself is a candidate
   key.
Controlled Redundancy

 -makes the relational database work.
 -tables within the database share common
 attributes that enable the tables to be linked
 together.
Table Name: PRODUCT
    Primary Key: PROD_CODE
   PROD_CODE VEND_CODE
    Foreign key:   PROD_DESCRIPT                      PROD_PRICE         PROD_ON_HA         VEND_CODE
                                                                             ND
ZZXG245Q          Steel tape, 12 ft. length        6.79                  8            235

QER-34256         Sledge hammer, 16-lb. head       18.63                 6            231

SRE-657UG         Rat-tile file                    2.99                  15           232




    Table Name: VENDOR
                 VEND_CODE                    VEND_CONTACT     link
                                                                 VEND_AREACODE              VEND_PHONE
    Primary Key: VEND_CODE
                  232
    Foreign key: none                         Annalise Crystal 608                          224-2134
                 231                          James Johnson        615                      123-4536
                 235                          Henry Ortozo         615                      899-3425
Primary Key

 -is usually underlined.
 - A candidate key selected to uniquely
 identify all other attribute values in any given
 row.
Example:

VENDOR (VEND_CODE, VEND_CONTACT,
 VEND_AREACODE, VEND_PHONE)
PRODUCT (PROD_CODE, PROD_DESCRIPT,
 PROD_PRICE, PROD_ON_HAND,
 VEND_CODE)
Secondary Key

 - An attribute used strictly for data retrieval
 purposes.
Example:

    A customer date are stored in a
 CUSTOMER table. The customer number is
 the primary key; the secondary key is the
 combination of the customer’s last name and
 phone number.
Foreign Key

     - An attribute in one table whose values
  must either match the primary key in another
  table or be null.
VENDOR
 VEND_CODE       PRODUCT
 VEND_CONTACT      PROD_CODE
 VEND_AREACODE     PROD_DESCRIPT
 VEND_PHONE        PROD_PRICE

                 PROD_ON_HAND
                   VEND_CODE

More Related Content

What's hot

3. Relational Models in DBMS
3. Relational Models in DBMS3. Relational Models in DBMS
3. Relational Models in DBMSkoolkampus
 
Relational database intro for marketers
Relational database intro for marketersRelational database intro for marketers
Relational database intro for marketersSteve Finlay
 
7. Relational Database Design in DBMS
7. Relational Database Design in DBMS7. Relational Database Design in DBMS
7. Relational Database Design in DBMSkoolkampus
 
ER Diagrams Simplified
ER Diagrams SimplifiedER Diagrams Simplified
ER Diagrams SimplifiedPuneet Arora
 
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
FUNCTION DEPENDENCY  AND TYPES & EXAMPLEFUNCTION DEPENDENCY  AND TYPES & EXAMPLE
FUNCTION DEPENDENCY AND TYPES & EXAMPLEVraj Patel
 
Data Modeling Using the EntityRelationship (ER) Model
Data Modeling Using the EntityRelationship (ER) ModelData Modeling Using the EntityRelationship (ER) Model
Data Modeling Using the EntityRelationship (ER) Modelsontumax
 

What's hot (9)

3. Relational Models in DBMS
3. Relational Models in DBMS3. Relational Models in DBMS
3. Relational Models in DBMS
 
DBMS CS2
DBMS CS2DBMS CS2
DBMS CS2
 
Relational database intro for marketers
Relational database intro for marketersRelational database intro for marketers
Relational database intro for marketers
 
7. Relational Database Design in DBMS
7. Relational Database Design in DBMS7. Relational Database Design in DBMS
7. Relational Database Design in DBMS
 
Entity relationship diagram
Entity relationship diagramEntity relationship diagram
Entity relationship diagram
 
dbms er model
dbms er modeldbms er model
dbms er model
 
ER Diagrams Simplified
ER Diagrams SimplifiedER Diagrams Simplified
ER Diagrams Simplified
 
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
FUNCTION DEPENDENCY  AND TYPES & EXAMPLEFUNCTION DEPENDENCY  AND TYPES & EXAMPLE
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
 
Data Modeling Using the EntityRelationship (ER) Model
Data Modeling Using the EntityRelationship (ER) ModelData Modeling Using the EntityRelationship (ER) Model
Data Modeling Using the EntityRelationship (ER) Model
 

Similar to Relational Database Keys

Similar to Relational Database Keys (20)

NMEC RD_UNIT 1.ppt
NMEC RD_UNIT 1.pptNMEC RD_UNIT 1.ppt
NMEC RD_UNIT 1.ppt
 
uniT 4 (1).pptx
uniT 4 (1).pptxuniT 4 (1).pptx
uniT 4 (1).pptx
 
Chapter 2 Relational Data Model-part1
Chapter 2 Relational Data Model-part1Chapter 2 Relational Data Model-part1
Chapter 2 Relational Data Model-part1
 
Sql (DBMS)
Sql (DBMS)Sql (DBMS)
Sql (DBMS)
 
Database Management System Review
Database Management System ReviewDatabase Management System Review
Database Management System Review
 
SQL.pptx
SQL.pptxSQL.pptx
SQL.pptx
 
UNIT-3.pptx
UNIT-3.pptxUNIT-3.pptx
UNIT-3.pptx
 
6_SQL.pdf
6_SQL.pdf6_SQL.pdf
6_SQL.pdf
 
Sql
SqlSql
Sql
 
4 the sql_standard
4 the  sql_standard4 the  sql_standard
4 the sql_standard
 
3. DDL.pdf
3. DDL.pdf3. DDL.pdf
3. DDL.pdf
 
Unit04 dbms
Unit04 dbmsUnit04 dbms
Unit04 dbms
 
MODULE-2dbmsmodule2chapter1isedepts.pptx
MODULE-2dbmsmodule2chapter1isedepts.pptxMODULE-2dbmsmodule2chapter1isedepts.pptx
MODULE-2dbmsmodule2chapter1isedepts.pptx
 
Relational model
Relational modelRelational model
Relational model
 
Impact of Normalization in Future
Impact of Normalization in FutureImpact of Normalization in Future
Impact of Normalization in Future
 
Unit 04 dbms
Unit 04 dbmsUnit 04 dbms
Unit 04 dbms
 
Relational model and its utility%28 rajkumar%29.pptx
Relational model and its       utility%28 rajkumar%29.pptxRelational model and its       utility%28 rajkumar%29.pptx
Relational model and its utility%28 rajkumar%29.pptx
 
Assignment#07
Assignment#07Assignment#07
Assignment#07
 
ER Modeling.ppt
ER Modeling.pptER Modeling.ppt
ER Modeling.ppt
 
Unit03 dbms
Unit03 dbmsUnit03 dbms
Unit03 dbms
 

Recently uploaded

Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 

Relational Database Keys

  • 1. Karina Joyce E. Limbo Jedan Tipura BLIS-III RELATIONAL DATABASE MODEL: LOGICAL VIEW OF DATA AND KEYS
  • 2. Logical View of Data  Logical simplicity yields simpler and more effective database design methodologies.
  • 3. • The model was first proposed by E.F.Codd in 1970.
  • 4. Entity An entity is simply a person, place, event, or thing for which we intend to collect data. Examples: ❖ University -- Students, Faculty Members, Courses ❖ Airlines -- Pilots, Aircraft, Routes, Supplier
  • 5. Attributes Each entity has certain characteristics known as attributes. Examples: ❖ Student -- Student Number, Name, GPA, Date of Enrollment, Data of Birth, Home Address, Phone Number, Major ❖ Aircraft -- Aircraft Number, Data of Last Maintenance, Total Hours Flown, Hours Flown since Last Maintenance
  • 6. Entities and Attributes A grouping of related entities becomes an entity set. Examples: ❖ The STUDENT entity set contains all student entities. ❖ The FACULTY entity set contains all faculty entities. ❖ The AIRCRAFT entity set contains all aircraft entities
  • 7. Tables and Their Characteristics  A table is perceived as a two-dimensional structure composed of rows and columns.  Each table row (tuple) represents a single entity within the entity set.  Each column represents an attribute and each column has a distinct name.  Each row/column intersection represents a single data value
  • 8.  All values in a column must conform to the same data format.  Each column has a specific range of values known as the attribute domain.  The order of the rows and columns is immaterial to the DBMS  Each table must have an attribute or a combination of attributes that uniquely identifies each row.
  • 9. Table Name: STUDENT E STU_FNAME STU_INIT STU_DOB STU_HRS STU_CLASS STU_GPA STU_TRAN DEPT SFER CODE William C 12-Feb- 42 So 2.84 No BIOL 1975 n Anne K 15-Nov- 81 Jr 3.27 Yes CIS 1981 Juliette F 23-Aug- 36 So 2.26 Yes ACCT 1969
  • 11. Keys  It is an attribute that determines the values of other attributes within the entity.
  • 12.  The key’s role is based on a concept known as determination. The shorthand notation for “A determines B” is A B. If A determines B, C and D, you write A B, C, D.
  • 13. Example: STU_NUM STU_LNAME, STU_FNAME, STU_INIT
  • 14. Functional Dependence  Can be generalized to cover the case in which the determining attribute values occur more than once in a table.
  • 15.  Attribute A determines Attribute B (that is, B is functionally dependent on A) if all of the rows in the table that agree in value for attribute A also agree in value for attribute B.
  • 16. STUDENT CLASSIFICATION HOURS COMPLETED CLASSIFICATION Less than 30 Fr 30-59 So 60-89 Jr 90 or more Sr
  • 17. STU_HRS STU_CLASS But specific number of hours is not dependent on the classification. In other words, the classification (STU_CLASS) does not determine one and only one value for completed hours (STU_HRS).
  • 18. Key Attribute Any attribute that is part of a key. Examples: STU_LNAME,STU_FNAME,STU_INIT, STU_PHONE STU_HRS,STU_CLASS
  • 19. Relational Database Keys Superkey  An attribute (or combination of attributes) that uniquely identifies each entity in a table.
  • 20. Example: In the STUDENT table.. STU_NUM STU_NUM, STU_LNAME STU_NUM, STU_LNAME, STU_INIT
  • 21. Candidate Key  A minimal superkey. A superkey that does not contain a subset of attributes that is itself a superkey.
  • 22. STU_NUM,STU_LNAME is a superkey, but it is not a candidate key because STU_NUM by itself is a candidate key.
  • 23. Controlled Redundancy -makes the relational database work. -tables within the database share common attributes that enable the tables to be linked together.
  • 24. Table Name: PRODUCT Primary Key: PROD_CODE PROD_CODE VEND_CODE Foreign key: PROD_DESCRIPT PROD_PRICE PROD_ON_HA VEND_CODE ND ZZXG245Q Steel tape, 12 ft. length 6.79 8 235 QER-34256 Sledge hammer, 16-lb. head 18.63 6 231 SRE-657UG Rat-tile file 2.99 15 232 Table Name: VENDOR VEND_CODE VEND_CONTACT link VEND_AREACODE VEND_PHONE Primary Key: VEND_CODE 232 Foreign key: none Annalise Crystal 608 224-2134 231 James Johnson 615 123-4536 235 Henry Ortozo 615 899-3425
  • 25. Primary Key -is usually underlined. - A candidate key selected to uniquely identify all other attribute values in any given row.
  • 26. Example: VENDOR (VEND_CODE, VEND_CONTACT, VEND_AREACODE, VEND_PHONE) PRODUCT (PROD_CODE, PROD_DESCRIPT, PROD_PRICE, PROD_ON_HAND, VEND_CODE)
  • 27. Secondary Key - An attribute used strictly for data retrieval purposes.
  • 28. Example: A customer date are stored in a CUSTOMER table. The customer number is the primary key; the secondary key is the combination of the customer’s last name and phone number.
  • 29. Foreign Key - An attribute in one table whose values must either match the primary key in another table or be null.
  • 30. VENDOR VEND_CODE PRODUCT VEND_CONTACT PROD_CODE VEND_AREACODE PROD_DESCRIPT VEND_PHONE PROD_PRICE PROD_ON_HAND VEND_CODE