PHP and MySQL Tutorials - Modeling and Designing Relational Databases
Planning and designing a database is the essential first step to developing a web database application. In this tutorial, we introduce database modeling and the techniques to convert a model into the SQL statements needed to create a database.
This tutorial isn't intended to replace a tutorial on relational databases. Modeling requirements with an entity-relationship model requires both patience and experience. Instead, we detail our thought processes in a case study that models the winestore requirements and converts these to SQL CREATE TABLE statements. Pointers to resources on modeling and database design are included.
Table of content (tutorial index)
advertisement
Case Study: Relations in the Winestore
Entity-Relationship Modeling
System requirements analysis
Identifying entities in ER modeling
Identifying relationships in ER modeling
Relationships in the winestore ER model
Identifying key attributes in ER modeling
Other ER modeling tools
Completing the ER model
Step 1: Convert regular entities to tables
Step 2: Convert weak entities to tables
Step 3: One-to-one relationships
Step 5: Many-to-many relationships
Using a Database to Keep State
PHP Session Management and PHP Session Management Storage Methods
Building User-Defined Session Handlers
Session Table Structure
Support functions
sessionOpen
sessionRead
sessionWrite
sessionDestroy and Garbage collection
Using the User-Defined Session Handler Code
Resources
Web Server and Web Technology Resources
Libraries
Third-party products
Open source PHP applications