Database Schema
The STELLA Server also uses a relational database schema to track:
-
roles – Defines authorization roles that govern access and permissions within the system.
-
users – Represents all authenticated actors, including administrators, sites, and participants.
-
sessions – Captures individual experimental sessions, linking site users with selected ranking and recommendation systems.
-
results – Stores the outputs of ranking and recommendation requests, including returned items and query metadata.
-
feedbacks – Records user interaction data and evaluative signals for specific results.
-
systems – Contains metadata and configuration details for experimental and baseline systems evaluated in STELLA.
Accessing the Database
To access the STELLA Server database, run the following command:
Then connect to PostgreSQL:
You can now execute SQL queries directly against the database.
Model Definitions
The model definitions are documented directly from the codebase:
Feedback
Bases: Model
Represents user feedback for a specific ranking or recommendation.
Feedback captures interaction signals such as clicks and timing, optionally supporting interleaved result presentations.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
int
|
Primary key of the feedback record. |
start |
datetime
|
Timestamp when feedback collection started. |
end |
datetime
|
Timestamp when feedback collection ended. |
session_id |
int
|
Foreign key referencing the associated session. |
site_id |
int
|
Foreign key referencing the site user. |
interleave |
bool | None
|
Whether interleaving was used. |
results |
list[Result]
|
Results associated with this feedback. |
clicks |
dict | list | None
|
User interaction data (e.g., clicks). |
Source code in server/web/app/models.py
363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 | |
Result
Bases: Model
Stores the output of a ranking or recommendation request.
Results capture query-level information and returned items for both rankings and recommendations and can later be linked to user feedback.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
int
|
Primary key of the result. |
session_id |
int
|
Foreign key referencing the associated session. |
system_id |
int
|
Foreign key referencing the system that produced the result. |
feedback_id |
int | None
|
Foreign key referencing associated feedback. |
site_id |
int
|
Foreign key referencing the site user. |
participant_id |
int | None
|
Foreign key referencing the participant user. |
type |
str
|
Type of result (e.g., ranking or recommendation). |
q |
str
|
Query string issued by the user. |
q_date |
datetime | None
|
Timestamp of when the query was issued. |
q_time |
int | None
|
Time taken to process the query. |
num_found |
int | None
|
Total number of items found. |
page |
int | None
|
Page number of the result. |
rpp |
int | None
|
Results per page. |
items |
dict | list
|
Returned result items in structured form. |
Source code in server/web/app/models.py
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 | |
Role
Bases: Model
Represents an authorization role within the STELLA system.
Roles define the permissions and responsibilities of users accessing the STELLA Server. Typical roles include:
- Admin: platform administrators
- Site: experimental site owners
- Participant: contributors of experimental systems
Each user is associated with exactly one role.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
int
|
Primary key of the role. |
name |
str
|
Unique name of the role (e.g., "Admin", "Site", "Participant"). |
users |
list[User]
|
Users assigned to this role. |
Source code in server/web/app/models.py
System
Bases: Model
Represents a ranking or recommendation system evaluated in STELLA.
Systems can be experimental (submitted by participants) or baseline systems provided by sites and are linked to results generated during sessions.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
int
|
Primary key of the system. |
name |
str
|
Human-readable system name. |
participant_id |
int | None
|
Foreign key referencing the submitting participant. |
type |
str
|
System type (e.g., ranking or recommendation). |
results |
list[Result]
|
Results generated by this system. |
url |
str | None
|
Endpoint or reference URL of the system. |
submitted |
str | None
|
Submission identifier or flag. |
status |
str | None
|
Current system status. |
site |
int | None
|
Site identifier associated with the system. |
submission_date |
date | None
|
Date of system submission. |
Source code in server/web/app/models.py
User
Bases: UserMixin, Model
In this case the term "user" considers all actors who USE and access the stella-server.
Users include administrators, experimental sites, and participants who submit or evaluate ranking and recommendation systems.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
int
|
Primary key of the user. |
email |
str
|
Unique email address. |
username |
str
|
Unique username. |
role_id |
int
|
Foreign key referencing the user's role. |
password_hash |
str
|
Secure hash of the user's password. |
role |
Role
|
Role associated with the user. |