Session 2: Relational Databases

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

1/14

flashcard set

Earn XP

Description and Tags

Ch 4

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

15 Terms

1
New cards

Advantages of Databases : why it’s pref over traditional file

  • data is integrated into large pools of data

    • minimize data redundancies and inconsistencies 

  • Data is shared between diff units

    • cross functional analysis becomes efficient 

  • Data is independent of the programs that use the data

    • each can be changed without changing the others 

2
New cards

Database Management Systems (DBMS)

  • software system that manages and controls the data and interfaces between the data and the applications

3
New cards

Types of Databases

  • relational

  • hierarchical 

  • Network

  • Object Oriented 

4
New cards

Disadvantages of storing all data in one flat table

  • data redundancy 

  • Anomalies may arise

    • Update anomaly

    • Insert Anomaly

    • Delete Anomaly

5
New cards

Update Anomaly

  • changing a customer’s address involves searching the entire table and changing every occurrence of that customer’s address

6
New cards

insert Anomaly

  • there is no good way to store information about prospective customers or new products until a sales transaction is complete

7
New cards

Delete Anomaly

  • deleting a sales record could delete information about that customer or that product, resulting in unintended consequences

8
New cards

Solution of Anomalies

  • relational database 

    • Create multiple two dimensional data tables that are connected to form a relational database

      • independent, but still related

9
New cards

Elements of Data Hierarchy in relational databases

  • Database is a set of interrelated, centrally coordinated data files 

  • File (table) is a related group of records

  • Record (row) is a related group of fields 

  • Field (column) Specific attribute for the record 

10
New cards

Primary key in relational databases

  • an attribute or combo of attributes that uniquely identifies a specific record/row in a table

11
New cards

Foreign Key in relational databases

  • an attribute in a table that is also a primary key in another table and is used to link the two tables

12
New cards

Fact Table (ex. Sale)

  • contains facts abt a business process (sales of cars)

  • Contains foreign keys to link it to dimension tables

  • often long and contains more numerical fields

  • located at the center of star schema

13
New cards

Dimension Table (Salesperson)

  • contains attributes of the business process (ex. who made the sales) and those attributes can be used as filters or grouping variables in data analysis

  • contains primary key to link to fact tables

  • often short and contains more descriptive fields

  • surrounding fact table in a star schema

14
New cards

Cardinality (or relationship between tables)

  • one to many or many to 1 (1:* or *:1)

    • the column in one table (ex. fact table) can have many instances of a value, and the other related table

  • one to one (1:1)

    • the column in both tables has only one instance of a value, probably because that variable is a primary key of both tables

  • many-to-many (*:*)

    • this type of relationship could create errors

15
New cards