Giter VIP home page Giter VIP logo

database-engine's Introduction

Database-Engine

An in-memory relational database in Java

The idea of this project is to create, manipulate, and query data. It is a relational database which includes databases, relations, and tuples. Each database can include multiple Relations. Each relation has a schema that is true for all rows in the relation. The schema is composed of attributes(what the column of that relation is) and domains(the data type for each column. Each relation has tuples, which are the rows of the relation. These tuples store data for each attribute and domain combination in the relation.

Drivers

Week 1 - Driver.java - Week 1 was the initial set up of the code for Database.java, Relation.java, and Tuple.java. Database.java constructs a database object with a hashmap including database names and relation objects. With this database object, we created methods to add relations, delete relations, get relations, display relations, display database schema, and return whether a relation with a given name already exists in the database or not. Relation.java constructs a relation object that has a name, attributes, and domains. Methods implemented in Relation.java were return whether or not attribute exists, return domain type of attribute, print relation schema, set name of relation, add tuple, print relation, and to string of relation. Tuple.java constructs a tuple object which includes the attribute and domains of the relation and an arraylist. Methods implemented in tuple.java were add a string component, add a double component, add a integer component, and to string of the tuple.

Week 2 - DriverW2a.java and DriverW2b.java - The goal of week 2 was to initialize a database from reading several files in a directory. Methods implemented were initialDatabase in Database.java that reads the files in the directory and creates the database, removeDuplicates in Relation.java that removes duplicate tuples from the relation, and equals in Tuple.java that tests the equality of tuples.

Week 4 - DriverW4.java - Methods implemented were Tuple.clone, Relation.member, Relation.union, Relation.intersect, and Relation.minus.

Week 6 - DriverW6.java - Methods implemented were Relation.rename, Relation.times, and Tuple.concatenate.

Week 7 - DriverW7.java - Methods implemented were Relation.project and Tuple.project.

Week 8 - DriverW8.java - Methods implemented were Relation.select and Tuple.select.

Week 9 - DriverW9a.java and DriverW9b.java - Methods implemented were Relation.join and Tuple.join.

database-engine's People

Contributors

nicksenador avatar

Stargazers

 avatar

Watchers

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