Chapter 3 - Relational database modeling

0.0(0)
studied byStudied by 4 people
full-widthCall with Kai
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/36

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

37 Terms

1
New cards

Relational database

A database that uses logic and shows the data as a group of tables

2
New cards

Relational schema

A big picture of the relational database model

3
New cards

Relation is a synonym for?

  • Relation table

  • Table

4
New cards

Column is a synonym for?

  • Attribute

  • Field

5
New cards

Row is a synonym for?

  • Tuple

  • Record

6
New cards

Relation

Its the table in the database that hold the rows and the columns(Holds all the information )

7
New cards

Requirements for a Relational table

  • All columns and rows must have a different name

  • values in the columns must have data from the same preset domain

  • in each row the columns values must be single valued from the preset domain

  • The columns need a primary key

<ul><li><p>All columns and rows must have a different name</p></li><li><p>values in the columns must have data from the same preset domain</p></li><li><p>in each row the columns values must be single valued from the preset domain</p></li><li><p>The columns need a primary key</p></li></ul>
8
New cards

Do order of rows and columns matter

No they dont

<p>No they dont</p>
9
New cards

Primary Key

Columns that have different and unique values for each row

<p>Columns that have different and unique values for each row </p>
10
New cards

What must all tables have ____ and how is it shown ______?

A Primary key, with an underline

11
New cards

Mapping entity rules

  • Each entity becomes a relational table

  • each attribute becomes a column

  • Unique attribute is the primary key

<ul><li><p>Each entity becomes a relational table </p></li><li><p>each attribute becomes a column </p></li><li><p>Unique attribute is the primary key </p></li></ul>
12
New cards

Mapping entity rules (Composite Attributes)

  • Each attribute that makes the composite is mapped in the table

  • In the backend the composite is not mapped

  • in the front end the composite is mapped for the users

<ul><li><p>Each attribute that makes the composite is mapped in the table</p></li><li><p>In the backend the composite is not mapped </p></li><li><p>in the front end the composite is mapped for the users</p></li></ul>
13
New cards

Composite primary key

Is a combination of multiple columns to make the primary key and is shown with underlining

<p>Is a combination of multiple columns to make the primary key and is shown with underlining</p>
14
New cards

unique composite attribute

The same mappings as a composite primary key

15
New cards

Optional attributes mapping

  • Each row does not need a value

16
New cards

Entity integrity constraints

does not allow for any row value in the primary row column to have an empty value

17
New cards

Foreign key

A column in the table that refers to the primary key in another table

18
New cards

Foreign keys have ______ that point to _____

Lines ; corresponding primary keys

19
New cards

How are foreign keys used

To represent different types of relationships

20
New cards

Bridge table

Created when mapping a many to many relationship and has to foreign keys that match tables primary keys that represent the two entities

21
New cards

Many to many relationships mappings need a ___?

Bridge table

22
New cards

One to one relationship mappings

  • One table will have a foreign key which is a primary key from another table

  • You can choose which table gets the foreign key but choose the mandatory one

23
New cards

Referential integrity constraints

In each foreign key the value in the rows either matches with one of the primary keys table or the space is empty

24
New cards

Referential integrity constraints lines

lines that point from the foreign key to the matching primary key

25
New cards

Granularity of the table

Describes what is shown in the table by one row

26
New cards

 Relational database constraint? 

  • is a bunch of rules that help keep the cohesiveness among the different tables that are being created.  It makes sure that all tables follow the same rules

27
New cards

 What are the business rules?

rules set by a business on its data, including field specifications, relationships, and actions like creating, updating, and deleting data.

28
New cards

Candidate Keys

Many unique attributes

29
New cards

Mapping candidate keys

One is chosen to be the primary key and the rest are mapped as regular attributes

30
New cards

Mapping multivalued attribute

  • Create a separate table with the name as the primary key

  • The foreign key is the name of the original base entity

<ul><li><p>Create a separate table with the name as the primary key</p></li><li><p>The foreign key is the name of the original base entity </p></li></ul>
31
New cards
<p>Mapping derived attributes</p>

Mapping derived attributes

Are not shown in the relational table abut is shown in the end application

<p>Are not shown in the relational table abut is shown in the end application </p>
32
New cards

Mapping unary relationship

  • Is mapped like a binary relationship

  • contains a foreign key which the relationship name

33
New cards

Unary M:M

  • Create a bridge table for the relationship name

  • The two foreign keys are the names of the relationship lines

<ul><li><p>Create a bridge table for the relationship name</p></li><li><p>The two foreign keys are the names of the relationship lines </p></li></ul>
34
New cards
35
New cards

36
New cards
37
New cards