SlideShare a Scribd company logo
1 of 43
Download to read offline
MODULE 5
CREATING
RELATIONSHIPS
BETWEEN TABLES
ALEXANDER BABICH
ALEXANDER.TAURUS@GMAIL.COM
MODULE OVERVIEW
• Designing of complex databases.The concept of the
normalization of the database. Linking fields
• Query from several tables. Data scheme. Subordinated
tables
• Working with subordinate tables. Solving data integrity
problems
• Support for data integrity. Merge Options. Substitutions.
Practical examples of substitutions
• Types of relationships between tables
LESSON 1: DATABASE DESIGN
• Designing of complex databases.The concept of
the normalization of the database. Linking fields
• Query from several tables. Data scheme.
Subordinated tables
DATABASE DESIGN
The process of solving a class of problems associated with
the creation of databases:
• Storing the necessary information in the database
• The ability to receive data through the necessary requests
• Reduce redundancy and data duplication.
• Ensure data integrity
• Elimination of contradictions
• Data loss exclusion
STAGES OF DATABASE DESIGN
1. Conceptual design
• infological
2. Logical design
• datalogical
3. Physical design
STAGES OF DATABASE DESIGN
1. Conceptual design
• infological
2. Logical design
• datalogical
3. Physical design
CONCEPTUAL DESIGN
• Construction of a formalized domain model
• built using graphic language tools
• ER charts
• without focusing on a specific DBMS
• The main elements of the model:
• Description of domain objects and links between them
• Description of user information needs
• basic database queries
• Description of algorithmic data dependencies
• Description of integrity constraints
• valid data value requirements to the connections between them
CONCEPTUAL DESIGN
https://www.holistics.io/blog/top-5-free-database-diagram-design-tools/
LOGICAL DESIGN
• Mapping of the infological model to the data model used in a
specific DBMS
• for example the relational data model
• For relational DBMS - a set of tables
• with key fields
• relationships between tables
• If the infological model is constructed in the form of ER-
diagrams, constructing tables according to certain
formalized rules and normalizing them
• This stage can be automated
PHYSICAL DESIGN
• Implementation of the datalogical model using specific
DBMS
• Choosing solutions related to the physical storage
environment
• disk space management
• data access methods
• data compression methods
• Tasks are solved by DBMS and
are hidden from the database developer
NORMALIZATION
• The process of converting a database to a form that
meets normal forms
• Designed to bring the database structure to a form that
provides minimal redundancy
• Not intended
• decrease or increase in productivity
• decrease or increase in database size
• The ultimate goal is to reduce the potential
inconsistency of information stored in the database.
NORMAL FORM
• Relation property in relational data model
• characterizes it in terms of redundancy
• could potentially lead to logically erroneous sampling
or change results
• Normal form is defined as the set of requirements that
must be met by
TYPES OF NORMAL FORMS
• First Normal Form (1NF)
• In a relational model, a relationship is always in first normal
form by definition
• Second normal form (2NF)
• Third normal form (3NF)
• Boyce-Codd Normal Form (BCNF)
• Fourth normal form (4NF)
• Fifth Normal Form (5NF)
• Domain Key Normal Form (DKNF)
• Sixth normal form (6NF)
IN OTHERWORDS
Elimination of redundancy due
to the decomposition of
relations
• only primary data should be kept in
every table
• data that are not inferred from other
stored data
RELATIONSHIPS BETWEENTABLES
• Recall the primary and
foreign keys!
• Database Tools >
Relationships
• Types of links:
• One to one
• One-to-many
• Many-to-many*
MANY-TO-MANY
You need a junction table with a pair of foreign keys (and some
related fields)
DISPLAY SUBORDINATETABLES
QUERIES FROM MULTIPLE TABLES
Alternative:
SELECT DISTINCT Customers.City,
Customers.CompanyName FROM Customers, Orders
WHERE (((Orders.OrderDate) Between #1/1/19981
And #12/31/1998#) And (Customers.CustomerID = Orders.CustomerID))
ORDER BY Customers.City, Customers.CompanyName;
LESSON 2: SUBORDINATE TABLES
• Working with subordinate tables. Solving data integrity
problems
• Support for data integrity. Merge Options. Substitutions.
Practical examples of substitutions
• Types of relationships between tables
DATA INTEGRITY
• The fundamental principle of the theory of DB
• Database restriction to ensure that the links between the
data are valid and intact
• Benefits:
• Improved data quality
• Development acceleration
• Error reduction
• Consistency between applications
DATA INTEGRITY
DATA INTEGRITY
• check box Enforce Referential Integrity
• Cascade Update Related Fields
• when the key field of the main table changes, the
corresponding values of the field of the related records
will be automatically changed
• Cascade Delete Related Records
• when deleting a record in the main table, all related
records in the subordinate table are also deleted
LOOKUPS (SUBSTITUTIONS)
LOOKUPS (SUBSTITUTIONS)
LOOKUPS (SUBSTITUTIONS)
LOOKUPS (SUBSTITUTIONS)
RELATIONSHIPS BETWEENTABLES
• Lt’s recall:
• One-to-one
• One-to-many
• Many-to-many*
• Ways to Join:
• Inner Join
• only those records from tables whose related fields match
• Left outer join (Left Join)
• all records of the first table and only those records of another
table, the values of the associated field of which coincide with the
values of the corresponding field of the first table
• Right Join
• Same as left outer join, but tables change roles
TEST QUESTION
It’s a good idea to think of relationships as having “sides.”
(Pick one answer)
1. True
2. False
TEST QUESTION
Knowing which side a table is on tells you whether or not it
uses a foreign key field
It’s a good idea to think of relationships as having “sides.”
Answer:
1. True
TEST QUESTION
To create one-to-many relationships, you do which of the following?
(Pick one answer)
1. Use the primary key from the table on the “one” side as
a foreign key in the table on the “many” side
2. Use a junction table with at least two foreign key fields
3. Turn off indexing for the primary key field
TEST QUESTION
In the asset-tracking database, you can now answer
questions such as, “Which company supplies most of our
computers?”
To create one-to-many relationships, you do which of the
following?
Answer:
1. Use the primary key from the table on the “one” side
as a foreign key in the table on the “many” side
TEST QUESTION
To create a one-to-one relationship, you do which of the following?
(Pick one answer)
1. Turn off indexing for the foreign key field
2. Turn on indexing in the foreign key field, but allow
duplicate values
3. Turn on indexing for the foreign key field without
allowing duplicate values
4. Enable referential integrity
TEST QUESTION
If you allow duplicate values, you create a one-to-many
relationship
To create a one-to-one relationship, you do which of the following?
Answer:
3. Turn on indexing for the foreign key field without
allowing duplicate values
TEST QUESTION
Referential integrity is useful because it does which of the following?
(Pick one answer)
1. Takes the place of an index
2. Keeps primary and foreign key values in synch
3. Allows you to “orphan” data safely
TEST QUESTION
Referential integrity can also make it easy to update and
delete data
Referential integrity is useful because it does which of the following?
Answer:
2. Keeps primary and foreign key values in synch
TEST QUESTION
To create a many-to-many relationship between Table A and Table B,
you do which of the following? (Pick one answer)
1. Create one-to-one relationships between A, B, and at
least two other tables
2. Add the primary keys from A and B to a “link” or
“junction” table
3. Add as many fields as needed from table A to table B,
and vice versa, until each table contains all the data you
need to track
TEST QUESTION
Those foreign keys allow you to see how the data on each
side relate to each other
To create a many-to-many relationship between Table A and Table B,
you do which of the following?
Answer:
2. Add the primary keys from A and B to a “link” or
“junction” table
TEST QUESTION
This course has taught you everything you need to know about
relationships. (Pick one answer)
1. True
2. False
TEST QUESTION 6
This course has taught you everything you need to know about
relationships
Answer:
2. False
EXERCISE
1. Reconsider the connections
in your database and try to
optimize its structure
BOTTOM LINE
• Designing of complex databases.The concept of the
normalization of the database. Linking fields
• Query from several tables. Data scheme. Subordinated
tables
• Working with subordinate tables. Solving data integrity
problems
• Support for data integrity. Merge Options. Substitutions.
Practical examples of substitutions
• Types of relationships between tables
QUESTIONS?
SELF-TEST
• List the known stages of database design.
• What is table normalization?
• How many normal forms do you know?
• Why is data integrity so important?
• What kinds of links can exist between Access
tables?
• How to link database tables?

More Related Content

What's hot

Creating relationships with tables
Creating relationships with tablesCreating relationships with tables
Creating relationships with tablesJhen Articona
 
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NFDatabase Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NFOum Saokosal
 
Normalization Accepted
Normalization AcceptedNormalization Accepted
Normalization Acceptedprasaddurga
 
CIS 111 STUDY Redefined Education--cis111study.com
CIS 111 STUDY Redefined Education--cis111study.comCIS 111 STUDY Redefined Education--cis111study.com
CIS 111 STUDY Redefined Education--cis111study.comclaric192
 
CIS 111 STUDY Become Exceptional--cis111study.com
CIS 111 STUDY Become Exceptional--cis111study.comCIS 111 STUDY Become Exceptional--cis111study.com
CIS 111 STUDY Become Exceptional--cis111study.comclaric102
 
CIS 111 STUDY Achievement Education--cis111 study.com
CIS 111 STUDY Achievement Education--cis111 study.comCIS 111 STUDY Achievement Education--cis111 study.com
CIS 111 STUDY Achievement Education--cis111 study.comclaric153
 
CIS 111 STUDY Education Counseling--cis111study.com
 CIS 111 STUDY Education Counseling--cis111study.com CIS 111 STUDY Education Counseling--cis111study.com
CIS 111 STUDY Education Counseling--cis111study.comshanaabe12
 
Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)Oum Saokosal
 
CIS 111 STUDY Education Your Life--cis111study
CIS 111 STUDY Education Your Life--cis111studyCIS 111 STUDY Education Your Life--cis111study
CIS 111 STUDY Education Your Life--cis111studythomashard44
 
CIS 111 STUDY Inspiring Innovation--cis111study.com
CIS 111 STUDY Inspiring Innovation--cis111study.comCIS 111 STUDY Inspiring Innovation--cis111study.com
CIS 111 STUDY Inspiring Innovation--cis111study.comKeatonJennings90
 
Structured system analysis and design
Structured system analysis and design Structured system analysis and design
Structured system analysis and design Jayant Dalvi
 
Penormalan/Normalization
Penormalan/NormalizationPenormalan/Normalization
Penormalan/NormalizationJoan Ador
 
Normalization
NormalizationNormalization
Normalizationlingesan
 
CIS 111 STUDY Introduction Education--cis111study.com
CIS 111 STUDY Introduction Education--cis111study.comCIS 111 STUDY Introduction Education--cis111study.com
CIS 111 STUDY Introduction Education--cis111study.comclaric262
 
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NFNormalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NFBiplap Bhattarai
 
Normalization i i
Normalization   i iNormalization   i i
Normalization i iGagan Deep
 
Learn Normalization in simple language
Learn Normalization in simple languageLearn Normalization in simple language
Learn Normalization in simple languageFirstWire Apps
 

What's hot (20)

Creating relationships with tables
Creating relationships with tablesCreating relationships with tables
Creating relationships with tables
 
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NFDatabase Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
 
Normalization Accepted
Normalization AcceptedNormalization Accepted
Normalization Accepted
 
Normalization
NormalizationNormalization
Normalization
 
Database normalization
Database normalizationDatabase normalization
Database normalization
 
CIS 111 STUDY Redefined Education--cis111study.com
CIS 111 STUDY Redefined Education--cis111study.comCIS 111 STUDY Redefined Education--cis111study.com
CIS 111 STUDY Redefined Education--cis111study.com
 
CIS 111 STUDY Become Exceptional--cis111study.com
CIS 111 STUDY Become Exceptional--cis111study.comCIS 111 STUDY Become Exceptional--cis111study.com
CIS 111 STUDY Become Exceptional--cis111study.com
 
CIS 111 STUDY Achievement Education--cis111 study.com
CIS 111 STUDY Achievement Education--cis111 study.comCIS 111 STUDY Achievement Education--cis111 study.com
CIS 111 STUDY Achievement Education--cis111 study.com
 
CIS 111 STUDY Education Counseling--cis111study.com
 CIS 111 STUDY Education Counseling--cis111study.com CIS 111 STUDY Education Counseling--cis111study.com
CIS 111 STUDY Education Counseling--cis111study.com
 
Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)Database Concept - Normalization (1NF, 2NF, 3NF)
Database Concept - Normalization (1NF, 2NF, 3NF)
 
CIS 111 STUDY Education Your Life--cis111study
CIS 111 STUDY Education Your Life--cis111studyCIS 111 STUDY Education Your Life--cis111study
CIS 111 STUDY Education Your Life--cis111study
 
CIS 111 STUDY Inspiring Innovation--cis111study.com
CIS 111 STUDY Inspiring Innovation--cis111study.comCIS 111 STUDY Inspiring Innovation--cis111study.com
CIS 111 STUDY Inspiring Innovation--cis111study.com
 
Structured system analysis and design
Structured system analysis and design Structured system analysis and design
Structured system analysis and design
 
Penormalan/Normalization
Penormalan/NormalizationPenormalan/Normalization
Penormalan/Normalization
 
Normalization
NormalizationNormalization
Normalization
 
Normalization
NormalizationNormalization
Normalization
 
CIS 111 STUDY Introduction Education--cis111study.com
CIS 111 STUDY Introduction Education--cis111study.comCIS 111 STUDY Introduction Education--cis111study.com
CIS 111 STUDY Introduction Education--cis111study.com
 
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NFNormalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
Normalization | (1NF) |(2NF) (3NF)|BCNF| 4NF |5NF
 
Normalization i i
Normalization   i iNormalization   i i
Normalization i i
 
Learn Normalization in simple language
Learn Normalization in simple languageLearn Normalization in simple language
Learn Normalization in simple language
 

