AILab-FOI / akdb

An experimental relational DBMS developed by students @ Faculty of Organization and Informatics, University of Zagreb
6 stars 23 forks source link

Popisati sve funkcije koje obavljaju više od jedne zadaće #229

Open mschatten opened 4 years ago

mschatten commented 4 years ago

Mnogo funkcija radi više od jedne operacije stoga bi tu jednu veliku funkciju trebalo razdijeliti na više manjih funkcija od kojih je svaka zadužena za točno jednu operaciju (zadaću) po SOLID principu.

Potrebno je proći kroz čitavi kod i pronaći sve funkcije koje rade više od jednog posla te ih ovdje u komentaru popisati (koja datoteka, koja funkcije, koje zadaće).

kmaodus commented 4 years ago

Javljam se za rješavanje zadatka.

kmaodus commented 4 years ago

According to refman.pdf version 0.9.3

File: dm/dbman.c Function: 5.14.2.28 AK_register_system_tables() Tasks: Function that registers system tables. Block at the given address is read. Various data from function arguments are written in block about different database elements

File: file/idx/bitmap.c Function: 5.27.2.4 AK_create_Index_Table() Tasks: Function that reads table on which we create index and call functions for creating index Elements that will be in index are put in list indexLista and headerAttributes. According to those elements new indexes are created.

File: file/idx/btree.c Function: AK_btree_insert() Tasks: Function that checks if there is free space in leaf, splits the leaf, inserts B+1 elements in two leafs, adds values in leafs, updates tree.

File: file/idx/index.c Function: 5.33.2.16 AK_print_index_table() Tasks: Function that prints out the index table.

File: file/table.c Function: 5.37.2.18 AK_rename() Tasks: Function for renaming table and/or attribute in table (moved from rename.c)

File: rel/aggregation.c Function: 5.54.2.5 AK_aggregation() Tasks: Function that aggregates a given table by given attributes. Firstly, AGG_TASK_AVG_COUNT and AGG_TASK_AVG_SUM are put on the beginning of the input object. Then for loop iterates through input tasks and assigns the type of aggregation operation according to aggregation operation. New table has to be created. For loop goes through given table. GROUP operation is executed separately from other operations. Addresses of records are put in needed_values array and results are put in new table.

File: rel/union.c Function: 5.72.2.2 AK_union() Tasks: Function that makes a union of two tables. Union is implemented for working with multiple sets of data, i.e. duplicate tuples can be written in same table (union)

Segment initialization can be separate function.

File: rel/intersect.c Function: 5.60.2.1 AK_intersect() Tasks: Function that makes a intersect of the two tables. Intersect is implemented for working with multiple sets of data, i.e. duplicate tuples can be written in same table (intersect)  

Segment initialization can be separate function

*there is a possibility that i missed a few functions

fmikolic commented 4 years ago

Javljam se za dopunjavanje rješenja

jantolos commented 3 years ago

Javljam se za dopunjavanje rješenja.