mysql - Database design for a tutorial web application -




we have requirement of creating tutorial kind of application, there list of topics , each topics have sub topics. user can enroll topic, , go through sub topics , mark sub topics "completed". opting use mysql relational db.

so. there typically 3 master tables,

  1. users
  2. topics
  3. sub_topics

we planning continue approach making mapping tables 'users , topics' i.e 'user_topics' contains column user_id, topic_id, is_enrolled , mapping table track completion status of sub topics, may 'user_sub_topics' contains user_id, sub_topic_id, topic_id, is_completed

is best way design db? or other work around can done?

here few queries need data

  1. topic list display list of topics completed label if user has completed sub topics (join query help)
  2. topic detail page display list of completed sub topics too

please suggest

first have design such relational database finding relations between entities , study bit er or extended er diagram(entity relation) , convert diagram tables.

there step step method shows how , @ end can check normal form of tables , check whether satisfies purpose , how design.

i suggest fundamentals of database systems ramez elmasri provide great information database design





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -