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

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

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