Similar to Access 05

BI Knowledge Sharing Session 2
BI Knowledge Sharing Session 2BI Knowledge Sharing Session 2
BI Knowledge Sharing Session 2Kelvin Chan
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database DesignArchit Saxena
 
Database Design Process
Database Design ProcessDatabase Design Process
Database Design Processmussawir20
 
Mc leod9e ch06 database management systems
Mc leod9e ch06 database management systemsMc leod9e ch06 database management systems
Mc leod9e ch06 database management systemssellyhood
 
microsoft_access_working_with_forms_and_generating_reports__107.ppt
microsoft_access_working_with_forms_and_generating_reports__107.pptmicrosoft_access_working_with_forms_and_generating_reports__107.ppt
microsoft_access_working_with_forms_and_generating_reports__107.pptKunle Faseyi
 
Presentation DBMS (1)
Presentation DBMS (1)Presentation DBMS (1)
Presentation DBMS (1)Ali Raza
 
Feb 2nd Makeup Class
Feb 2nd Makeup ClassFeb 2nd Makeup Class
Feb 2nd Makeup ClassGeorge Saban
 
Relational Database Management System
Relational Database Management SystemRelational Database Management System
Relational Database Management SystemMian Abdul Raheem
 
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 incMuthu Natarajan
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationshipsccctableauusergroup
 

