Database Job 14--Comprehensive exercises (ii.) Feedback situation

Source: Internet
Author: User
Tags naming convention

Database Job 14--comprehensive exercises (ii.) Feedback situation first, the homework request retelling

1, the creation of the database Cpxs, saved in the e-packing directory to their own school number + surname first letter (Arabic numerals + capital letters) to create a folder , the initial size of 5MB, the maximum 20MB, in 10% ways, log files in the same folder, the initial size of 2MB, Maximum 5MB, growth in 1MB;

2, create the table CP,CPBH primary key, 8 digits , CPMC, 12 characters in length,JG for the precision of 2 digits after the decimal point , the KCl is an integer, except the KCl, the other can not be empty;

3, using insert input data, the specific data are as follows:

' 10001100 ', ' refrigerator a_100 ', 1500.00, 500

' 10002120 ', ' refrigerator a_200 ', 1850.00, 200

' 20011001 ', ' air conditioning k_1200 ', 2680.00, 300

' 20012000 ', ' air conditioning k_2100 ', 3200.00, 1000

' 30003001 ', ' freezer l_150 ', 5000.00, 100

' 10001200 ', ' refrigerator b_200 ', 1600.00, 1200

' 10001102 ', ' refrigerator c_210 ', 1890.00, 600

' 30004100 ', ' freezer l_210 ', 4800.00, 200

' 20001002 ', ' air conditioning k_3001 ', 3800.00, 280

' 20001600 ', ' air conditioning k_1600 ', 4200.00, 1500

3. Display CP All records

4. Display "Product name" and "Product value", of which Total product =JG*KCL

5. Display "Product name" and "Product price", which product price =jg*0.8

Second, the subject of the knowledge points involved

1. Establish a database

2. Create a table

3. Inserting records into the table

4. Display all information in the table

5. Use of AS and function (as: alias identifier)

6. Display the results of the operation in the table

Data types and additions to the subject:

1, character type: char, Verchar (the difference is that the Verchar type is more flexible than char type, has a terminator, can be allocated on demand);

2, float type: float;

3, Accurate numerical type: decimal, numeric;

4, Integer type: int, bigint, smallint, tinyint.

Third, the grading standard

Code specification (1 points): The case is applied appropriately, the newline is indented, the annotation is used correctly (if the comment is really needed), and the job follows the naming convention (if explicitly requested in the job).
Program complete (1 points): According to the requirements of the topic to complete all the function code, there is no omission, such as job requirements to complete the query for multiple conditions, if omitted by the rule minus points.
Syntactically correct (1 points): Run the grammar check in Query Analyzer pass or not.
Execute correctly (2 points): Execute code in Query Analyzer to verify that it is passed or not.

Notes on Reconsideration:

For the job that executes 0, if the code on the topic itself is not a problem, because there is no code to add the underlying code, such as running a query without providing the database and the table is not running, then verify that it is able to run after adding the base code, if it can run to 0.5, otherwise give 0. A maximum of 3.5 points will be available after reconsideration.

Iv. Personal Homework Feedback (please follow the number of three seats):

v. General INFORMATION Feedback:

This assignment everybody completes is very earnest, everybody basically can do the code standard, the procedure is complete, the grammar is correct.

But there are some problems:

1, when establishing the database, please pay attention to the physical path stored, as required to write code. As the case requires: Create a database Cpxs, saved in the e-packing directory with their own school number + surname first letter (Arabic numerals + capital letters) to create a folder

2. Note the type of JG when building the table:JG is accurate to 2 digits after the decimal point , with a decimal (6,2) or float or float (2) can beCPBH the primary key, 8 digits , with Decimal,char can be, There is no problem from the point of view of operation, but from a design point of view, the decimal is not appropriate, because the product number (CPBH) does not participate in the operation, just a token. It is better to use char (8) on demand.

3, in the display "Product name" and "Product value", wherein the product value =jg*kcl, display "Product name" and "Product price", wherein the product price =jg*0.8 when Jg*kcl and jg*0.8 without quotation marks, otherwise the results shown are inconsistent with the requirements In addition, the fields already in the table are not quoted when using the SELECT statement.

* Above is the main focus of this operation is also the issue of concern, we can work on their own situation to modify and re-commissioning, practice makes perfect!~ refueling it! Of course, there are questions and suggestions can be put forward, we work together ha ~

Database Job 14--comprehensive exercise (ii) Feedback

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.