Solved

Need help for create table relationship between tables (MySQL)

Posted on 2008-10-05
2
908 Views
Last Modified: 2012-05-05
I'm new for the Php and MySQL and still studying.I have to complete e-channeling project for my study purpose and created following tables.I need

01)I need users to allow select multiple doctors.When he login show only he selected doctors.

02)one doctor can be specialist for one or more specialization.So i need relationship between them.

03)Availability(for example when user select Monday need show all Mondays in month and availability.

I think i have to create another tables and need create relationship between table.Please help me for create diagram for my project! i have create the diagram and attached it.

01)Users (user_id,username,password,salution,first_name,last_name,address, tel ,email)

02) Doctors(doc_id,salutation,initials,first_name,surname,address,tel,email)

03)Specialization(spe_id,specialization)

04)Hospital(hos_id,hos_name)

05)Weekdays(week_id,days)

06)Admin Users(admin_id,admin_name,admin_password)

Thanks
tables.jpg
0
Comment
Question by:chaminda7245
2 Comments
 
LVL 4

Accepted Solution

by:
kingmonty earned 500 total points
ID: 22647456
You will need a users/doctors relationship - many to many

table doctors_to_users:
user_id, doc_id (unique index user_id,doc_id as doc_to_usr_idx)

same for specialization/doctors

table spec_to_doc
doc_id,spe_id (unique index doc_id,spe_id as spec_to_doc_idx)

etc.



0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

New Relic: Our company recently started researching several products to figure out what were the best ways for us to increase our web page speed and to quickly identify performance problems that we may be having. One of the products we evaluated wa…
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
This video teaches users how to migrate an existing Wordpress website to a new domain.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now