0

hi all,can anybody point out wats wrong in my database design, guide me right database ,i ve 4 tables i type all its attributes
its for hospital database
patient table
pid, pfname, plname, pcontactno, page, pplace ,pdocname, pprob ,ptype(this is for out patient,inpatient), pbill.
doctor table
docid ,docname, docplace ,doccontactno ,docdept
emp table
empid, empname, empcontactno ,empdept ,noofleave ,salary
bill table
patientid, p_pfname, doc_id, med_charges, ward_rent ,service charge ,total_bill.

all ids r primary keys, inorder to relate to other tables i ve given id of other as a foreign keys.plzz anybody guide me...

2
Contributors
4
Replies
5
Views
9 Years
Discussion Span
Last Post by palavi
0

bill table should not have a primary key of patient
a patient will have multiple bills
that patient should not have a column of pbill, unless it something associated with the patient

move pbill to bill table
then you can have a patient with multiple bills, and i'm not sure why the employee is present, i don't see where you are relating it to anything

0

hi, thank u for replying, k i ll remove pbill, why i ve employee is to get details of other employees like receptionist,nurse,or other workers in hospital. i ve assigned with a hospital management project n submit it in 2 days, shud generate reports of patients,doctors, employees and generate bills, and save transactions made into a database......k can u plz guide me to any tutorials for good database design...explains with examples.. i dont know how to make composite primary keys... n dont know to apply normalisation to DB,i ve only theoritical knowledge... bye thanks

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.