Professional Documents
Culture Documents
Advanced Database Mini Project: States
Advanced Database Mini Project: States
com
through several tests in several modules. Then an assignment process is carried out to guide them
according to their choices and their averages while respecting the number of places available for each
master's specialty.
We consider the following relational diagram which represents Master's students as well as their
grades in different modules with the following extensions:
STUDENT(Rank,Code_E , Last Name, First Name, Average,
#Code_M , Note)
STUDENT
Rank Code_E Last name First name Mean specialty
10000 N1 P1
20000 N2 P2
30000 N3 P3
40000 N4 P4
50000 N5 P5
60000 N6 P6
MODULE
Page1/3
NOTES
10000 BDA 20
10000 PWAs 20
10000 MS 20
20000 BDA 10
20000 PWAs 10
20000 MS 6
30000 BDA 4
30000 PWAs 4
30000 MS 0
40000 BDA 20
40000 PWAs 20
40000 MS 20
50000 BDA 0
50000 PWAs 0
50000 MS 0
60000 BDA 1
60000 PWAs 2
60000 MS 3
Questions :
HAS.Using SQL*Plus, create the 03 tables (STUDENT, MODULE, NOTES) by specifying the
integrity constraints (key, foreign keys, etc.).
B.Insert the records as shown in the tables extension.
vs.Write a trigger to check that an inserted note must belong to the interval [0,20]. In case the
note exceeds the range, there should be an error message.
D.To writea slider to Calculate the average of each student in the STUDENT table (from the
Grades table). The cursor must also Order the STUDENT table according to the descending
order of the notesby inserting the row number of each student as follows (Students with
the same average must have the same rank):
The average=- (score * coefficient) / - coefficientsfor each student.
Rank Code_E Last name First name Mean specialty
1 10000 N1 P1 20
40000 N4 P4 20
3 20000 N2 P2 8.28
4 30000 N3 P3 2.28
5 60000 N6 P6 2.14
6 50000 N5 P5 0
Page2/3
E.Consider the choice table which represents the different choices of the students:
BDA: 10
PWA: 10
MS: 10
Create a tableMasterwhich has the same schema as the STUDENT table.
To writea second cursor which allows you to copy the records from the STUDENT table into the MASTER
table byaffecting the specialty (through the route of the CHOICE table) for each student according to
1 10000 N1 P1 20 RSD
40000 N4 P4 10 RSD
3 20000 N2 P2 8.28 IDTW
Note 3: The cursor must assign the specialties according to the table of choices and the number of places
available.
Good work
Page3/3