100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Class notes

College Notes Databases Week 2 (X_401008)

Rating
-
Sold
-
Pages
5
Uploaded on
30-05-2023
Written in
2021/2022

Databases for the 2nd year of Artificial Intelligence and Computer Science. Week 2 notes

Institution
Course









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Study
Course

Document information

Uploaded on
May 30, 2023
Number of pages
5
Written in
2021/2022
Type
Class notes
Professor(s)
J. endrullis (jörg)
Contains
Week 2

Subjects

Content preview

Databases week 2 – Translating conceptual to
relational models


From conceptual to relational model
Basic idea: entity sets and r4elationship sets are represented as
tables.
Roughly:
 One table for each entity set (name table = name entity set)
 One table for each relationship set (name table = name
relationship set)
 Columns roughly corresponding to attributes
A strong entity set becomes a table with:
 Columns for attributes
Weak entity set becomes table that includes:
 Columns for attributes and
 Columns for the primary keys of the identifying entity
A many-to-many relationship set becomes table with:
 Columns for the attributes of the relationship set and
 For the primary keys of the participating entity sets




Eliminating tables
Many-to-(zero or)one relations can be represented by:
- Adding an extra attribute/column to the many-side with the
primary key of the one-side

, If participation is partial (0..1) then replacing the yable by an
attribute will result in null values for the entities that don’t
participate in the relationship set
- If participation is total (0..1 or 1..1) declare foreign key not null
- For one-to-one (0..1 or 1..1) relationship sets either side can be
extended with the key of the other
- Tables for relationship sets linking weak entity sets to the
identifying entity set can always be eliminated
o No extra table is needed! Table of weak ES already
contains the key of identifying ES




Cardinalites and constraints
When translating ES and
relationship sets to tables:
- Every table should have
a primary key (if
possible)
- Declared foreign key
constraints for each relation
Foreign keys should be declared:
- Not null, or not,
- Unique, or not
To model the cardinality
limits as good as possible
All columns in tables from RS
are not nullable
Attributes should be declared
not null and/or unique if
appropriate



2

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
simonvanrens Vrije Universiteit Amsterdam
Follow You need to be logged in order to follow users or courses
Sold
11
Member since
5 year
Number of followers
9
Documents
10
Last sold
1 year ago

4.0

1 reviews

5
0
4
1
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions