Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask DBMS Expert


Home >> DBMS

Project: Managing a DB of Accounts

Your job is to implement a database (accounts stored in memory) management (access mechanisms) system as specified. Your program should loop forever to iteratively take an integer input from the user, and output accordingly with the information of the records in the database. A valid account #'s can be as large as up to 1 billion.

• Levels of completion:

1. DB of 8 records, reject new accounts when full

User input x  within ±1 billion

If account # |x| existing in DB

If account # |x| not existing in DB

Note

x < 0

Delete account # |x|

Report error, account not found

 

x > 0

Report found account #

Add   new   account # |x|

Reject when DB is full (with 8 accounts)

x = 0

Display all accounts

Sorted, from min to max

2. DB with n (≤ 256) records, LRU replacement policy

a) allow the user to initialize the size of DB (instead of 8) to be up to 256

b) no longer reject new account when DB is full: store the new account and replace the "oldest" according to Least Recently Use policy (add new account, found account both are considered as a recent Use. Display all account is not considered a Use for any account)

3. DB w/ binary search tree structure implementation

• Similarly to Level 2, allow the user to initialize the DB size (n):

• Rejecting new accounts upon full DB, 10pt. Implementing LRU replacement policy, 20pts.

• You are required to use a binary search tree structure to maintain the DB. (see https://en.wikipedia.org/wiki/Binary_search_tree)

• When displaying all the records, you will need to display the binary tree structure. For example, the tree shown here could be displayed as a list of all its nodes with two pointers (<- and ->) to the child nodes.

229_B Tree.png

All: #1 #3 #4 #6 #7 #8 #10 #13 #14
B-Tree:
<- #1 ->
#1 <- #3 -> #6
<- #4 ->
#4 <- #6 -> #7
<- #7 ->
#3 <- #8 -> #10
<- #10 -> #14
#13 <- #14 ->

DBMS, Programming

  • Category:- DBMS
  • Reference No.:- M91527640
  • Price:- $60

Priced at Now at $60, Verified Solution

Have any Question?


Related Questions in DBMS

In this section the student is required to develop a

In this section, the student is required to develop a technical debate based on his/her understanding using available scientific literature. The answer to this question should not exceed three A4 Pages. In the traditiona ...

Project outline and requirements provide a brief

Project Outline and Requirements Provide a brief description of the organization (can be hypothetical) that will be used as the basis for the projects in the course. Include company size, location(s), and other pertinent ...

Backgrounda new training organization called abc

Background A new training organization called ABC TechTraining is opening soon and they have approached you to help design their new database. They have just completed the refurbishment of the premises and are now lookin ...

You are in a real estate business renting apartments to

You are in a real estate business renting apartments to customers. Your job is to define an appropriate schema using SQL DDL in MySQL. The relations are Property(Id, Address, NumberOfUnits), Unit(ApartmentNumber, Propert ...

Assignment -scenario setup a mock phase 3 clinical trial

Assignment - Scenario: Setup a Mock Phase 3 Clinical Trial for evaluating the efficacy of a Blood Pressure/Weight Loss/ or Muscle Strength Enhancement supplement. Assume that the testing takes place at a physician's offi ...

Suppose that we have a table of house prices and a table of

Suppose that we have a table of house prices and a table of zip codes: • hprices(hid (PK),address,bedrooms,price,zipcode) • zipcodes(zipcode (PK),state) Write a SQL query that finds the average, maximum, and minimum pric ...

Sql transactions exercisesconsider table itemnameprice

SQL Transactions Exercises Consider table Item(name,price) where name is a key, and the following two concurrent transactions. T1: Begin Transaction; Update Item Set price = 2*price Where name = 'pencil'; Insert Into Ite ...

Assignmentqueries functions and triggersdatabase

Assignment Queries, Functions and Triggers Database Systems Aims The aims of this assignment are to: formulate SQL queries; populate an RDBMS with a real dataset, and analyse the data; design test data for testing SQL qu ...

Databases assignment - monash library services monlib case

Databases Assignment - Monash Library Services (MonLib) Case Study TASK 1: Data Definition For this task you are required to complete the following: 1.1 - Add to your solutions script, the CREATE TABLE and CONSTRAINT def ...

Question create an erd for the following scenario once you

Question: Create an ERD for the following scenario. Once you submit you will get access to the correct way to create the ERD. Please watch the video and correct any errors in your submission and resubmit. A small company ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As