Introduction to Database Systems: CS312 An Overview of Databases - - PowerPoint PPT Presentation

introduction to database systems cs312 an overview of
SMART_READER_LITE
LIVE PREVIEW

Introduction to Database Systems: CS312 An Overview of Databases - - PowerPoint PPT Presentation

Database applications I have connections Common problems Group Work Introduction to Database Systems: CS312 An Overview of Databases Oliver Bonham-Carter 2 Sept 2020 1 / 20 Lets discuss... Database applications I have connections


slide-1
SLIDE 1

Database applications I have connections Common problems Group Work

Introduction to Database Systems: CS312 An Overview of Databases

Oliver Bonham-Carter 2 Sept 2020

1 / 20

slide-2
SLIDE 2

Database applications I have connections Common problems Group Work

Let’s discuss...

What is the function of a database?

1 / 20

slide-3
SLIDE 3

Database applications I have connections Common problems Group Work

Database Management System (DBMS)

Database Applications:

Banking: transactions Airlines: reservations, schedules Universities: registration, grades Sales: customers, products, purchases Online retailers: order tracking, customized recommendations Manufacturing: production, inventory, orders, supply chain Human resources: employee records, salaries, tax deductions

2 / 20

slide-4
SLIDE 4

Database applications I have connections Common problems Group Work

Databases at Our College!

Application:

Adding new students, instructors, and courses Registering students for courses, and generate class rosters Assigning grades to students, Computing grade point averages (GPA) Generating transcripts

3 / 20

slide-5
SLIDE 5

Database applications I have connections Common problems Group Work

To connect data in some meaningful way

4 / 20

slide-6
SLIDE 6

Database applications I have connections Common problems Group Work

Database - A True Story (sort of)

Databases were not always used as they are today ... They were often disconnected systems Isolated from other systems that contained similar data. (Why would anyone use this configuration??)

5 / 20

slide-7
SLIDE 7

Database applications I have connections Common problems Group Work

Meanwhile at Batman and Associates...

One database was working well...

One (simple) working database containing all company information.

6 / 20

slide-8
SLIDE 8

Database applications I have connections Common problems Group Work

Two teams join Batman and Associates...

7 / 20

slide-9
SLIDE 9

Database applications I have connections Common problems Group Work

Batman and Associates...

Two identical bases created from a single base

The database is copied into two new identical bases for use by two different teams in the Bat-cave.

8 / 20

slide-10
SLIDE 10

Database applications I have connections Common problems Group Work

Each team gets own DB...

9 / 20

slide-11
SLIDE 11

Database applications I have connections Common problems Group Work

Batman and Associates...

Problems in the Bat-cave

Nearly identical: no equal updating of each base. Teams verbally communicate changes to each other

10 / 20

slide-12
SLIDE 12

Database applications I have connections Common problems Group Work

Batman and Associates confuses an address...

What went wrong?! :-(

11 / 20

slide-13
SLIDE 13

Database applications I have connections Common problems Group Work

How Many Databases Do You Need??

Common problems

Let’s talk about ...

Common Problems with Databases

12 / 20

slide-14
SLIDE 14

Database applications I have connections Common problems Group Work

How Many Databases Do You Need??

Common problems

Database applications were once built directly on top of file systems (i.e., permanent records of information in various spread-out files) A firm may have managed several information sources! Anything wrong with this picture?

13 / 20

slide-15
SLIDE 15

Database applications I have connections Common problems Group Work

Messy Data Storage?

Risks of having several different DBs for same information

Drawbacks of using file systems to store data

Data redundancy and inconsistency Multiple file formats, duplication of information in different files - hard to share Difficulty in accessing data Need to write a new program to carry out each new task Data redundancy and inconsistency Data isolation - multiple files and formats

14 / 20

slide-16
SLIDE 16

Database applications I have connections Common problems Group Work

Messy Data Storage?

Drawbacks of using file systems to store data, continued

Data redundancy and inconsistency Integrity problems - The data is not accurate and consistently stored Data redundancy and inconsistency Integrity constraints (i.e., account balance ≥ 0) become “buried” in program code rather than being stated explicitly Hard to add new constraints or change existing ones

How many times did you see, “Data redundancy and inconsistency”, here?? How many times should you see the same data in your DB??

15 / 20

slide-17
SLIDE 17

Database applications I have connections Common problems Group Work

Messy Data Storage?

Atomicity of updates

An atomic transaction is an indivisible and irreducible series

  • f database operations such that either all occur, or

nothing occurs. Failures may leave database in an inconsistent state with partial updates carried out Example: Transfer of funds from one account to another should either complete or not happen at all

16 / 20

slide-18
SLIDE 18

Database applications I have connections Common problems Group Work

Messy Data Storage?

Concurrency: transactions at same time

Access by multiple users Access needed for performance - no slow-down Uncontrolled concurrent accesses can lead to inconsistencies Example: Two people reading a balance (say 100) and updating it by withdrawing money (say 50 each) at the same time

17 / 20

slide-19
SLIDE 19

Database applications I have connections Common problems Group Work

Messy Data Storage?

Security problems

Hard to provide user access to some, but not all, data Difficult to control how data is used How to watch all databases, all the time?

Database systems offer solutions to all the above problems

18 / 20

slide-20
SLIDE 20

Database applications I have connections Common problems Group Work

Video: Finding Trends in Data

Hans Rosling’s 200 Countries, 200 Years, 4 Minutes - The Joy of Stats https://www.youtube.com/watch?v=jbkSRLYSojo

19 / 20

slide-21
SLIDE 21

Database applications I have connections Common problems Group Work

Video: Questions

1 What kind of data was likely being used for this study? 2 Where could a database serve in this project? 3 How was the data likely organized for the study? 4 What kinds of relationships were likely used to connect

data points?

5 How could this study be done in absence of a database? 20 / 20