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

advertisement
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
DBMS and Web Apps
• Server-side applications use a
database instead of flat files
• What are the advantages of this?
Advantages of DBs
•
•
•
•
Concurrent access
Transactional integrity
Backup, rollback,…
Efficient storage of large amounts of
data
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
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
Learn More…
• Virtual labs, tutorials, etc.
• Suggestions from CS462 veterans?
Example
Download