Your job is to implement a database accounts stored in


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

Solution Preview :

Prepared by a verified Expert
Database Management System: Your job is to implement a database accounts stored in
Reference No:- TGS01151846

Now Priced at $60 (50% Discount)

Recommended (94%)

Rated (4.6/5)

A

Anonymous user

5/19/2016 12:54:26 AM

The assignment is all about Managing a DB of Accounts. Your job is to apply a database (that is, accounts stored in memory) management (that is, access methods) system as specified. The program must loop forever to iteratively take an integer input from the user and output accordingly by means of the information of the records in the database. Valid account #'s can be as big as up to 1 billion. Levels of completion: 1) DB of 8 records refuses new accounts when full 2) DB having n (= 256) records, LRU replacement policy a) Let the user to initialize the size of DB (rather than 8) to be up to 256 b) No longer refuse new account whenever DB is full: store the new account and substitute the ‘oldest’ according to Least Recently make use of policy.