Practical#06
Practical#06
OBJECT:
3. Write the file name for Database in file name box e.g. Hospital Database.
A window appears with three columns Field Name, Data type, Description.
I) Entering Fields:
5. Type Patient_id in first field & Press Tab key to switch to next column with heading
Data Type. A list triangle appears & selects a type from the list.
6. Press Tab key to go to Description column of the field. (Optional)
7. Repeat 4 & 5 for entering Name, Address, Doctor_Name, Admit_Date, Discharge_Status,
Discharge_Date & Charges fields.
8. Right click the field “Roll No”, click the primary key from this menu. It will set the Roll No
as a primary key.
18. Click show table. All created tables appear in show table box.
19. Select Patient table & click Add. Click Status table, click Add. Click close button.
20. Click Patient field of Patient table, drag the mouse tills field of Status table.
21. Click Enforce Referential integrity then click create button.
A Relationship between two tables appear.
22. Click Enforce Referential integrity then click create button.
25. Click Patient Table click Add, then click Status Table, click Add then close show Table
dialog Box. The tables appear boxes in select query window.
26. Double click the field Name, Dr_Name, Date, Dr.id, Test report, Prescription & diseases.
27. Select criteria, Dr_Name cell type Dr. Amin to see patients of Dr. Amin.
28. Press CTRL+S to save the Query. A saving window appears, enter a name for Query e.g.
Query1 & click OK.
29. Click Run button on tool bar Or choose Query, Run.
A query is performed & all Patients of Dr. Amin are displayed in a table.
Updating Desired Record:
By Query:
30. To create another Query repeat step 23 to 25.
31. Click in Patient Name, criteria cell. Type a Patient name e.g. “Danish” to update Prescription
of Particular patient.
37. Press CTRL+S to save the Query. A saving window appears, enter a name for Query e.g.
Query2 & click OK.
32. Click Run button on tool bar OR choose Query, Run.
A query is performed & Danish record is displayed in a table.
33. Replace the Prescription with Panadol.
37. Select records; Right click the button with triangle the left of record. Click delete.
38. Press CTRL+S to save the Query. A saving window appears, enter a name for Query e.g.
Query3 & click OK.