Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Translated from French to English - www.onlinedoctranslator.

com

UniversityFerhat Abbas Sétif 0I


Faculty of Science, Computer Science Department 1
timeMasters year

Advanced Database Mini Project


States :
The purpose of this work is to classify undergraduate students according to their averages obtained

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,

Specialty) MODULE(Code_M , Title, Coefficient) NOTES(#Code_E,

#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

Code_M Entitled Coefficient

BDA Advanced Database 2


PWAs Advanced web programming 2
MS Modeling is simulation 3

Page1/3
NOTES

Code_E Code_M Note

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:

CHOICE(#Code_E, Choice1, Choice2, Choice3 )

Code_E Choice1 Choice2 Choice3

10000 RSD IDTW IFIA


20000 RSD IDTW IFIA
30000 RSD IDTW IFIA

40000 RSD IDTW IFIA


50000 RSD IDTW IFIA
60000 RSD IDTW IFIA

Create the tablechoiceand insert its records.


Modify the grades for student 40000 as follows and recalculate the average:

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

the number of limited places as follows:

Rank Code_E Last name First name Mean specialty

1 10000 N1 P1 20 RSD
40000 N4 P4 10 RSD
3 20000 N2 P2 8.28 IDTW

4 30000 N3 P3 2.28 IDTW


5 60000 N6 P6 2.14 IFIA
6 50000 N5 P5 0 IFIA

Note 1: the number of places is limited to 02 students per specialty.


Note 2: the assignment of specialties is dynamic, that is to say if the average is changed, the

assignment changes (the result of the cursor changes).

Note 3: The cursor must assign the specialties according to the table of choices and the number of places

available.

Good work

Page3/3

You might also like