introduction to database systems: cs312 an overview of ...database systems o er solutions to all the...

Post on 02-Mar-2021

5 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Databaseapplications

I haveconnections

Commonproblems

Group Work

Introduction to Database Systems:CS312

An Overview of Databases

Oliver Bonham-Carter

2 Sept 2020

1 / 20

Databaseapplications

I haveconnections

Commonproblems

Group Work

Let’s discuss...

What is the function of a database?

1 / 20

Databaseapplications

I haveconnections

Commonproblems

Group Work

Database Management System (DBMS)

Database Applications:

Banking: transactionsAirlines: reservations, schedulesUniversities: registration, gradesSales: customers, products, purchasesOnline retailers: order tracking, customizedrecommendationsManufacturing: production, inventory, orders, supply chainHuman resources: employee records, salaries, taxdeductions

2 / 20

Databaseapplications

I haveconnections

Commonproblems

Group Work

Databases at Our College!

Application:Adding new students, instructors, and coursesRegistering students for courses, and generate class rostersAssigning grades to students,Computing grade point averages (GPA)Generating transcripts

3 / 20

Databaseapplications

I haveconnections

Commonproblems

Group Work

To connect data in some meaningful way

4 / 20

Databaseapplications

I haveconnections

Commonproblems

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

Databaseapplications

I haveconnections

Commonproblems

Group Work

Meanwhile at Batman and Associates...One database was working well...

One (simple) working database containing all companyinformation.

6 / 20

Databaseapplications

I haveconnections

Commonproblems

Group Work

Two teams join Batman and Associates...

7 / 20

Databaseapplications

I haveconnections

Commonproblems

Group Work

Batman and Associates...Two identical bases created from a single base

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

8 / 20

Databaseapplications

I haveconnections

Commonproblems

Group Work

Each team gets own DB...

9 / 20

Databaseapplications

I haveconnections

Commonproblems

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

Databaseapplications

I haveconnections

Commonproblems

Group Work

Batman and Associates confuses an address...What went wrong?! :-(

11 / 20

Databaseapplications

I haveconnections

Commonproblems

Group Work

How Many Databases Do You Need??Common problems

Let’s talk about ...

Common Problems with Databases

12 / 20

Databaseapplications

I haveconnections

Commonproblems

Group Work

How Many Databases Do You Need??Common problems

Database applications were once built directly on top of filesystems (i.e., permanent records of information in variousspread-out files)

A firm may have managed several information sources!

Anything wrong with this picture?13 / 20

Databaseapplications

I haveconnections

Commonproblems

Group Work

Messy Data Storage?Risks of having several different DBs for same information

Drawbacks of using file systems to store dataData redundancy and inconsistencyMultiple file formats, duplication of information in differentfiles - hard to shareDifficulty in accessing dataNeed to write a new program to carry out each new taskData redundancy and inconsistencyData isolation - multiple files and formats

14 / 20

Databaseapplications

I haveconnections

Commonproblems

Group Work

Messy Data Storage?

Drawbacks of using file systems to store data, continued

Data redundancy and inconsistencyIntegrity problems - The data is not accurate andconsistently storedData redundancy and inconsistencyIntegrity constraints (i.e., account balance ≥ 0) become“buried” in program code rather than being stated explicitlyHard to add new constraints or change existing ones

How many times did you see, “Data redundancy andinconsistency”, here??

How many times should you see the same data in yourDB??

15 / 20

Databaseapplications

I haveconnections

Commonproblems

Group Work

Messy Data Storage?

Atomicity of updates

An atomic transaction is an indivisible and irreducible seriesof database operations such that either all occur, ornothing occurs.Failures may leave database in an inconsistent state withpartial updates carried outExample: Transfer of funds from one account to anothershould either complete or not happen at all

16 / 20

Databaseapplications

I haveconnections

Commonproblems

Group Work

Messy Data Storage?

Concurrency: transactions at same time

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

17 / 20

Databaseapplications

I haveconnections

Commonproblems

Group Work

Messy Data Storage?

Security problems

Hard to provide user access to some, but not all, dataDifficult to control how data is usedHow to watch all databases, all the time?

Database systems offer solutions to all the above problems18 / 20

Databaseapplications

I haveconnections

Commonproblems

Group Work

Video: Finding Trends in Data

Hans Rosling’s 200 Countries, 200 Years, 4 Minutes - TheJoy of Stats

https://www.youtube.com/watch?v=jbkSRLYSojo

19 / 20

Databaseapplications

I haveconnections

Commonproblems

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 connectdata points?

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

20 / 20

top related