Enjoy Upto 50% off on all Your Assignments ORDER NOW
Download Free Sample Order New Solution

Data Structure And Algorithms

Executive Summary of Database System Concepts

Numerical Key ID’s are used to differentiate between doctors, nurses, patients and records (visit record) so that same named doctors, nurses, patients can be identified uniquely and similar visits can be distinguished. Keys of doctor, patient, and nurse are also saved in records along other variables so that records for them can be filtered out. ID ranges are set to 1-50, 1-100, 1-1000 for doctors, nurses, patients respectively. While records id range varies with respect to visits starting from 1.

For management add, update, delete, search and display operations are selected for doctors, nurses, patients and records. While to display filtered visit records from records for specific doctor, nurse or patient their display record operations are also selected.

Binary search is selected for searching algorithm because at each iteration data for searching becomes half making it best for searching when data is very large. As we are using binary search so to make it perform best, we are using data structure binary tree capable of balancing itself so that data on left and right sides remains almost equal known as AVL tree for saving doctor, nurse, patient and record data. Binary search is used to implement search operations for doctor, nurse, patient and record within AVL tree. For management operations like add, update, delete binary search is used to locate node and perform the operation. Sorted data is displayed with the help of In order traversal within AVL tree. Similarly, in order to filter records for specific doctor, nurse or patient in order traversal is used while filtering data based on their ids.

As number of doctors, nurses, and patients are increased their ranges should also be increased. So ID ranges are set to 1-100, 1-200, 1-2000 for doctors, nurses, patients respectively. Since we used AVL tree so because of its auto balance property we will not require any change in the data structure and algorithms. The performance of the algorithms for operation will be approximately the same.

Due to the self-balancing property of AVL tree they are best fit where data is increasing and search is required.

Contents

Executive Summary:.

Introduction:.

Background:.

Case Study and Design:.

Conclusion:.

References:

Introduction to Database System Concepts

Data structures are basic for managing a ton of data, for instance, information kept in data bases or requesting organizations, adequately. Proper help of data systems requires the distinctive verification of memory assignment, data interrelationships and data gauges, all of which data structures help with. (Anh, 2009)

Likewise, it isn't only fundamental to use data structures but it is basic to pick the most ideal data structure for every task. Picking a befuddled data structure could achieve moderate runtimes or dormant code. Several components to consider when picking a data structure join what kind of information will be taken care of, where should existing data be set, in what limit should data be orchestrated and how much memory should be put something aside for the data. (Deo, 1994)

An algorithm is a lot of guidelines intended to play out a particular task. This can be a straightforward cycle, for example, duplicating two numbers, or an unpredictable activity, for example, playing a compacted video record. Web crawlers utilize exclusive algorithm to show the most pertinent outcomes from their quest list for explicit inquiries. (Hong, 2010)

An algorithm can be supposed to be ideal if the capacity that depicts its time unpredictability in the most pessimistic scenario is a lower bound of the capacity that portrays the time multifaceted nature in the most pessimistic scenario of an issue that the calculation being referred to tackles.

Background of Database System Concepts

Designing a system with some specific functionalities is an easy task but designing an optimized system has always been a difficult task. This report provides a best application of how to design an optimized hospital management system using a certain data structure. In order to design such system we need to store data and to store data a data structure plays a vital role. Basically a data structure is method of storing data so it tends to be utilized adequately. There are multiple types of data structures in practice such as array, linked list, stack, queue, binary tree, binary search tree, heap, hashing, graph, and matrix. This report basically focuses on how to select a specific data structure to store the data of the doctors, patients and the nursing staff of the hospital and to choose the best algorithm in order to find a specific nurse, doctor or a patient from the records stored in the data structure. Moreover it also provides a solid justification of why to choose the specific algorithm and the specific data structure. It also includes a part of modification, if required, in a specific scenario given in the case study. (Larsen, 1994)

The report states a scenario of hospital where there are hundred nurses, fifty patients and approximately thousand patients. The information needs to be stored and in order to store data a data structure is needed. Various functionalities are needed to be implemented in the system like searching a doctor, nurse, patient etc. In order to perform these functionalities some algorithm needs to be chosen in such a way that performs the required task as quick as possible. (Larsen, 1994)

Case Study and Design

Variables, Ranges and Keys

Doctor:

Key = DoctorID (1-50) number

Name = DoctorName (1-120) alphabets

Specialization = DoctorSpecs (1-120) alphabets

Nurse:

Key = NurseID (1-100) number

Name = NurseName (1-120) alphabets

Expertise = NurseExp (1-120) alphabets

Patient:

Key = PatientID (1-1000) number

Name = PatientName (1-120) alphabets

Age = PatientAge (1-200) integer

Records:

Key = RercordID (1 - 200000) number

Description = VisitDesc (100 - 500) words

Diagnosis = VisitDiagnose (100 – 500) words

NurseID foreign key

PatientID foreign key

DoctorID foreign key

Operations and the Justification

Doctor:

Add Doctor = Add doctor on the basis of ID to the data structure so that it can stored

Update Doctor = Update doctor on the basis of ID in the data structure so that its details can be changed

Delete Doctor = Delete doctor on the basis of ID to the data structure so that it can be removed

Search Doctor = Search doctor on the basis of ID from the data structure

Display Doctors = Display all doctors on the basis of ID in sorted order from the list

Display Doctor Records = Display all the records of doctor within the records data structure on the basis of DoctorID

Nurse:

Add Nurse = Add nurse on the basis of ID to the data structure so that it can stored

Update Nurse = Update nurse on the basis of ID in the data structure so that its details can be changed

Delete Nurse = Delete nurse on the basis of ID to the data structure so that it can be removed

