You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I merged all issues related to the database to this issue to have a single point of discussion. Since some changes overlap and there are changes in several aspects of the database, it makes sense to centralize these.
Classes architecure
There is currently 2 architecture being used for the Room classes:
Domain-based (e.g., grouping all classes related to visiting time together)
Function-based (e.g., splitting classes per DAO, entity, converter, etc.)
Initially, there was only the function-based architecture.
When I picked up the project, this architecture was not 100% followed, as there were DAO and Entity classes together in the root of the Room package. They are still there actually,
When I had to record additional data I tested using a domain-based organization.
So I am partially guilty of the current disorder.
After working on Nappa for the past weeks, I do feel like this pattern (domain-based) is better to work on, so I favour it.
However, I don't have the time to completely organize the database.
Sadly, I will need to leave this task for future contributors or when I have the time in the distant future.
Class names
Renaming the Entity classes from MyEntityData to simply MyEntity --> less verbose
With the addition of ActivityVisitTime, the entity SessionData could be renamed to ActivityVisitFrequency or simply VisitFrequency (in the case of the later, also rename the visit time entity)
Enforcing rules in the database level
Enforcing required data by either making entities attributes type primitive or annotating object types with @nonnull;
Enforcing foreign keys
Currently only enforced in the application levels, which allows adding invalid FK
Moving classes
Extracting model class UrlCandidateToUrlParameter from UrlCandidateDao;
Extracting model class SessionAggregate from SessionDao;
Extracting LAR operations from ActivityTableDao
LAR refers to PageRank, HITS and Salsa scores, but I am not sure what the acronym means;
Moving the class ParameteredUrl to Room.
This class is returned as a model in select operations in the DAO class UrlCandidateDao.
Database Views
Using DatabaseView to simplify some queries;
Warnings
Resolve warnings listed when building the library:
I observed that there are records in the entity RequestData with the property id_activity containing Null value. Is this the expected behaviour (e.g., requests that were not prefetched) or is this actually a bug? These records are never used in Nappa.
The text was updated successfully, but these errors were encountered:
I merged all issues related to the database to this issue to have a single point of discussion. Since some changes overlap and there are changes in several aspects of the database, it makes sense to centralize these.
Classes architecure
There is currently 2 architecture being used for the Room classes:
Initially, there was only the function-based architecture.
When I picked up the project, this architecture was not 100% followed, as there were DAO and Entity classes together in the root of the Room package. They are still there actually,
When I had to record additional data I tested using a domain-based organization.
So I am partially guilty of the current disorder.
After working on Nappa for the past weeks, I do feel like this pattern (domain-based) is better to work on, so I favour it.
However, I don't have the time to completely organize the database.
Sadly, I will need to leave this task for future contributors or when I have the time in the distant future.
Class names
MyEntityData
to simplyMyEntity
--> less verboseActivityVisitTime
, the entitySessionData
could be renamed toActivityVisitFrequency
or simplyVisitFrequency
(in the case of the later, also rename the visit time entity)Enforcing rules in the database level
Moving classes
UrlCandidateToUrlParameter
fromUrlCandidateDao
;SessionAggregate
fromSessionDao
;LAR
operations fromActivityTableDao
ParameteredUrl
to Room.UrlCandidateDao
.Database Views
Warnings
Possible bugs?
RequestData
with the propertyid_activity
containing Null value. Is this the expected behaviour (e.g., requests that were not prefetched) or is this actually a bug? These records are never used in Nappa.The text was updated successfully, but these errors were encountered: