• No se han encontrado resultados

The following is a description of all the entities and their attributes in the EAR-diagram above. Relationships between two entities will be described together with the entity that is the owning side of the relationship, i.e. the entity that represents the “many” side in a many-to- one or a one-to-many relationship.

A.2.1 Elementtemplate

Elementtemplate holds information about a template that is used to check studentsolutions for similarity with other handed in studentsolutions.

Attribute Description Datatype Key

elementtemplateID Identifies a template. Is

automatically incremented. INT UNSIGNED Primary languageID The languagetype the template is

defined for.

INT

UNSIGNED

Foreign checkelementAmount The number of elements a template

uses to check for similarity.

MEDIUMINT UNSIGNED Relationship:

- Elementtemplate –Languagetype (many-to-one):

An Elementtemplate is connected to one Languagetype, and a Languagetype can be connected to zero or many Elementtemplate’s.

1 EAR = Entity And Relationship

A.2.2 Checkelement

Checkelement holds information about a checkelement used for an elementtemplate, e.g.”if{”, ”for(” or ”while{”. It is normally 3-15 different checkelements per elementtemplate (but there are no restrictions).

Attribute Description Datatype Key

checkelementID Identifies a checkelement. Is automatically incremented.

INT

UNSIGNED

Primary elementtemplateID Identifies the elementtemplate the

checkelement belongs to. INT UNSIGNED Foreign checkelement A string that the elementtemplate

uses to check studentsolutions for similarity (the string is pieces of code like e.g.”for(” or ”while{”.

VARCHAR

Relationship:

- Checkelement –Elementtemplate (many-to-one):

A Checkelement is connected to one Elementtemplate, and an Elementtemplate can be connected to zero or many Checkelement’s.

A.2.3 Elementoccurrence

Elementoccurrence holds information about the number of occurrences of a specific checkelement in a studentsolution.

Attribute Description Datatype Key

elementoccurrenceID Identifies an elementoccurence. Is automatically incremented.

BIGINT UNSIGNED

Primary checkelementID Identifies the checkelement the

elementoccurence belongs to.

INT

UNSIGNED

Foreign studentsolutionID Identifies a student solution that the

number of checkelement occurences is counted for.

INT

UNSIGNED

Foreign

occurrenceAmount The number of occurrences of a checkelement in a studentsolution.

MEDIUMINT UNSIGNED

Relationships:

- Elementoccurrence - Checkelement (many-to-one):

An Elementoccurrence is connected to one Checkelement, and one Checkelement can be connected to zero or many Elementoccurrence’s.

- Elementoccurrence – Studentsolution (many-to-one):

An Elementoccurrence is connected to one Studentsolution, and one Studentsolution can be connected to zero or many Elementoccurrence’s.

A.2.4 Studentsolution

A studentsolution holds information about an assignment a student has handed in. Because a student has the possibility of handing in the same assignments several times, the entity needs a unique identifier, studentsolutionID, in addition to the foreign keys.

Attribute Description Datatype Key

studentsolutionID Identifies a studentsolution. Is

automatically incremented. INT UNSIGNED Primary assignmentID The identifier of the assignment the

studentsolution is handed in for. INT UNSIGNED Foreign

username The students username. VARCHAR Foregin

languageID The programming language the assignment is written in.

INT

UNSIGNED

Foreign deliveryTime Time and date for the delivery of the

studentsolution. DATETIME

text The text of the studentsolution for

an assignment. LONGTEXT

byteSize The length of the text in number of bytes when it’s stripped for

comments and spaces (for comparison against other studentsolutions).

MEDIUMINT UNSIGNED

lineAmount The number of lines in the text, including comments.

MEDIUMINT UNSIGNED compression Indicates whether the

studentsolution is compressed or not (default: 0 - i.e. no compression)

BOOL

vectorlength The length of the vector used in the algorithm to check for similarity.

FLOAT UNSIGNED vector The vector used in the algorithm to

check for similarity.

FLOAT UNSIGNED

Relationships:

- Studentsolution – Assignment (many-to-one):

A Studentsolution is connected to one Assignment, and one Assignment can be connected to zero or many Studentsolution’s.

- Studentsolution – Student (many-to-one):

A Studentsolution is connected to one Student, and a Student can be connected to zero or many Studentsolution’s.

- Studentsolution – Languagetype (many-to-one):

A Studentsolution is connected to one Languagetype, and one Languagetype can be connected to zero or many Studentsolution’s.

A.2.5 Reportcase

A reportcase holds information about a check for similarity that ended with two studentsolution beeing suspicious.

Attribute Description Datatype Key

reportcaseID Identifies a reportcase. Is

automatically incremented. INT UNSIGNED Primary studentsolutionID_1 The identifier of a

studentsolution.

INT UNSIGNED Foreign studentsolutionID_2 The identifier of a

studentsolution.

INT UNSIGNED Foreign checkedBy The username of an employee that

has evaluated the two studentsolutions and sat the alteredStatus.

VARCHAR Foreign

sizeDifference The largest studentsolutions size divided by the smallest

studentsolutions size. Calculated by the algorithm.

FLOAT UNSIGNED

equalityValue The angle betewwn the two studentsolutions vectors. Calculated by the algorithm.

FLOAT UNSIGNED status The status of the similarity

between the two studentsolutions, sat by the algorithm.

ENUM(’Nesten lik’, ’Lik’) alteredStatus The status of the similarity

between the two studentsolutions, sat by an employee. Default is ‘Usjekket’

ENUM(’Usjekket’ ’Ulik’, ’Nesten lik’)

Relationships

- Reportcase-Studentsolution (studentsolutionID_1 – studentsolutionID) (one-to-one): A Reportcase is connected to one Studentsolution for the studentsolution identified by the attribute studentsolutionID_1.

- Reportcase-Studentsolution (studentsolutionID_2 – studentsolutionID) (one-to-one): A Reportcase is connected to one Studentsolution for the studentsolution identified by the attribute studentsolutionID_2.

A.2.6 Assignment

An assignment holds information about assignments in a course. Because the assignment-number can be similar for different courses, the identifier of the entity is assignmentID that uniquely identifies an assignment.

Attribute Description Datatype Key

assignmentID Identifies an assignment. Is

automatically incremented. INT UNSIGNED Primary assignmentNo The number of the assignment (e.g.

1, 2, 3, ...).

SMALLLINT UNSIGNED courseID Identifies the course the assignment

belongs to.

INT

UNSIGNED

Foreign languageID The identifier of the languagetype

(programming language) the assignment is to be written in.

INT

UNSIGNED

Foreign

deadline The deadline (time and date) for delivery of an assignment.

DATETIME assignmentText The text of the assignment. LONGTEXT

limit1 Limit 1 used by the algorithm to

determine similarity. FLOAT UNSIGNED limit2 Limit 2 used by the algorithm to

determine similarity. FLOAT UNSIGNED Relationships:

- Assignment – Course (many-to-one):

An Assignment is connected to one Course, and a Course can be connected to zero or many Assignment’s.

- Assignment – Languagetype (many-to-one):

An Assignment is connected to one Languagetype, and a Languagetype can be connected to zero or many Assignment’s.

A.2.7 Course

A Course holds information about a course. Because a course can be hold several times with the same course code and course name, there is a need for an identifier that uniquely identifies a course, courseID.

Attribute Description Datatype Key

courseID Identifies a course. Is automatically incremented.

INT

UNSIGNED

Primary courseCode Identifier for a course used at the

University of Oslo, e.g.”INF1010”.

VARCHAR courseName The full name of the course, e.g.

”Objektoriented programming”. VARCHAR

semester A course can be held in both spring and fall semester (e.g. V2006 or H2006).

VARCHAR

A.2.8 Coursegroup

A Coursegroup holds information about a course that belongs to a course.

Attribute Description Datatype Key

coursegroupID Identifies a coursegroup. Is automatically incremented.

INT

UNSIGNED

Primary courseID The identifier of the course the

group belongs to.

INT

UNSIGNED

Foreign

groupNo The number of the group. SMALLINT

UNSIGNED Relationship:

- Coursegroup – Course (many-to-one):

A Coursegroup is connected to one Course, and a Course can be connected to zero or many Coursegroups.

A.2.9 Student

Student holds information about a student that participates in a course. A students username is uniqe.

Documento similar