100% tevredenheidsgarantie Direct beschikbaar na je betaling Lees online óf als PDF Geen vaste maandelijkse kosten 4.2 TrustPilot
logo-home
Samenvatting

Summary Module1_Relational Database: Part 3

Beoordeling
-
Verkocht
-
Pagina's
8
Geüpload op
19-02-2019
Geschreven in
2018/2019

Business Information Management - Data Management subject. Third part of Module 1 Relational Database. This document contains all the slides, notes from 2 students and extra information collected on Internet. I had a 15 out 20 for this subject.

Meer zien Lees minder












Oeps! We kunnen je document nu niet laden. Probeer het nog eens of neem contact op met support.

Documentinformatie

Geüpload op
19 februari 2019
Aantal pagina's
8
Geschreven in
2018/2019
Type
Samenvatting

Onderwerpen

Voorbeeld van de inhoud

Converting Entity-Relationship Diagrams to
Relational Databases
The Rules
- Each entity will convert to a table.
- Each many-to-many relationship or associative entity will convert to a table. (a middle
table) If you have at ERD level one book as many authors and many autor have many
books
- During the conversion, certain rules must be followed to ensure that foreign keys appear
in their proper places in the tables. (it’s about the primary and foreign keys, that’s what
the db understands)
ERD doesn’t have primary keys or foreign keys
Converting a Simple Entity
S a le s p e rs o n S a le s p e rs o n C o m m is s io n
N um ber N am e P e rc e n ta g e Y e a r o f H ire
SA LESPERSO N
The table simply contains the attributes that were specified in
the entity box.
Salesperson Number is underlined to indicate that it is the
unique identifier of the entity and the primary key of the table.
Converting Entities in
Binary Relationships:
One-to-One
There are three options for designing
tables to represent this data.


One-to-One: Option #1
The two entities are combined into one
relational table.


S a le s p e rs o n S a le s p e rs o n C o m m is s io n Y e a r O ffic e
N um ber N am e P e rc e n ta g e of N u m b e r T e le p h o n e S iz e
H ire
S A L E S P E R S O N /O F F IC E
One-to-One: Option #2 He prefers this one
Separate tables for the SALESPERSON and
OFFICE entities, with Office Number as a
foreign key in the SALESPERSON table.




1

,One-to-One: Option #3
Separate tables for the SALESPERSON and
OFFICE entities, with Salesperson Number as a
foreign key in the OFFICE table.




Converting Entities in Binary Relationships: One-to Many

The unique identifier of the entity
on the“one side”of the one-to-
many relationship is placed as a
foreign key in the table
representing the entity on the
“many side.”
So, the Salesperson Number
attribute is placed in the
CUSTOMER table as a foreign key.




Many sales persons selling
many products and may
products are sold by many
sales persons: many to
many relationship
They have no FK but only
PK




Converting Entities in Binary Relationships: Many-to Many


2

, Here is
presented as
entity




- E-R diagram with the many-to-many binary relationship and the equivalent diagram
using an associative entity.

Converting Entities in Binary Relationships: Many-to Many
- An E-R diagram with two entities in a many-to-many relationship converts to three
relational tables.
- Each of the two entities converts to a table with its own attributes but with no foreign
keys (regarding this relationship).
- In addition, there must be a third“many-to-many" table for the many-to-many
relationship.




Converting Entities in Unary Relationships: One-to-
One
• With only one entity type
involved and with a one-to-
one relationship, the
conversion requires only one
table.

3
One to one
S a le s p e rs o n S a le s p e rs o n C o m m is s io n B ackup relationship
N um ber N am e P e rc e n ta g e Y e a r o f H ire N um ber
SA LESPER SO N

, Converting Entities in Unary Relationships: One-to-
Many
• Very similar to the one- One sales person is
to-one unary case. managed by one
manager and one
manager manages
many sales
persons
S a le s p e rs o n S a le s p e rs o n C o m m is s io n
N um ber N am e P e rc e n ta g e Y e a r o f H ire M anager
SA LESPER SO N

Converting Entities in Unary Relationships: Many-to-
Many 7-14




P ro d u c t P ro d u c t
N um ber N am e U n it P ric e
PR O D U CT
P ro d u c t S u b -A s s e m b ly
N um ber N um ber Q u a n tity
C O M PO N EN T

• This relationship requires two tables in the conversion.

• The PRODUCT table has no foreign keys.

7-15




4

, Converting Entities in Unary Relationships: Many-to-
Many
P ro d u c t P ro d u c t
N um ber N am e U n it P ric e
PR O D U C T
P ro d u c t S u b -A s s e m b ly
N um ber N um ber Q u a n tity
CO M PO N EN T

• A second table is created since in the conversion of a
many-to-many relationship of any degree — unary, binary,
or ternary — the number of tables will be equal to the
number of entity types (one, two, or three, respectively)
plus one more table for the many-to-many relationship.

Converting Entities in 7-16

Ternary Relationships
S a le s p e rs o n S a le s p e rs o n C o m m is s io n
N um ber N am e P e rc e n ta g e Y e a r o f H ire
SA LESPER SO N

S a le s p e rs o n C u s to m e r P ro d u c t
N um ber N um ber N u m b e r D a te Q u a n tity
SA LE

P ro d u c t P ro d u c t
N um ber N am e U n it P ric e
PRO D U CT
• The primary key of the SALE
table is the combination of the C u s to m e r C u s to m e r
unique identifiers of the three N um ber N am e H Q C ity
entities involved, plus the Date C U STO M ER
attribute. 7-17




5

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
shafaqsara Katholieke Universiteit Leuven
Bekijk profiel
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
14
Lid sinds
6 jaar
Aantal volgers
7
Documenten
12
Laatst verkocht
1 maand geleden

4,0

2 beoordelingen

5
0
4
2
3
0
2
0
1
0

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via Bancontact, iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo eenvoudig kan het zijn.”

Alisha Student

Veelgestelde vragen