Search Nurse = Search nurse on the basis of ID from the data structure

Display Nurses = Display all nurses on the basis of ID in sorted order from the list

Display Nurse Records = Display all the records of nurse within the records data structure on the basis of NurseID

Patient:

Add Patient = Add patient on the basis of ID to the data structure so that it can stored

Update Patient = Update patient on the basis of ID in the data structure so that its details can be changed

Delete Patient = Delete patient on the basis of ID to the data structure so that it can be removed

Search Patient = Search patient on the basis of ID from the data structure

Display Patients = Display all Patients on the basis of ID in sorted order from the list

Display Patient Records = Display all the records of patient within the records data structure on the basis of PatientID

Algorithms and the Justification

An AVL tree is a self-balancing binary search tree. AVL tree is a binary search tree which has the following properties:

The sub-trees of every node differ in height by at most one.

Every sub-tree is an AVL tree. (Inayat-ur-Rehman, 2009)

AVL tree checks the height of the left and the right sub-trees and assures that the difference is not more than 1. This difference is called the Balance Factor. The height of an AVL tree is always O (Log n) where n is the number of nodes in the tree.

AVL tree is the best optimized data structure because of its self-balancing property. So as it is balanced based on binary tree searching after each iteration there will be half data to search from as compared to previous iteration. And maximum iteration will be equal to log n thus it is best data structure for using binary search technique. As described above advantage of binary search is filtration of data by half after each iteration, making it most suitable for searching value in larger dataset. (V. Borovskiy, 2009)

So we will use AVL tree to store doctors, nurses, patients and records separately. Search operation will be done using binary search because of its suitability with AVL tree. As add, delete and update operations are dependent on search operation so they will also be optimal due to optimal search. Inorder traversal will be used to display data within AVL tree in sorted order for display operation. Inorder traversal will be updated to filter only records of specific doctor, nurse, patient for display doctor record operation, nurse record operation and patient record operation respectively. (Y. Zhang, 2008)

Modifications

As the number of doctors, nurses and patients doubles we will also have to double the ranges of their ids so that new doctors, nurses and patients can be added to the respective AVL tree. Records will also increase due to above factor so their id range will also be increased. In case of algorithm no change is required as AVL is self-balancer and adapts with increase in data. Below are the updated variables, ranges and key. (Z. Mehta, 2012)

Doctor:

Key = DoctorID (1-100) number [50 => 100]

Name = DoctorName (1-120) alphabets

Specialization = DoctorSpecs (1-120) alphabets

Nurse:

Key = NurseID (1-200) number [100 => 200]

Name = NurseName (1-120) alphabets

Expertise = NurseExp (1-120) alphabets

Patient:

Key = PatientID (1-2000) number [1000 => 2000]

Name = PatientName (1-120) alphabets

Age = PatientAge (1-200) integer

Records:

Key = RercordID (1 - 1000000) number [200000 => 1000000]

Description = VisitDesc (100 - 500) words

Diagnosis = VisitDiagnose (100 – 500) words

NurseID foreign key

PatientID foreign key

DoctorID foreign key

Conclusion on Database System Concepts

Binary Search is the best technique for searching within a tree if it is properly balanced. AVL tree is an adaptable data structure that can be used in environment where data will increase eventually. AVL tree is capable of saving new data without imbalance within tree. AVL tree and binary search are best match because binary search performance is max in balanced tree and AVL tree is always balanced. In the binary tree Inorder traversal gives sorted data.

References for Database System Concepts

Anh, N. K., 2009. Database System Concepts. In: s.l.:s.n., pp. 50-79.

Deo, M. M. a. D., 1994. Parallel dictionaries on AVL trees. Cancun, s.n., pp. 878-882.

Hong, L. J.-l. a. Z., 2010. Study of the AVL-tree index range query based on P2P networks. Guangzhou, s.n., pp. 1699-1702.

Inayat-ur-Rehman, S. K. a. M. S. H. K., 2009. A Survey on Maintaining Binary Search Tree in Optimal Shape. Kuala Lumpur, s.n., pp. 365-369.

Larsen, K. S., 1994. AVL trees with relaxed balance,". Cancun, s.n.

Borovskiy, J. M. M. S. a. A. Z., 2009. Binary search tree visualization algorithm. Beijing, s.n., pp. 108-112.

Zhang, W. Y. K. K. a. M. P., 2008. An AVL Tree-Based Dynamic Key Management in Hierarchical Wireless Sensor Network. Harbin, s.n., pp. 298-303.

Mehta, M. E. a. S. u. R. K., 2012. An improved algorithm to maintain the Binary Search Tree dynamically. Islamabad, s.n., pp. 253-257.

Remember, at the center of any academic work, lies clarity and evidence. Should you need further assistance, do look up to our Computer Science Assignment Help

Upto 50% Off*
Get A Free Quote in 5 Mins*
Applicable Time Zone is AEST [Sydney, NSW] (GMT+11)
+

Why Us


Complete Confidentiality
All Time Assistance

Get 24x7 instant assistance whenever you need.

Student Friendly Prices
Student Friendly Prices

Get affordable prices for your every assignment.

Before Time Delivery
Before Time Delivery

Assure you to deliver the assignment before the deadline

No Plag No AI
No Plag No AI

Get Plagiarism and AI content free Assignment

Expert Consultation
Expert Consultation

Get direct communication with experts immediately.

Get
500 Words Free
on your assignment today

ezgif

It's Time To Find The Right Expert to Prepare Your Assignment!

Do not let assignment submission deadlines stress you out. Explore our professional assignment writing services with competitive rates today!

Secure Your Assignment!

Online Assignment Expert - Whatsapp Get Best OffersOn WhatsApp

refresh