April 26th, 2000, 08:33 AM
I'm designing a database for the school district I work for with php/mysql which allows teachers to maintain their own class web site which has the following sections. The front page, pretty much a section for a newsletter from the teacher. A student showcase section where they can scan works that the children do and display them on the web. A homework section with current homework so parents can keep up do date on what their children are doing. A useful links section, pretty much a section of links the teacher finds are helpful. Lastly, a calendar section, the one I'm most confused about, where a teacher can keep a class schedule updated.
Right now, here's how I have everything setup.
The main database is named teachers. Inside the database, right now every teacher gets 2 tables, username_content, where all the content for their pages is stored.
username_images, a table with information about images they have stored currently in their image library. The actual images are kept on the web server. This table just has 3 columns, image identifier, image name, image description.
username_content right now right now has 5 columns. An id column, just a numeric id for the current content, a headline, an image for the post, the content section, and a category column which just tells which section of the web page the content is for.
I want to make 1 more table for teachers, username_calendar, which will store the calendar, but I'm not sure quite how I should set this up.
There's one other table, users which just has 3 columns, username, password, and which sections the user has access to.
Here's my question, is what I'm doing right now bad database design, should I have every teacher use 1 table? I'm new to database design so I'm doing this off of what I think is correct.
Secondly, how should I setup my calendar table? I'm lost as to how I can set it up. I know this is more of a php/mysql question, but I think it's more related to mysql so I posted it here.
Thanks for any help which you may provide in advance,
April 27th, 2000, 02:48 AM
i would suggest you to write down all the table names ,field names in a sheet of paper.
and work it out.that is the easy way to create a very good database system.
Here you can write some thing like this.
then write down field names for each table:
a)id (PRIMARY KEY AUTO_INCREMENT NOT NULL)
(like this way you can write the fields for all the tables)
After writing the field names,you may decide the size and type of the fields(eg: varchar(30)).
Hope this may help you to create your database.
trahma, I am doing some simular for the local boy scouts but I am going to use a php driven calendar program writen by a 3rd party. This will provide more options than just schdule info stored on a db.
D. E. L.
[This message has been edited by Dr_E_lectric (edited May 16, 2000).]