benphp Posted November 17, 2009 Share Posted November 17, 2009 Hi - easy question for db masters. I have a registration system. I want to use the following tables: Courses cid|coursename People pid|first|last Class lid|cid|date|location|instructor The Class table will contain registration data for a specific event. My question is - is it better to have another field in Class called "Attendees" and add the pid separated by spaces/separator or is it better to create another table: Class_People lid|pid and track the attendees that way? Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/181827-database-structure-for-a-class-registration-system/ Share on other sites More sharing options...
ngreenwood6 Posted November 17, 2009 Share Posted November 17, 2009 You are better off creating the new table of Class_People. It is easier to just add them all to a table and then when you get the class id you can link the members of that class by the table rather than taking the data and having to do operations on it to get it to display how you want. Also in your class table you should probably break out the instructor and locations into their own tables. if you only have a couple locations its probably fine to leave that one there but I would break out the instructors into another table. Quote Link to comment https://forums.phpfreaks.com/topic/181827-database-structure-for-a-class-registration-system/#findComment-958932 Share on other sites More sharing options...
benphp Posted November 17, 2009 Author Share Posted November 17, 2009 Thanks! That's what I thought. I fear joins however. I must get over that. Quote Link to comment https://forums.phpfreaks.com/topic/181827-database-structure-for-a-class-registration-system/#findComment-958952 Share on other sites More sharing options...
ngreenwood6 Posted November 17, 2009 Share Posted November 17, 2009 Go on the internet and download an application called Navicat. Once you have it open you can connect to your database. In there you can view your tables. The reason I am telling you about this program is because there is an option in there for query. If you select it you can build a query right in the program (visually) and run it. It makes it really easy to build complex queries. Quote Link to comment https://forums.phpfreaks.com/topic/181827-database-structure-for-a-class-registration-system/#findComment-958961 Share on other sites More sharing options...
benphp Posted November 17, 2009 Author Share Posted November 17, 2009 Navicat - thanks, I'll try it! Follow up question - since I'll have 20 or so Attendees for each event (Class), it's no problem then to have a zillion entries in the Class_People table? Figure about 40 classes/mo would be 800 entries/mo and 9600 records/yr. Quote Link to comment https://forums.phpfreaks.com/topic/181827-database-structure-for-a-class-registration-system/#findComment-959289 Share on other sites More sharing options...
premiso Posted November 17, 2009 Share Posted November 17, 2009 Navicat - thanks, I'll try it! Figure about 40 classes/mo would be 800 entries/mo and 9600 records/yr. MySQL can handle that no problem. That is actually a very small amount of data. You have no worries Quote Link to comment https://forums.phpfreaks.com/topic/181827-database-structure-for-a-class-registration-system/#findComment-959333 Share on other sites More sharing options...
benphp Posted November 17, 2009 Author Share Posted November 17, 2009 Thanks again! This is a great forum. Quote Link to comment https://forums.phpfreaks.com/topic/181827-database-structure-for-a-class-registration-system/#findComment-959342 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.