Similar to Access 05 (20)

Access 03
Access 03Access 03
Access 03
 
BI Knowledge Sharing Session 2
BI Knowledge Sharing Session 2BI Knowledge Sharing Session 2
BI Knowledge Sharing Session 2
 
Access 01
Access 01Access 01
Access 01
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database Design
 
demo2.ppt
demo2.pptdemo2.ppt
demo2.ppt
 
Database Design Process
Database Design ProcessDatabase Design Process
Database Design Process
 
Mc leod9e ch06 database management systems
Mc leod9e ch06 database management systemsMc leod9e ch06 database management systems
Mc leod9e ch06 database management systems
 
MS ACCESS.pptx
MS ACCESS.pptxMS ACCESS.pptx
MS ACCESS.pptx
 
microsoft_access_working_with_forms_and_generating_reports__107.ppt
microsoft_access_working_with_forms_and_generating_reports__107.pptmicrosoft_access_working_with_forms_and_generating_reports__107.ppt
microsoft_access_working_with_forms_and_generating_reports__107.ppt
 
Presentation DBMS (1)
Presentation DBMS (1)Presentation DBMS (1)
Presentation DBMS (1)
 
Feb 2nd Makeup Class
Feb 2nd Makeup ClassFeb 2nd Makeup Class
Feb 2nd Makeup Class
 
Relational Database Management System
Relational Database Management SystemRelational Database Management System
Relational Database Management System
 
Database Part 2
Database Part 2Database Part 2
Database Part 2
 
MS ACCESS
MS ACCESSMS ACCESS
MS ACCESS
 
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
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships
 
normalization-1.pptx
normalization-1.pptxnormalization-1.pptx
normalization-1.pptx
 
Sppt chap007
Sppt chap007Sppt chap007
Sppt chap007
 
Database intro
Database introDatabase intro
Database intro
 
Ms sql server tips 1 0
Ms sql server tips 1 0Ms sql server tips 1 0
Ms sql server tips 1 0
 

More from Alexander Babich

Актуальні курси з мого арсеналу (Бабич О.В.)
Актуальні курси з мого арсеналу (Бабич О.В.)Актуальні курси з мого арсеналу (Бабич О.В.)
Актуальні курси з мого арсеналу (Бабич О.В.)Alexander Babich
 
M365: Word, Excel, PowerPoint...
M365: Word, Excel, PowerPoint...M365: Word, Excel, PowerPoint...
M365: Word, Excel, PowerPoint...Alexander Babich
 
M365: Інші сервіси та застосунки
M365: Інші сервіси та застосункиM365: Інші сервіси та застосунки
M365: Інші сервіси та застосункиAlexander Babich
 
M365: Завершення
M365: ЗавершенняM365: Завершення
M365: ЗавершенняAlexander Babich
 
M365: рекомендації
M365: рекомендаціїM365: рекомендації
M365: рекомендаціїAlexander Babich
 
M365: Огляд платформи Microsoft365
M365: Огляд платформи Microsoft365M365: Огляд платформи Microsoft365
M365: Огляд платформи Microsoft365Alexander Babich
 
M365: Роздаткові матеріали
M365: Роздаткові матеріалиM365: Роздаткові матеріали
M365: Роздаткові матеріалиAlexander Babich
 
Meet&Code - VR, метавсесвіт та криптовалюти (1).pptx
Meet&Code - VR, метавсесвіт та криптовалюти (1).pptxMeet&Code - VR, метавсесвіт та криптовалюти (1).pptx
Meet&Code - VR, метавсесвіт та криптовалюти (1).pptxAlexander Babich
 
Ви обрали професію програміста
Ви обрали професію програмістаВи обрали професію програміста
Ви обрали професію програмістаAlexander Babich
 
Змішане навчання в ППФК
Змішане навчання в ППФКЗмішане навчання в ППФК
Змішане навчання в ППФКAlexander Babich
 
Формування професійних інтересів студентів
Формування професійних інтересів студентівФормування професійних інтересів студентів
Формування професійних інтересів студентівAlexander Babich
 
День відкритих дверей' 2021
День відкритих дверей' 2021День відкритих дверей' 2021
День відкритих дверей' 2021Alexander Babich
 
06. Обучение и сертификация по Azure
06. Обучение и сертификация по Azure06. Обучение и сертификация по Azure
06. Обучение и сертификация по AzureAlexander Babich
 
05.Внедрение Azure
05.Внедрение Azure05.Внедрение Azure
05.Внедрение AzureAlexander Babich
 
04.Службы Azure - подробнее
04.Службы Azure - подробнее04.Службы Azure - подробнее
04.Службы Azure - подробнееAlexander Babich
 
03.Сколько стоит облако
03.Сколько стоит облако03.Сколько стоит облако
03.Сколько стоит облакоAlexander Babich
 

More from Alexander Babich (20)

Актуальні курси з мого арсеналу (Бабич О.В.)
Актуальні курси з мого арсеналу (Бабич О.В.)Актуальні курси з мого арсеналу (Бабич О.В.)
Актуальні курси з мого арсеналу (Бабич О.В.)
 
M365: Word, Excel, PowerPoint...
M365: Word, Excel, PowerPoint...M365: Word, Excel, PowerPoint...
M365: Word, Excel, PowerPoint...
 
M365: Інші сервіси та застосунки
M365: Інші сервіси та застосункиM365: Інші сервіси та застосунки
M365: Інші сервіси та застосунки
 
M365: OneDrive
M365: OneDriveM365: OneDrive
M365: OneDrive
 
M365: Завершення
M365: ЗавершенняM365: Завершення
M365: Завершення
 
M365: SharePoint
M365: SharePointM365: SharePoint
M365: SharePoint
 
M365: рекомендації
M365: рекомендаціїM365: рекомендації
M365: рекомендації
 
M365: Огляд платформи Microsoft365
M365: Огляд платформи Microsoft365M365: Огляд платформи Microsoft365
M365: Огляд платформи Microsoft365
 
M365: Вступ
M365: ВступM365: Вступ
M365: Вступ
 
M365: Роздаткові матеріали
M365: Роздаткові матеріалиM365: Роздаткові матеріали
M365: Роздаткові матеріали
 
Meet&Code - VR, метавсесвіт та криптовалюти (1).pptx
Meet&Code - VR, метавсесвіт та криптовалюти (1).pptxMeet&Code - VR, метавсесвіт та криптовалюти (1).pptx
Meet&Code - VR, метавсесвіт та криптовалюти (1).pptx
 
Ви обрали професію програміста
Ви обрали професію програмістаВи обрали професію програміста
Ви обрали професію програміста
 
Змішане навчання в ППФК
Змішане навчання в ППФКЗмішане навчання в ППФК
Змішане навчання в ППФК
 
Формування професійних інтересів студентів
Формування професійних інтересів студентівФормування професійних інтересів студентів
Формування професійних інтересів студентів
 
День відкритих дверей' 2021
День відкритих дверей' 2021День відкритих дверей' 2021
День відкритих дверей' 2021
 
Спробуйте Python
Спробуйте PythonСпробуйте Python
Спробуйте Python
 
06. Обучение и сертификация по Azure
06. Обучение и сертификация по Azure06. Обучение и сертификация по Azure
06. Обучение и сертификация по Azure
 
05.Внедрение Azure
05.Внедрение Azure05.Внедрение Azure
05.Внедрение Azure
 
04.Службы Azure - подробнее
04.Службы Azure - подробнее04.Службы Azure - подробнее
04.Службы Azure - подробнее
 
03.Сколько стоит облако
03.Сколько стоит облако03.Сколько стоит облако
03.Сколько стоит облако
 

Recently uploaded

Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 

Recently uploaded (20)

Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 

Access 05

  • 2. MODULE OVERVIEW • Designing of complex databases.The concept of the normalization of the database. Linking fields • Query from several tables. Data scheme. Subordinated tables • Working with subordinate tables. Solving data integrity problems • Support for data integrity. Merge Options. Substitutions. Practical examples of substitutions • Types of relationships between tables
  • 3. LESSON 1: DATABASE DESIGN • Designing of complex databases.The concept of the normalization of the database. Linking fields • Query from several tables. Data scheme. Subordinated tables
  • 4. DATABASE DESIGN The process of solving a class of problems associated with the creation of databases: • Storing the necessary information in the database • The ability to receive data through the necessary requests • Reduce redundancy and data duplication. • Ensure data integrity • Elimination of contradictions • Data loss exclusion
  • 5. STAGES OF DATABASE DESIGN 1. Conceptual design • infological 2. Logical design • datalogical 3. Physical design
  • 6. STAGES OF DATABASE DESIGN 1. Conceptual design • infological 2. Logical design • datalogical 3. Physical design
  • 7. CONCEPTUAL DESIGN • Construction of a formalized domain model • built using graphic language tools • ER charts • without focusing on a specific DBMS • The main elements of the model: • Description of domain objects and links between them • Description of user information needs • basic database queries • Description of algorithmic data dependencies • Description of integrity constraints • valid data value requirements to the connections between them
  • 9. LOGICAL DESIGN • Mapping of the infological model to the data model used in a specific DBMS • for example the relational data model • For relational DBMS - a set of tables • with key fields • relationships between tables • If the infological model is constructed in the form of ER- diagrams, constructing tables according to certain formalized rules and normalizing them • This stage can be automated
  • 10. PHYSICAL DESIGN • Implementation of the datalogical model using specific DBMS • Choosing solutions related to the physical storage environment • disk space management • data access methods • data compression methods • Tasks are solved by DBMS and are hidden from the database developer
  • 11. NORMALIZATION • The process of converting a database to a form that meets normal forms • Designed to bring the database structure to a form that provides minimal redundancy • Not intended • decrease or increase in productivity • decrease or increase in database size • The ultimate goal is to reduce the potential inconsistency of information stored in the database.
  • 12. NORMAL FORM • Relation property in relational data model • characterizes it in terms of redundancy • could potentially lead to logically erroneous sampling or change results • Normal form is defined as the set of requirements that must be met by
  • 13. TYPES OF NORMAL FORMS • First Normal Form (1NF) • In a relational model, a relationship is always in first normal form by definition • Second normal form (2NF) • Third normal form (3NF) • Boyce-Codd Normal Form (BCNF) • Fourth normal form (4NF) • Fifth Normal Form (5NF) • Domain Key Normal Form (DKNF) • Sixth normal form (6NF)
  • 14. IN OTHERWORDS Elimination of redundancy due to the decomposition of relations • only primary data should be kept in every table • data that are not inferred from other stored data
  • 15. RELATIONSHIPS BETWEENTABLES • Recall the primary and foreign keys! • Database Tools > Relationships • Types of links: • One to one • One-to-many • Many-to-many*
  • 16. MANY-TO-MANY You need a junction table with a pair of foreign keys (and some related fields)
  • 18. QUERIES FROM MULTIPLE TABLES Alternative: SELECT DISTINCT Customers.City, Customers.CompanyName FROM Customers, Orders WHERE (((Orders.OrderDate) Between #1/1/19981 And #12/31/1998#) And (Customers.CustomerID = Orders.CustomerID)) ORDER BY Customers.City, Customers.CompanyName;
  • 19. LESSON 2: SUBORDINATE TABLES • Working with subordinate tables. Solving data integrity problems • Support for data integrity. Merge Options. Substitutions. Practical examples of substitutions • Types of relationships between tables
  • 20. DATA INTEGRITY • The fundamental principle of the theory of DB • Database restriction to ensure that the links between the data are valid and intact • Benefits: • Improved data quality • Development acceleration • Error reduction • Consistency between applications
  • 22. DATA INTEGRITY • check box Enforce Referential Integrity • Cascade Update Related Fields • when the key field of the main table changes, the corresponding values of the field of the related records will be automatically changed • Cascade Delete Related Records • when deleting a record in the main table, all related records in the subordinate table are also deleted
  • 27. RELATIONSHIPS BETWEENTABLES • Lt’s recall: • One-to-one • One-to-many • Many-to-many* • Ways to Join: • Inner Join • only those records from tables whose related fields match • Left outer join (Left Join) • all records of the first table and only those records of another table, the values of the associated field of which coincide with the values of the corresponding field of the first table • Right Join • Same as left outer join, but tables change roles
  • 28. TEST QUESTION It’s a good idea to think of relationships as having “sides.” (Pick one answer) 1. True 2. False
  • 29. TEST QUESTION Knowing which side a table is on tells you whether or not it uses a foreign key field It’s a good idea to think of relationships as having “sides.” Answer: 1. True
  • 30. TEST QUESTION To create one-to-many relationships, you do which of the following? (Pick one answer) 1. Use the primary key from the table on the “one” side as a foreign key in the table on the “many” side 2. Use a junction table with at least two foreign key fields 3. Turn off indexing for the primary key field
  • 31. TEST QUESTION In the asset-tracking database, you can now answer questions such as, “Which company supplies most of our computers?” To create one-to-many relationships, you do which of the following? Answer: 1. Use the primary key from the table on the “one” side as a foreign key in the table on the “many” side
  • 32. TEST QUESTION To create a one-to-one relationship, you do which of the following? (Pick one answer) 1. Turn off indexing for the foreign key field 2. Turn on indexing in the foreign key field, but allow duplicate values 3. Turn on indexing for the foreign key field without allowing duplicate values 4. Enable referential integrity
  • 33. TEST QUESTION If you allow duplicate values, you create a one-to-many relationship To create a one-to-one relationship, you do which of the following? Answer: 3. Turn on indexing for the foreign key field without allowing duplicate values
  • 34. TEST QUESTION Referential integrity is useful because it does which of the following? (Pick one answer) 1. Takes the place of an index 2. Keeps primary and foreign key values in synch 3. Allows you to “orphan” data safely
  • 35. TEST QUESTION Referential integrity can also make it easy to update and delete data Referential integrity is useful because it does which of the following? Answer: 2. Keeps primary and foreign key values in synch
  • 36. TEST QUESTION To create a many-to-many relationship between Table A and Table B, you do which of the following? (Pick one answer) 1. Create one-to-one relationships between A, B, and at least two other tables 2. Add the primary keys from A and B to a “link” or “junction” table 3. Add as many fields as needed from table A to table B, and vice versa, until each table contains all the data you need to track
  • 37. TEST QUESTION Those foreign keys allow you to see how the data on each side relate to each other To create a many-to-many relationship between Table A and Table B, you do which of the following? Answer: 2. Add the primary keys from A and B to a “link” or “junction” table
  • 38. TEST QUESTION This course has taught you everything you need to know about relationships. (Pick one answer) 1. True 2. False
  • 39. TEST QUESTION 6 This course has taught you everything you need to know about relationships Answer: 2. False
  • 40. EXERCISE 1. Reconsider the connections in your database and try to optimize its structure
  • 41. BOTTOM LINE • Designing of complex databases.The concept of the normalization of the database. Linking fields • Query from several tables. Data scheme. Subordinated tables • Working with subordinate tables. Solving data integrity problems • Support for data integrity. Merge Options. Substitutions. Practical examples of substitutions • Types of relationships between tables
  • 43. SELF-TEST • List the known stages of database design. • What is table normalization? • How many normal forms do you know? • Why is data integrity so important? • What kinds of links can exist between Access tables? • How to link database tables?