Task one, complete the DB design of student registration and read and write database

Source: Internet
Author: User

Students ' offline enrolment format is:

Name:

Qq:

Type of repair:

Estimated time of admission:

Graduate Schools:

Line School Number:

Daily Links:

Stand ready:

Recommended Person:

Analyzing a business model requires two aspects: the underlying business object, the underlying business. When searching for data, it is thought that class diagram is an analytical method that is an important thought tool for OOA (object-oriented analysis) and Ood (object-oriented design) for business structure modeling:

Eg: a company's original requirements document

"This project is to increase the management of the cable and communication engineering and the detailed data records and statistics on the basis of the first period, and make the whole system better manage all the process and data of the project from the beginning of the bid to the completion acceptance and the analysis of the construction process." The system will be one or a standard section of the Overhead power line project as a unit project, that is, a project in the system; Each unit project is divided into a number of sub-projects, each division project is divided into a number of projects, each sub-project is divided into several units of the same project. ”

Three questions to answer (with no prior learning answers):

1. Describe the function of the system in a sentence. A: Help business managers to grasp the progress of multiple construction projects details.

2. What is the business concept of this passage? What is the meaning of the specific distinction? A: Cable, Communication Engineering, detailed construction data, overhead power line engineering, Unit engineering, Division engineering, Sub-project.

3. What are the relationships between these business concepts? A: Each cable, communication engineering has detailed construction data (in chronological order); Overhead power line engineering is equivalent to unit project, which is divided into several sub-projects and then divided into several projects.

The function of the class diagram is to summarize the things from the appropriate angle according to the objective of the system. There can be more than one class in a class diagram, and a class is divided into three blocks: a class name, a property (can have multiple), an operation (multiple).

Use class diagrams to get requirements (?) ) The steps required:

1, identify the class.

2. Identify the main properties of the class.

3. Describe the relationship between classes.

4. Analysis, abstraction and collation of all kinds.

Eg: how do you use class diagrams to identify classes in a classroom as a training management system?

A: Class Name: Teacher, student;

Main properties: Teacher--"knowledge level, teaching level, students-" knowledge level, acceptance ability; (default to public property when analyzing model)

Relationships between classes: association (association Relationships) are divided into one or one-to-many, X-to-Y, role relationships (such as bosses and subordinates), navigation relationships (leave Tanzhi leave) (if the Leave list can navigate to the leave and approver?). What relationship to take), contains the relationship (strongly contains the composition--solid diamond, weakly contains the aggregation hollow diamond, and the diamond is drawn on the Father's box side. Departments and employees, for example. This can be described here as a role relationship.

The form of the attached relationship is as follows:

Recursive and triangular relationships for classes:

Eg:windows the operating system has folders and files, please use class diagram to express the relationship between folders and files.

A: The key to the answer is not only the weak inclusion of folders and files, but also the self-contained relationship between folders and folders (a non-rigorous statement, which is called recursion)

Eg: Lists at least three key attributes for company and employee.

A: The answer is the company (size, industry, creation time, development prospects), employees (ability, salary, age, entry time), which is subconsciously to the perspective of college students to consider the company attributes ... From a development perspective, you need to focus more on tagged attributes (including constraint relationships), including but not just (name, age, contact address, employee). Education, company, registered capital, and so on. There are two questions to consider: 1. Is the employee's attribute in salary, position, and concurrent periods? 2. How is the relationship between company and employee established in law?

This leads to triangular relations (company-employee-contract), as follows:

1, when two classes have relations, first pull a straight line.

2, if the expression is not clear relationship, thinking is not missing the association class?

3. List the key properties of the two classes, and think about whether these attributes are determined by the class itself alone? Salary, for example, is a common agreement between employees and the company.

4, if not, which of these attributes belong to which class, is it possible to characterize the association classes on the two classes?

Comprehensive Exercises:

A school intends to do a test management system, the current situation is as follows:

1) The instructor will speak many courses, most of which require an exam and some do not.

2) Exam questions are given by the instructor.

3) Students need to take a lot of exams, and each exam has a score.

First of all!!!! This is a test management system, through the record of examination events to achieve the management of the test, so the examination as a core class, "test" belongs to a dynamic matter rather than people, things or concepts, but still need to identify as a class.

Second, list the classes associated with it: teachers, students are the most obvious, followed by the curriculum and test papers, and finally the results (the first will feel that the results are an attribute, the course has similar doubts, but carefully consider that the results and courses are the attributes of the fuzzy zone, so it is classified as an association Class).

Class Diagram:

It is important to note that the subscript of quantity is easily omitted.

At this point, the end of the study, to answer the original question: refer to the application of the registration post (learning materials-Offline Registration-Beijing registration) in the format of registration, sorting out the business model, determine the need for several objects, the attributes of each object, the relationship between objects and objects is one-to-one, or a pair of many.

  

Students ' offline enrolment format is:

Name:

Qq:

Type of repair:

Estimated time of admission:

Graduate Schools:

Line School Number:

Daily Links:

Stand ready:

Recommended Person:

  Objects are instances of classes, and we use class diagram analysis directly. Read the question can be, in essence, the design registration management system, in which the registration is the core category, related to the direct categories, such as the approver category, the Applicant class, the course category, the Admission Status and Registration form category.

Registration attributes (registration time, place of application), approver class attributes (name, age, position), applicant (name, graduation school, personal Daily homepage, line school number, expected enrollment time, QQ, wish), course class (Course time, class location), admission status (Approval time, approval result); Registration form (feel superfluous, but keep it first). The recommender can be an approver or a previous applicant, so there is no other one.

The class diagram is as follows:

Next is to install and configure MySQL 5.5, the Linux top is really tired ... Wait for me to study the war again.

The first thing to do is to completely delete all the MySQL files that are brought with Ubuntu,


sudo apt-get autoremove--purge mysql-server-5.0
sudo apt-get remove Mysql-server
sudo apt-get autoremove mysql-server
sudo apt-get remove Mysql-common//This is important
In fact, some of the above is superfluous.

Then delete the remaining files,

Dpkg-l |grep ^rc|awk ' {print $} ' |sudo Xargs dpkg-p

Previous experience in installing the system told me that I could not follow the chaos Baidu to the solution to install files ..... -The dish-so I found the official MySQL installation documentation.

By the way, I learned a apt-cache search command, not mentioning it for the time being. Refer to webpage http://rsljdkt.iteye.com/blog/1142463

For a few hours, did not install success ... It seems that the download of the Ubuntu Deb file, but with the installation of the Linux generic documentation, so extract does not exist the corresponding file directory ... Try again on the next Linux generic version of MySQL.

Save

Task one, complete the DB design of student registration and read and write database

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.