Analysis of database design for students ' elective course and grade management system

Source: Internet
Author: User

What's the volume database?

A database is a collection of large amounts of data that are stored on your computer that can be shared by the organization

Then we should solve two problems.

First how to save

What's the second deposit?

Third how to take

IV How to update

So what kind of data structures are designed to implement what functions are closely related

Then see the title can be thought of is the student selection course and student performance management

Then the most basic must have students, courses, grades

These three kinds of data objects

If we have a large number of data instances, we can get into these kinds of data objects.

So first of all, we have to analyze the relationship between students and the curriculum is selected and selected.

So here's a basic question. Through an example of a student how do we know which courses he chose?

In graph theory, we know that if a student took a course, we could even

A[stuid].push_back (CourseID)

B[courseid].push_back (Stuid)

So, every time we check out a student's choice of classes, we go through the linear table, OK.

This seems to be a small amount of data without considering the complexity of the time?

The meaning of such a deposit seems to be. Each student number represents a table. And then there's a bunch of course structures.

And so is the course ... Equivalent to a table set

Linked list:

What should be handled in the database?

I haven't figured out how to handle it properly.

But we still have a way out.

Which is to save an elective relationship table.

Each article is an entry for the course Student Association.

But this course information is redundant.

In fact, students and information are quite redundant.

Later asked the chicory. This deposit method is actually correct ...

Because of your o (n) space how to save the next n^2 diagram?

There is a difference between a linked list and a table that is stored on the edge.

Only one header is stored on the list

The side table will repeat the number of headers

The side table can be traversed in two directions, which is not available in the list. Linked lists can only be one-way. To be exact, compare two keywords at a time.

So our side table is the equivalent of merging the two linked lists that I just said, and we use this side table for fast access.

So what is the primary key for this course of selection relationship? Anything that uniquely identifies a single ancestor can be used as a primary key.

Obviously here we can let Stuid,courseid to be the primary key, this repetition is unreasonable, right? How to hash out different hash values is the database thing?

So we just. Draw out the course separately. Do you choose a timetable for each course?

About students and grades as well as courses and achievements.

So one way of thinking is that. We can refer to the primary key of the selected timetable.

So.. The premise of success is that a student has chosen this class.

Then we can refer to this relationship. Then for each of the elective relationship can correspond to a score.

Then this achievement is both the student's achievement and the course achievement.

If we only save Stuid,courseid, we have to go to the students ' table and the timetable.

Then we can take extra space to save up some of the students ' information. And some information about the course. This reduces the time to find

The equivalent is to use space to change time. The consequence of doing so is to increase the space. And every update will be updated in real time.

The fact that the linked list is stored in the database is actually to turn the list into an edge pair and then put the edges in, of course, to deal with the only

There is also the fact that ... Find the path is generally not stored in the database, how to check and how efficient query is the programmer and the database design of the first work?

What is generally a good job to do is to maintain the logic of the data? Maintain a good relationship between data?

Refactoring of the database: It seems that there is no qualification to consider.

Then the relationship between the three should be clear ...

Then we have to implement other functions ...

Other features to be implemented I haven't cleared it yet. Let's get them all on the phone again.

But there is still a problem with the result. If you say. The student took a course but didn't have a test. So, what's his score?

If it is 0, then the test can be 0 ah, right? There is ambiguity in the. We can also open a different sign to judge the status of the exam.

Then there are problems with grades. If there are other types of grades added: For example.. Usual results. Experimental results: Exam Results

So for this type of extension: Because the relationship doesn't change much. Basically we can consider attaching directly to the basic score or

Behind the final results

Sometimes the processing of this business logic can be handed over to people? For example, how much does a certain score count. What's the score?

=========

Let's analyze the function of the system administrator (1 people)

In the demand analysis, I wrote. This job only needs to be done by one person.

First of all, he will carry out the information maintenance of the educational administrator.

That is, for the academic administrator of all the information and additions and deletions to change. Includes changes to the administrator's user name and password

Because this involves security. So.. To consider the issue of special and authority issues. After all, not everyone can operate.

The special sentence is usually put in the procedure to deal with?

And we have to design the educational administrator to have the necessary information to be registered

He also has to carry on the basic information of the Department of the addition and deletion of the search and change. So above he said the top level teaching unit is the hospital. So

We need to have a table to save all the hospitals.

And then we need to build a table. The foreign key is the faculty, which indicates which departments are in each hospital.

With the department we also need to build a professional watch.

The foreign key is the department. Indicate which specialties are available in each department.

With the professional watch we also need to create a class table.

Foreign key is professional. Indicate which classes are available for each specialty

In addition, the system administrator can modify the class information for the course.

And you can change your password.

=============

For the academic administrator

The educational administrator can make additions and deletions to the students ' basic information.

To avoid changing the administrator's password for the admin: Tables can be stored separately ... or a special sentence.

The educational administrator can also make additions and deletions to the teacher's basic information. Even user name password

The policy can be: If the confirmation is a teacher. Then we'll take out the user ID. Modify the password for the corresponding ID in the user table

He also asked to maintain the program.

Program Maintenance (course name, course number, course type, total hours, credits, commencement grade)

Then we'll open a schedule. Then the situation is similar to the list of individual head nodes. Nodes rather than edges are stored

Start this node and the edges of all courses

He also asked for the maintenance of the course data.

Course Data Maintenance (class number, Instructor, class, maximum number of classes, etc., need to support the class function)

The course data must be in the case of a condition that is true in the course of the program.

Not quite sure. Because the program is often changed. But this is also a frequent change.

Foreign key first Slow hand

Let's say we open another course. Data sheet. So in addition to storing basic information about the course. He also requested support for the co-class function.

What does the function of the combined class mean? Let's enumerate test instructions.

The first one is to combine multiple classes in this course into one.

The second is simply to allow a course to have multiple classes of classes.

Well, in either case, we need to consider opening a list again. Store multiple classes in the course data sheet

We create a new class table

So we can save the list by a few keys. Then dynamically modify the class entries for each course to achieve a merged class?

I think it's reasonable to say that. Do we still have to deposit more than one class?

Of course we can also consider designing each item to be stored on the side table of the course-class-classes. You can do that.

Last feature he can change his password.

=======================

For student functions

Students can inquire about the courses he has chosen and his grades. I wonder if I can check the subjects without exams.

Supposedly, The results are not there.

Students can view their basic information

Students can modify their login password.

Students can choose classes. Then this function is equivalent to the addition of a meta-ancestor to the selected curriculum

===================

For teachers:

Teachers can change their login password

Teachers can view the course information, the basic information for each lesson, and the list of students who choose to enroll. This can be generated by a basic table.

Score Entry Function ... Give a list of students in bulk to update or insert scores. So.. We need to make a list.

We uniquely identify a group of students by choosing a course.

Results Import Function ... Update students ' grades according to student number and course number.

We can find this relationship in the selection of the timetable first. Through this relationship to the score table to update the results

Analysis of database design for students ' elective course and grade management system

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.