Code Monkey home page Code Monkey logo

dbassignment's Introduction

db assignment

Installation & usage

This project is written in typescript, and runs in nodejs.

To get started:

  1. Install nodejs (I dont really know what minimum version you need, I used 20.10.0)
  2. Run npm install
  3. Run the tests with npm run test
  4. Run the "application" with npm run cli

Assumptions:

  1. Keys and values are only strings
  2. Object/hashmaps/dictionaries/sets/etc are not considered databases
  3. We don't actually care about concurrency/transaction management between sessions, just that we can hold temporary state correctly.
  4. It is acceptable to duplicate key/values to make "indexes", even though it is not acceptable to duplicate the database for a transaction.
    1. It is acceptable for transactions to duplicate the things they have modified (e.g. records and correlated indexes), including doubling the size of memory if every row is mutated.
  5. Example 4 should probably pass as well...
  6. We dont actually need to serialize state or support storing data larger than available memory.
  7. The runtime performance of heavily nested transactions is not as critical as scaling with large datasets, e.g. handling 10000 nested transactions is less vital than handling 10000 rows.
  8. It is less critical to shrink the database when keys or values are removed
  9. Set and Object lookups are O(1).
  10. ... more to come ...

dbassignment's People

Contributors

emarcotte avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.