Changes between Initial Version and Version 1 of P6


Ignore:
Timestamp:
05/16/26 10:40:15 (11 days ago)
Author:
216009
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • P6

    v1 v1  
     1= Advanced Reports =
     2
     3== Report 1: Academic Resource Distribution ==
     4
     5=== Data requirements idea/concept title ===
     6
     7'''Faculty and Staffing Overview by University'''
     8
     9=== Data requirements description ===
     10
     11This report summarizes how many professors and subjects are assigned to each faculty within every university. It uses existing relationships between the university, faculty, professor, and subject tables to provide a "snapshot" of the university's size.
     12
     13=== Solution SQL ===
     14
     15{{{
     16#!sql
     17SELECT u.name AS university_name, f.name AS faculty_name, COUNT(DISTINCT p.id) AS total_professors, COUNT(DISTINCT s.id) AS total_subjects
     18FROM university u JOIN faculty f ON u.id = f.universityid LEFT JOIN professor p ON f.id = p.facultyid LEFT JOIN subject s ON f.id = s.facultyid
     19GROUP BY u.name, f.name
     20ORDER BY total_professors DESC;
     21}}}
     22
     23=== Solution Relational Algebra ===
     24
     25{{{
     26gamma_{u.name, f.name, count(p.id), count(s.id)}
     27(University |><| Faculty |><| Professor |><| Subject)
     28}}}
     29
     30== Report 2: Student Activity and Advising Monitor ==
     31
     32=== Data requirements idea/concept title ===
     33
     34'''Student Engagement Across Enrollment and Advice Modules'''
     35
     36=== Data requirements description ===
     37
     38This report combines two separate many-to-many relationships (student_subject and advice) into one view. It shows each student's home faculty, how many subjects they are currently enrolled in, and how many times they have requested advice from a professor.
     39
     40=== Solution SQL ===
     41
     42{{{
     43#!sql
     44SELECTs.name || ' ' || s.surname AS student_name, s.index_number, f.name AS faculty_name, COUNT(DISTINCT ss.subj_id) AS enrolled_subjects, COUNT(DISTINCT a.id) AS advice_requests
     45FROM student s JOIN faculty f ON s.facultyid = f.id LEFT JOIN student_subject ss ON s.id = ss.stud_id LEFT JOIN advice a ON s.id = a.student_id
     46GROUP BY s.id, s.name, s.surname, s.index_number, f.name
     47ORDER BY enrolled_subjects DESC;
     48}}}
     49
     50=== Solution Relational Algebra ===
     51
     52{{{
     53gamma_{s.name, s.index_number, count(ss.subj_id), count(a.id)}
     54(Student |><| Faculty |><| Student_Subject |><| Advice)
     55}}}
     56
     57
     58[[br]]
     59
     60[[br]]
     61
     62[[br]]
     63
     64= Advanced Reports AI Usage =
     65
     66Name of AI service: Gemini 3 Flash
     67
     68URL: https://gemini.google.com/
     69
     70Type of service: Free Tier
     71
     72Final result: The AI was utilized to troubleshoot Trac Wiki rendering issues and to cross-reference my SQL logic against the established database schema to ensure naming consistency.
     73
     74Results in details:
     75
     76- Debugging Wiki Syntax: After encountering a "Failed to load processor" error in the wiki editor, I used the AI to identify that a specific newline character was missing after the #!sql declaration.
     77
     78- Schema Verification: I used the AI to double-check the join conditions between my junction tables. It helped verify that I was correctly using student_id for the advice table and stud_id for the student_subject table, matching my existing database implementation.
     79
     80- Relational Algebra Formatting: The AI assisted in converting my logical steps into a standard text-based format (gamma and |><|) that would display correctly within the university's wiki environment without breaking the layout.
     81
     82Entire AI usage log:
     83
     84- [User provided current table structures and SQL drafts]
     85
     86- [AI identified syntax errors in the Wiki markup]
     87
     88- [User and AI collaborated to ensure SQL queries aligned with existing project code without adding unnecessary features]