Solved

Need help for create table relationship between tables (MySQL)

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

A publishing tool, a Version Control System, or a Collaboration Platform! These can be some of the defining words for the two very famous web-hosting Git repositories: Bitbucket and Github. Git is widely used amongst the programmers and developers f…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Wufoo.com provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.
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.

758 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