php - Multiple databases for clients -


i need databases mysql.

i building customer management system more 1000 users use system , each user have own clients in turn can have more 100 clients or more (unlimited). thinking should have separate databases in mysql or in 1 database user? when user creates own account automatically creates database files user , user have separate database , on.

please help.

i think problem describe known "multi-tennant" architecture.

there's no right or wrong answer - there whole bunch of considerations.

data size 1 - numbers mention aren't large enough make of difference. 1 million rows in mysql trivial (as long can use indexing).

other considerations:

  • maintainability: having 1 "large" database means new versions have migrated once - adding column or table, creating new index etc. conceptually easier, don't have repeat same script each client. however, operations may put of clients off-line hours; might bad thing.
  • versioning: if intend upgrade solution on time, e.g adding new features etc., having single database means have upgrade clients @ same time, whether want or not. reduces effort , complexity, clients may not ready upgrade (e.g. if they're exporting data system , you're changing schema).
  • service levels: many saas providers offer different service levels. might consider "bronze" shared infrastructure, , "gold" dedicated infrastructure.
  • row length isn't thing determining system performance - if let users create own reports, slow system down; might have complicated scripts run overnight archive data etc. may necessary partition customers after once problems become insurmountable.

Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -