Implement a database accounts stored in memory management

Assignment Help Database Management System
Reference no: EM13866954

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

Reference no: EM13866954

Questions Cloud

The debate of the cause of school and mass shootings : The debate of the cause of school and mass shootings due to either gun control laws or mental health services has been ongoing
Engineers code of ethics : Writing one page (Engineers code of Ethics). Select your preferred solution and write a brief justification for the solution of the ethical problem of Case 1033, "Ye Olde Water Main
Where management does not try to manipulate earnings : Where management does not try to manipulate earnings, there is a positive effect on earnings quality. The absence of earnings management does not, however, guarantee high earnings quality.
Write a paper about safe drinking water : Write a paper about Safe Drinking Water
Implement a database accounts stored in memory management : 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
Recognize the elements and correct use of a thesis statement : Recognize the elements and correct use of a thesis statement
Create a short story on design a new computer : Create a short story on Design a new computer
Is the death penalty a deterrent to murder : Once again, in the spirit of politics, this discussion question is in form of a debate-which means you must choose a side. Is the death penalty a deterrent to murder
Income statement into payments to employees : Given the following information, convert Robin Company 's salaries expense from its income statement into payments to employees for its statement of cash flows.

Reviews

Write a Review

Database Management System Questions & Answers

  Create a struct data structure for each file contained

Write a password protected console-based application, which enables you to create user accounts and specify the name of the file or directory to be shared with other users.

  Prepare a database using microsoft access

Using Microsoft Access, prepare a database and save it as Acme Inc. Prepare the following tables: Employees and Products. Field names for Employees table are first name,

  Benefits of using databases and dbmss

Assignment: Research organizational benefits of using databases and DBMS's. Supplement your research with a review of your lessons. Post a response to the discussion board: Respond to the following statements and, if appropriate, include personal e..

  Explaining controls for database to execute transaction

Controls which need a database to either execute transaction completely or not at all.

  Optimize the query in the select script using alter table

optimize the query in the select script using Alter Table to add appropriate indexes. Also use Optimize and Explain to show how the performance of this query has improved.

  Create a simple query for each table that returns

Create a simple query for each table that returns all of the columns and all of the rows for each table. Write a query that displays each part that has been purchased by Huffman Trucking Company

  Customer relationship management

Customer Relationship Management

  Advantages of database management

Discuss the advantages of a database management approach to the file processing approach? Give examples to illustrate your answer.Outline the benefits and limitations of the relational database model for business applications today?

  Draw the general hardware company entity-relational diagram

Draw the General Hardware Company Entity-Relational diagram. Choose a primary key for each of the relations. Choose foreign key(s) for each of the relations.

  Modify the no interest credit company application

Modify the No Interest Credit Company application so it executes continuously for any number of customers until a sentinel value is supplied for the account number.

  Design updateable database for storing customer and sales

Design an updateable database for storing customer and sales data. Explain how to deal with the problems of missing data.

  What a query execution plan

What a query execution plan? Discuss the reasons for converting SQL queries into relational algebra queries before optimization is done

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd