chaminda7245 Posted October 7, 2008 Share Posted October 7, 2008 I'm new for the MySQL and Php.I have to complete project for my class.Please help me to create table structure for doctors e channeling system. I have created some tables structure and I need to know how create relationship between tables. 01)Need create relation ship between users and doctors.User can select one or many doctors from list box and when he login to website need show only selected doctors details(name.specializations,Hospital) 02)Doctors can be specialist for one or many specialization. 03)Search option should be by doctors by specializations by day(Monday to Sunday)If Monday select need show whole Mondays in month and availability. I think i have to create many more tables for relationship.Please help me for create table structure. Thanks & Regards, Chaminda7245 [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/127333-mysql-table-relationship/ Share on other sites More sharing options...
fenway Posted October 7, 2008 Share Posted October 7, 2008 What do you have so far? Link to comment https://forums.phpfreaks.com/topic/127333-mysql-table-relationship/#findComment-659098 Share on other sites More sharing options...
chaminda7245 Posted October 9, 2008 Author Share Posted October 9, 2008 Thanks for the reply.I have create only table structure.Actually I'm new for the php and mysql and before i didn't do any coding for the project.Please let me know what should i do. ??? ??? ??? Link to comment https://forums.phpfreaks.com/topic/127333-mysql-table-relationship/#findComment-660729 Share on other sites More sharing options...
fenway Posted October 11, 2008 Share Posted October 11, 2008 Well, since this is for a class, I presume you know some basic sql... Link to comment https://forums.phpfreaks.com/topic/127333-mysql-table-relationship/#findComment-662873 Share on other sites More sharing options...
Barand Posted October 11, 2008 Share Posted October 11, 2008 You have your main entities Users, Doctors, Specialization, Hospital, Weekday Look at each pair in turn and ask yourself "What is the relationship" 1 ) One to Many eg A hospital has many doctors but a doctor works for one hospital. In this case the id of the ONE table (hospital) is added to the columns for the MANY table (doctor) 2 ) Many to Many eg a user can have many doctors and a doctor can have many users In this case you need an intermediate linking table containing the ids of doctor and user. Link to comment https://forums.phpfreaks.com/topic/127333-mysql-table-relationship/#findComment-662949 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.