php - Unable to create a better database structure -


i want create basic project search buses 1 station another

let have 4 stations a,b,c,d , have 4 buses 1,2,3,4

root of buses

bus 1 : a->b->c->d bus 2 : a->c->d bus 3 : a->c->b bus 4 : a->b->d 

how can design database such system

i have tried

method 1: have created table 2 fields busno , busroute in bus route want store complete route of bus number. think searching in table complex

or please suggest me better idea such project

my hint is, 3 tables

bus

  • id
  • name

stops

  • id
  • name

route

  • busid
  • stopid
  • position

Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -