SlideShare a Scribd company logo
1 of 15
INTRODUCTION

 There are some instances when a
  primary key doesn’t exist in the
  real world or when the existing
natural key might not be a suitable
           primary key.
SURROGATE KEY:

Is a primary key created by
the database designer to
simplify the identification of
entity instances.
ADVANTAGE

Since it has no intrinsic meaning,
values for it can be generated by
the DBMS to ensure that unique
values are always provided.
TABLE 5.4


  DATE       TIME_START   TIME_END   ROOM      EVENT_NAME      PARTY_OF

6/17/2010     11:00AM      2:00PM    Allure      Burton           60
                                                 Wedding
6/17/2010     11:00AM      2:00PM    Bonanza   Adams Office       12

6/17/2010     3:00PM       5:30PM     Allure   Smith Family       15

6/17/2010     3:30PM       5:30PM    Bonanza   Adam’s Office      12

6/18/2010     1:00PM       3:00PM    Bonanza    Boy Scouts        33

6/18/2010     11:00AM      2:00PM     Allure     March of         25
                                                  Dines
6/18/2010     11:00AM     12:30PM    Bonanza   Smith Family       12
 Given the data shown in table 5.4 you would
          model the EVENT entity as:

EVENT(DATE, TIME_START, TIME_END,ROOM
        ,EVENT_NAME,PARTY_OF)
DATE TIME_ TIME        ROOM      EVENT_     PART
     START _EN                    NAME      Y_OF   What primary key would you
             D                                     suggest? In this case , there is no
6/17 11:00 2:00        Allure    Burton      60    simple natural key that could be
 /10  AM    PM                   Wedding
                                                   used as a primary key in the
6/17/   11:00   2:00   Bonanza   Adams       12    model. Based on the primary key
 10      AM     PM               Office            concepts you learned about in
                                                   previous chapters, you might
6/17/   3:00    5:30    Allure    Smith      15    suggest one of these options.
 10     PM      PM                Family

6/17/   3:30    5:30   Bonanza   Adam’s      12
 10     PM      PM                Office

                                                       (DATE, TIME_START, ROOM)
6/18/   1:00    3:00   Bonanza     Boy       33                    Or
 10     PM      PM                Scouts                (DATE, TIME_END, ROOM)
6/18/   11:00   2:00    Allure   March of    25
 10      AM     PM                Dines
6/18/   11:00   12:3 Bonanza      Smith      12
 10      AM     0PM               Family
DAT TIME_ TIME         ROOM     EVENT_     PART
 E  START _EN                    NAME      Y_OF        Assume you select the
            D                                     composite primary key (DATE,
                                                  TIME_START,ROOM) for the
6/17   11:00   2:00P   Allure   Burton      60    EVENT entity. Next ,you
 /10    AM       M              Wedding
                                                  determine that one EVENT may
6/17   11:00   2:00P   Bonan    Adams       12    use many RESOURCES such as
/10     AM       M       za     Office            tables, projectors, pc and
                                                  stands, and that the same
6/17   3:00    5:30P   Allure    Smith      15    RESOURCE may be use for
/10    PM        M               Family           many EVENTS. The RESOURCE
                                                  entity would be represented by
6/17   3:30    5:30P   Bonan    Adam’s      12    the ff. attributes:
/10    PM        M       za      Office

6/18   1:00    3:00P   Bonan      Boy       33    RESOURCE (RSC_ID,
/10    PM        M       za      Scouts           RSC_DESCRIPTION,RSC_T
6/18   11:00   2:00P   Allure   March of    25    YPE, RSC_QTY,RSC_PRICE)
/10     AM       M               Dines
6/18   11:00   12:30   Bonan     Smith      12
/10     AM      PM       za      Family
DATE TIME_ TIME        ROOM     EVENT      PART
     START _EN                  _NAME      Y_OF   Given the business rules, the M:N
             D                                    relationship between RESOURCE
                                                  and EVENT would be represented
6/17   11:00   2:00P   Allure   Burton      60
                                                  via the EVNTRSC composite entity
/10     AM       M              Wedding
                                                  with a composite primary key as
6/17   11:00   2:00P   Bonan    Adams       12    follows:
/10     AM       M       za     Office
                                                    EVNTRSC (DATE, TIME _START,
6/17   3:00    5:30P   Allure    Smith      15      ROOM, RSC_ID, QTY _USED
/10    PM        M               Family
                                                   You now have a lengthy four-
6/17   3:30    5:30P   Bonan    Adam’s      12     attribute composite primary key.
/10    PM        M       za      Office            What would happen if the
                                                   EVNTRSC entity’s primary key
                                                   were inherited by another
6/18   1:00    3:00P   Bonan      Boy       33     existence dependent entity? At
/10    PM        M       za      Scouts            this point, you can see that the
6/18   11:00   2:00P   Allure   March of    25     composite primary key could
/10     AM       M               Dines             make the implementation of the
                                                   database and program coding
6/18   11:00   12:30   Bonan     Smith      12
                                                   unnecessarily complex.
/10     AM      PM       za      Family
Surrogate primary keys are accepted
   practice in today's complex data
            environments.
They are especially helpful when there
  is no natural key, when the selected
 candidate key has embedded semantic
     contents or when the selected
       candidate key is too long or
             cumbersome.
However , there is a trade-off; if you use
  a surrogate key, you must ensure that
     the candidate key of the entity in
 question performs properly through the
  use of “unique index” and “not null”
               constraints.
PREPARED BY:




   ROSELYN P. CEA
ALLYSA JANE CATALLA
      BLIS -III

More Related Content

Viewers also liked

Dictionary aizel
Dictionary aizelDictionary aizel
Dictionary aizelyhen06
 
Profesia.sk- the story behind
Profesia.sk- the story behindProfesia.sk- the story behind
Profesia.sk- the story behindSvaral_profesia
 
Newreport db
Newreport dbNewreport db
Newreport dbyhen06
 
Book of days and first - aubrey
Book of days and first  - aubreyBook of days and first  - aubrey
Book of days and first - aubreyyhen06
 
General factbooks
General factbooksGeneral factbooks
General factbooksyhen06
 
Project proposal final presentation2
Project proposal  final presentation2Project proposal  final presentation2
Project proposal final presentation2yhen06
 
Database system environment ppt.
Database system environment ppt.Database system environment ppt.
Database system environment ppt.yhen06
 
Story telling
Story tellingStory telling
Story tellingyhen06
 
Evaluating web resources
Evaluating web resourcesEvaluating web resources
Evaluating web resourcesyhen06
 
National book week celebration
National book week celebrationNational book week celebration
National book week celebrationyhen06
 
Advantages and disadvantages of digital library
Advantages and disadvantages of digital libraryAdvantages and disadvantages of digital library
Advantages and disadvantages of digital libraryyhen06
 
Evaluating different sources maam she
Evaluating different sources maam sheEvaluating different sources maam she
Evaluating different sources maam sheyhen06
 
Database system environment ppt.
Database system environment ppt.Database system environment ppt.
Database system environment ppt.yhen06
 
Importance of database design (1)
Importance of database design (1)Importance of database design (1)
Importance of database design (1)yhen06
 
Advantages and disadvantages of digital library
Advantages and disadvantages of digital libraryAdvantages and disadvantages of digital library
Advantages and disadvantages of digital libraryyhen06
 
Importance of data model
Importance of data modelImportance of data model
Importance of data modelyhen06
 
Database management functions
Database management functionsDatabase management functions
Database management functionsyhen06
 

Viewers also liked (18)

Dictionary aizel
Dictionary aizelDictionary aizel
Dictionary aizel
 
Profesia.sk- the story behind
Profesia.sk- the story behindProfesia.sk- the story behind
Profesia.sk- the story behind
 
Newreport db
Newreport dbNewreport db
Newreport db
 
Book of days and first - aubrey
Book of days and first  - aubreyBook of days and first  - aubrey
Book of days and first - aubrey
 
General factbooks
General factbooksGeneral factbooks
General factbooks
 
Acupressure in training
Acupressure in trainingAcupressure in training
Acupressure in training
 
Project proposal final presentation2
Project proposal  final presentation2Project proposal  final presentation2
Project proposal final presentation2
 
Database system environment ppt.
Database system environment ppt.Database system environment ppt.
Database system environment ppt.
 
Story telling
Story tellingStory telling
Story telling
 
Evaluating web resources
Evaluating web resourcesEvaluating web resources
Evaluating web resources
 
National book week celebration
National book week celebrationNational book week celebration
National book week celebration
 
Advantages and disadvantages of digital library
Advantages and disadvantages of digital libraryAdvantages and disadvantages of digital library
Advantages and disadvantages of digital library
 
Evaluating different sources maam she
Evaluating different sources maam sheEvaluating different sources maam she
Evaluating different sources maam she
 
Database system environment ppt.
Database system environment ppt.Database system environment ppt.
Database system environment ppt.
 
Importance of database design (1)
Importance of database design (1)Importance of database design (1)
Importance of database design (1)
 
Advantages and disadvantages of digital library
Advantages and disadvantages of digital libraryAdvantages and disadvantages of digital library
Advantages and disadvantages of digital library
 
Importance of data model
Importance of data modelImportance of data model
Importance of data model
 
Database management functions
Database management functionsDatabase management functions
Database management functions
 

More from yhen06

Book fair
Book fairBook fair
Book fairyhen06
 
Basic education department library
Basic education department libraryBasic education department library
Basic education department libraryyhen06
 
Markey encyclopedia
Markey encyclopediaMarkey encyclopedia
Markey encyclopediayhen06
 
Informational web pages
Informational web pagesInformational web pages
Informational web pagesyhen06
 
Indexing languages (2)
Indexing languages (2)Indexing languages (2)
Indexing languages (2)yhen06
 
Hardware & software
Hardware & softwareHardware & software
Hardware & softwareyhen06
 
Bibliographies (2)
Bibliographies (2)Bibliographies (2)
Bibliographies (2)yhen06
 
Project proposal final presentation
Project proposal  final presentationProject proposal  final presentation
Project proposal final presentationyhen06
 
web tech
web techweb tech
web techyhen06
 
Nature of information
Nature of informationNature of information
Nature of informationyhen06
 
Evaluating different sources
Evaluating different sourcesEvaluating different sources
Evaluating different sourcesyhen06
 
Indexing languages
Indexing languagesIndexing languages
Indexing languagesyhen06
 
Indexing languages
Indexing languagesIndexing languages
Indexing languagesyhen06
 

More from yhen06 (13)

Book fair
Book fairBook fair
Book fair
 
Basic education department library
Basic education department libraryBasic education department library
Basic education department library
 
Markey encyclopedia
Markey encyclopediaMarkey encyclopedia
Markey encyclopedia
 
Informational web pages
Informational web pagesInformational web pages
Informational web pages
 
Indexing languages (2)
Indexing languages (2)Indexing languages (2)
Indexing languages (2)
 
Hardware & software
Hardware & softwareHardware & software
Hardware & software
 
Bibliographies (2)
Bibliographies (2)Bibliographies (2)
Bibliographies (2)
 
Project proposal final presentation
Project proposal  final presentationProject proposal  final presentation
Project proposal final presentation
 
web tech
web techweb tech
web tech
 
Nature of information
Nature of informationNature of information
Nature of information
 
Evaluating different sources
Evaluating different sourcesEvaluating different sources
Evaluating different sources
 
Indexing languages
Indexing languagesIndexing languages
Indexing languages
 
Indexing languages
Indexing languagesIndexing languages
Indexing languages
 

Recently uploaded

Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
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
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
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
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 

Recently uploaded (20)

Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
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...
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
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
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 

Catalla & cea

  • 1.
  • 2. INTRODUCTION There are some instances when a primary key doesn’t exist in the real world or when the existing natural key might not be a suitable primary key.
  • 3. SURROGATE KEY: Is a primary key created by the database designer to simplify the identification of entity instances.
  • 4.
  • 5. ADVANTAGE Since it has no intrinsic meaning, values for it can be generated by the DBMS to ensure that unique values are always provided.
  • 6.
  • 7. TABLE 5.4 DATE TIME_START TIME_END ROOM EVENT_NAME PARTY_OF 6/17/2010 11:00AM 2:00PM Allure Burton 60 Wedding 6/17/2010 11:00AM 2:00PM Bonanza Adams Office 12 6/17/2010 3:00PM 5:30PM Allure Smith Family 15 6/17/2010 3:30PM 5:30PM Bonanza Adam’s Office 12 6/18/2010 1:00PM 3:00PM Bonanza Boy Scouts 33 6/18/2010 11:00AM 2:00PM Allure March of 25 Dines 6/18/2010 11:00AM 12:30PM Bonanza Smith Family 12
  • 8.  Given the data shown in table 5.4 you would model the EVENT entity as: EVENT(DATE, TIME_START, TIME_END,ROOM ,EVENT_NAME,PARTY_OF)
  • 9. DATE TIME_ TIME ROOM EVENT_ PART START _EN NAME Y_OF What primary key would you D suggest? In this case , there is no 6/17 11:00 2:00 Allure Burton 60 simple natural key that could be /10 AM PM Wedding used as a primary key in the 6/17/ 11:00 2:00 Bonanza Adams 12 model. Based on the primary key 10 AM PM Office concepts you learned about in previous chapters, you might 6/17/ 3:00 5:30 Allure Smith 15 suggest one of these options. 10 PM PM Family 6/17/ 3:30 5:30 Bonanza Adam’s 12 10 PM PM Office (DATE, TIME_START, ROOM) 6/18/ 1:00 3:00 Bonanza Boy 33 Or 10 PM PM Scouts (DATE, TIME_END, ROOM) 6/18/ 11:00 2:00 Allure March of 25 10 AM PM Dines 6/18/ 11:00 12:3 Bonanza Smith 12 10 AM 0PM Family
  • 10. DAT TIME_ TIME ROOM EVENT_ PART E START _EN NAME Y_OF Assume you select the D composite primary key (DATE, TIME_START,ROOM) for the 6/17 11:00 2:00P Allure Burton 60 EVENT entity. Next ,you /10 AM M Wedding determine that one EVENT may 6/17 11:00 2:00P Bonan Adams 12 use many RESOURCES such as /10 AM M za Office tables, projectors, pc and stands, and that the same 6/17 3:00 5:30P Allure Smith 15 RESOURCE may be use for /10 PM M Family many EVENTS. The RESOURCE entity would be represented by 6/17 3:30 5:30P Bonan Adam’s 12 the ff. attributes: /10 PM M za Office 6/18 1:00 3:00P Bonan Boy 33 RESOURCE (RSC_ID, /10 PM M za Scouts RSC_DESCRIPTION,RSC_T 6/18 11:00 2:00P Allure March of 25 YPE, RSC_QTY,RSC_PRICE) /10 AM M Dines 6/18 11:00 12:30 Bonan Smith 12 /10 AM PM za Family
  • 11. DATE TIME_ TIME ROOM EVENT PART START _EN _NAME Y_OF Given the business rules, the M:N D relationship between RESOURCE and EVENT would be represented 6/17 11:00 2:00P Allure Burton 60 via the EVNTRSC composite entity /10 AM M Wedding with a composite primary key as 6/17 11:00 2:00P Bonan Adams 12 follows: /10 AM M za Office EVNTRSC (DATE, TIME _START, 6/17 3:00 5:30P Allure Smith 15 ROOM, RSC_ID, QTY _USED /10 PM M Family You now have a lengthy four- 6/17 3:30 5:30P Bonan Adam’s 12 attribute composite primary key. /10 PM M za Office What would happen if the EVNTRSC entity’s primary key were inherited by another 6/18 1:00 3:00P Bonan Boy 33 existence dependent entity? At /10 PM M za Scouts this point, you can see that the 6/18 11:00 2:00P Allure March of 25 composite primary key could /10 AM M Dines make the implementation of the database and program coding 6/18 11:00 12:30 Bonan Smith 12 unnecessarily complex. /10 AM PM za Family
  • 12. Surrogate primary keys are accepted practice in today's complex data environments.
  • 13. They are especially helpful when there is no natural key, when the selected candidate key has embedded semantic contents or when the selected candidate key is too long or cumbersome.
  • 14. However , there is a trade-off; if you use a surrogate key, you must ensure that the candidate key of the entity in question performs properly through the use of “unique index” and “not null” constraints.
  • 15. PREPARED BY: ROSELYN P. CEA ALLYSA JANE CATALLA BLIS -III