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...

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

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

Hi,
thanks. i will go thro it..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.