cs453: databases and state in web applications (part 2) prof. tom horton

8
CS453: Databases and CS453: Databases and State in Web State in Web Applications (Part 2) Applications (Part 2) Prof. Tom Horton Prof. Tom Horton

Upload: archibald-hunt

Post on 14-Jan-2016

214 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: CS453: Databases and State in Web Applications (Part 2) Prof. Tom Horton

CS453: Databases and State CS453: Databases and State in Web Applications (Part 2)in Web Applications (Part 2)

Prof. Tom HortonProf. Tom Horton

Page 2: CS453: Databases and State in Web Applications (Part 2) Prof. Tom Horton

Readings

• Textbook:– Chapter 17, Transactions

• On the web:– Virtual labs on MySQL– Other tutorials

• Quick intro: two chapters in Just Java• On-line book:

– PHP and MySQL Web Development. 3/e– http://proquest.safaribooksonline.com/0672326728

Page 3: CS453: Databases and State in Web Applications (Part 2) Prof. Tom Horton

DBMS and Web Apps

• Server-side applications use a database instead of flat files

• What are the advantages of this?

Page 4: CS453: Databases and State in Web Applications (Part 2) Prof. Tom Horton

Advantages of DBs

• Concurrent access

• Transactional integrity

• Backup, rollback,…

• Efficient storage of large amounts of data

Page 5: CS453: Databases and State in Web Applications (Part 2) Prof. Tom Horton

Relational Database Model

• Leading model of how to organize a DB• Tables• Rows and columns• Keys

• Multiple tables, with rows linked together by keys (“joins”)

• Tables as relationships

Page 6: CS453: Databases and State in Web Applications (Part 2) Prof. Tom Horton

SQL: Structured Query Language

• Common query language for accessing many RDBMS– Oracle, Postgres, MySQL, Sybase,

SQL Server– Slight variations between implementations

• Common commands:– SELECT for retrieving data– INSERT, UPDATE– ALTER

Page 7: CS453: Databases and State in Web Applications (Part 2) Prof. Tom Horton

Learn More…

• Virtual labs, tutorials, etc.

• Suggestions from CS462 veterans?

Page 8: CS453: Databases and State in Web Applications (Part 2) Prof. Tom Horton

Example