Solved

Need help for create table relationship between tables (MySQL)

Posted on 2008-10-05
2
922 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.

730 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