Explanation of Solution
Tree structure to store the genealogical history of a family:
The tree structure to store the genealogical history of a family is shown below:
The general structure for normal linked list and the genealogical
Each node in the linked list is represented by the
Then each node in the linked structure of genealogical is represented by the below ways
Operations performed by the given tree:
The operation performed by the given tree are insertion and searching operation.
Pointers associated with each node by using linked structure:
In the linked structure, the pointers associated with each node is given below:
- Parent pointer
- Spouse pointer
- Left child pointer
- Right child pointer
- Sibling pointer
The general linked list structure for pointers associated with each node is given below
Procedure to perform the above linked structure:
Procedure InsertOperation(Tree, data)
if(Tree is None)
set the root pointer to a new node containing value;
Tree...
Want to see the full answer?
Check out a sample textbook solutionChapter 8 Solutions
Computer Science: An Overview (12th Edition)
- How do data structures contribute to the efficiency of various algorithms and operations in computer programs? Can you provide examples to illustrate this relationship?arrow_forwardin pharmacies in Turkey, it was decided to use a shared database. You have been assigned to design a database. You are given the following information:Patients are identified by their personal number and you need a record of their first name, last name, address and age. Each patient is assigned a primary doctor (family doctor).Doctors check the patients. They are identified by their registry numbers. You also need their first name, surname, specialty and years of experience. Every doctor has at least one patient. Doctors prescribe medication for patients. A doctor may prescribe one or more medications for several patients, and a patient may receive prescriptions from several doctors. Each prescription has a date and an amount associated with it. If a doctor prescribes a medicine more than once for a patient, all prescriptions must be kept.Each pharmaceutical company is identified by name and has a telephone number. Trade name and formula should be recorded for each drug. Each drug is…arrow_forwardin pharmacies in Turkey, it was decided to use a shared database. You have been assigned to design a database. You are given the following information:Patients are identified by their personal number and you need a record of their first name, last name, address and age. Each patient is assigned a primary doctor (family doctor).Doctors check the patients. They are identified by their registry numbers. You also need their first name, surname, specialty and years of experience. Every doctor has at least one patient. Doctors prescribe medication for patients. A doctor may prescribe one or more medications for several patients, and a patient may receive prescriptions from several doctors. Each prescription has a date and an amount associated with it. If a doctor prescribes a medicine more than once for a patient, all prescriptions must be kept.Each pharmaceutical company is identified by name and has a telephone number. Trade name and formula should be recorded for each drug. Each drug is…arrow_forward
- in pharmacies in Turkey, it was decided to use a shared database. You have been assigned to design a database. You are given the following information:Patients are identified by their personal number and you need a record of their first name, last name, address and age. Each patient is assigned a primary doctor (family doctor).Doctors check the patients. They are identified by their registry numbers. You also need their first name, surname, specialty and years of experience. Every doctor has at least one patient. Doctors prescribe medication for patients. A doctor may prescribe one or more medications for several patients, and a patient may receive prescriptions from several doctors. Each prescription has a date and an amount associated with it. If a doctor prescribes a medicine more than once for a patient, all prescriptions must be kept.Each pharmaceutical company is identified by name and has a telephone number. Trade name and formula should be recorded for each drug. Each drug is…arrow_forwardThe vocabulary of data terms should be explained in a few words. As time goes on, the data dictionary grows bigger and bigger, and it has more and more things in it.arrow_forwardusing c++ plz ............... You build the index by reading through the database account by account, inserting successive (account ID, record number) pairs into the tree as you progress through the file.Given an account ID, retrieval of the corresponding account record is a two-step process. First, you retrieve the data item from the index tree that has the specified account ID. Then, using the record number stored in the index data item, you read the corresponding account record from the database file. The result is an efficient retrieval process that is based on account ID.* Create a program that builds an index tree for the accounts database( Accountants database shown below should be saved in the file accounts.dat). Once the index is built, your program should• Output the account IDs in ascending order• Read an account ID from the keyboard and output the corresponding account recordRecord # Account ID First name Last name Balance0…arrow_forward
- a data structure for which there is no available solution that is based on an array or link, for instance.Is there a certain approach to the implementation that might be harmful to the structure?arrow_forwarda data structure for which there is no available solution based on arrays or links, for instance.Is there a way of implementation that, once executed, results in damage to the structure?arrow_forwardYou have hypothetically obtained access to a database listing the locations (in x, y coordinates) and names of all nearby restaurants. Only the following kind of questions are required: The question seeks to determine whether the given location is suitable for an eating establishment. I was wondering if you could explain why R-tree indexing was better than B-tree. Why?arrow_forward
- Let's pretend you have access to a database including the names and x, y locations of a variety of eateries. For the time being, let's pretend that just the following kinds of inquiries will be made: We need to know whether there is a restaurant near this address. Which indexing system is preferable, R trees or B trees? Why?arrow_forwardDiscuss some applications of the data structure queue. Provide detailed description of eachof these applications.arrow_forwarda data structure that stores an ordered list of items, where each item is directly accessible by a positional index a data structure that stores an ordered list of items in nodes, where each node stores data and has a pointer to the next node a data structure in which each node stores data and has up to two children, known as a left child and a right child a data structure that stores unordered items by mapping each item to a location in an array a data structure for representing connections among items, and consists of vertices connected by edges Graph, binary tree, hash table, array, linked list. Assign each term to its definition pleasearrow_forward
- Systems ArchitectureComputer ScienceISBN:9781305080195Author:Stephen D. BurdPublisher:Cengage Learning