• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 5 pages
Class notes

College Notes Databases Week 2 (X_401008)

Document preview thumbnail
Preview 2 out of 5 pages

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

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

Document information

Study
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
$4.61

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

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
4.0
(1)
Sold
11
Followers
9
Items
10
Last sold
2 year ago



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

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions