Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2008
    Posts
    2

    Design question about storing info on different schools

    Hello all,

    I'm trying to design a database that stores information about different schools, which will be used in a web app. The information (in tables) for each school I am storing include students, majors, professors, courses, and course categories. I can easily design the tables for a single school, but the problem I am having is how to design the tables so that I can store this information for more than one school. Is it better to:
    -try to store all the information on all the schools in one db
    or
    -create a different instance of a db for each school, and when the user wants information on a specific school, select the specified database.

    Thanks!

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    one database

    have a schools table

    then use school foreign keys to distinguish all the other entities (i.e. school students, school professors, etc.)
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Nov 2008
    Posts
    2
    Quote Originally Posted by r937
    one database

    have a schools table

    then use school foreign keys to distinguish all the other entities (i.e. school students, school professors, etc.)
    Thanks for your reply!

    I was thinking about doing this before, but lets say each school averages 10,000 students and I'm trying to store information on 10 schools? The tables would then get pretty large. Is that ok?

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    100,000 rows is modest

    100,000,000 rows would be "pretty large"

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •