Solved

Need help for create table relationship between tables (MySQL)

Posted on 2008-10-05
2
932 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
It’s a strangely common occurrence that when you send someone their login details for a system, they can’t get in. This article will help you understand why it happens, and what you can do about it.
This video teaches users how to migrate an existing Wordpress website to a new domain.
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.

630 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