yehiafarghaly / database-engine Goto Github PK
View Code? Open in Web Editor NEWDatabase Engine that supports Creating tables, Inserting, Deleting, Updating tuples, Selecting from table, and Creating Index
Database Engine that supports Creating tables, Inserting, Deleting, Updating tuples, Selecting from table, and Creating Index
Need to test the updateTable() method works properly. Not on corner cases as the validation method is not implemented yet. Just check that the basic functionalities are good. @malekelkssas
We have some unit tests for insertion and creation, but no tests for deletion or update yet. try to write some following the same pattern of GWT (Given-When-Then) comments.
We are using Junit5 and AssertJ library.
@Mohamed-Khaled308
Unit tests need to be written for milestone 2
After testing, code needs to be written in more readable way, Javadocs has to be added for the new methods and duplicates should be removed
Need a simple UI terminal to write SQL queries and execute them
We are calling empty validation methods in the DBApp class. Cases that should handle each of them should be placed inside the body.
@Aelmeky
I added 2 methods in the validator class :
validTable(String tableName) -> this one should check if the name of the table exists in the database.
validTuple(HashTable<String,Object> tuple) -> this one should make sure that the primary key does not exist already in the table, and that the input data is consistent with the datatypes defined for this table
Need someone to implement them @Aelmeky
During test found the following case ( In both Update and Delete) :
The tuple which contains the data to be updated had more attributes than it should. In this case it should through a DBAppException but it didn't, So please add a check that the size of the input hashtable is less than or equal to the number of table's columns. and add another check that each key in the tuple corresponds to an existing attribute in the table @Aelmeky
During test I found the following :
In case of deleting a row with id = 1 and name = "a" for example. Only 1 row should be deleted as id is a primary key, but instead all the rows with name = "a" were deleted. this should be fixed my linear search on all conditions satisfied together, not only one condition at a time @abdulrhman500 @malekelkssas
Need to handle the case when Index is created on the columns used to search for the tuples to be deleted @malekelkssas
Please try to make a meaningful message for each error for a better error tracing @Aelmeky
For the createTable(...) method in the project:
you must call the method that create the table file while creating table
Need to implement the octree using Observer design pattern by Thursday at maximum @Mohamed-Khaled308
The select method needs to be implemented by who ever finishes his task first
.
We need to create select method with index, Note that there is a case in it which depends on precedence of operators ( AND, OR, XOR)
Null wrapper class needs to be created to handle it
if table already exists
1> it adds data(colNameType + min + max) again to the metadata.csv file
2> min and max are allowed to be null
public static void main(String args[]) throws DBAppException, IOException {
DBApp app = new DBApp();
app.init();
String tableName = "Employee";
String PK = "id";
Hashtable<String, String> nameType = new Hashtable<>();
nameType.put("id", Constants.INTEGER_DATA_TYPE_NAME);
nameType.put("firstName", Constants.STRING_DATA_TYPE_NAME);
nameType.put("lastName", Constants.STRING_DATA_TYPE_NAME);
nameType.put("phone", Constants.STRING_DATA_TYPE_NAME);
nameType.put("qqq", Constants.STRING_DATA_TYPE_NAME); **// it does not have min or max but still accepted with no exception**
Hashtable<String, String> nameMin = new Hashtable<>();
nameMin.put("id", "0");
nameMin.put("firstName", "a");
nameMin.put("lastName", "a");
nameMin.put("phone", "0000000000");
Hashtable<String, String> nameMax = new Hashtable<>();
nameMax.put("id", "10000");
nameMax.put("firstName", "zzz");
nameMax.put("lastName", "zb");
nameMax.put("phone", "9999999999999");
app.createTable(tableName, PK, nameType, nameMin, nameMax);
System.out.println(app.getMyTables());
}
making a clean print methods for table and page
@YehiaFarghaly you must create the tables and pages file when you insert new pages and create new pages
I have to add a checking condition method for the min and the max of the tuple before allowing the insertion
Need someone to implement the method using Octree class
We should have a nice readme file ๐
the compareTo method cause in logical error because of trying to compare between different types that are not compatible.
When inserting a record to a page which is full, the correct functionality is :
you should handle the nulls in insertion (do not forget to use DBAppnull)
We need to edit the update method now to handle the case in which an index is implemented on the Clustering Key Column @Aelmeky by Wednesday at maximum
Need to handle the case when Index is created on the Clustering key column
We need the SQL parser to handle all operations allowed in our database @abdulrhman500 by Wednesday at maximum
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.