100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
College Notes Databases Week 2 (X_401008) $3.73
Add to cart

Class notes

College Notes Databases Week 2 (X_401008)

 8 views  0 purchase
  • Course
  • Institution

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

Preview 2 out of 5  pages

  • May 30, 2023
  • 5
  • 2021/2022
  • Class notes
  • J. endrullis (jörg)
  • Week 2
avatar-seller
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

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller simonvanrens. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $3.73. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

53068 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$3.73
  • (0)
Add to cart
Added