SQL Database Management Part 2

1.Access Database operation
1. Normalization

Unnormalized

Normalized


2.Import external data
a. Import excel data sheet


b. Import word data
   Option 1:Select Format --> Convert to Text --> Select Anchor --> OK.


It will become a text file without grid lines, save the new file (plain text file *.txt), then import from Access


Imported by Access

   Option 2
       Just in word application, right click on the form --> copy. Then go to excel and paste --> save as a new file (excel) --> Like the previous example, import by excel.


3.Query
1. The query is like a filter. It does not store data. It only stores the method (criteria) of the query (that is, the syntax of SQL).
2. The query can also add calculations and then output the calculation results.

4. Add the currency format and do the calculation: unit price X quantity = subtotal

5. Create a keyword query


6. Create a keyword query report
   a. After opening "Keyword Query", press the report

b. The report will be created automatically, and a shortcut will appear in the lower left corner. After pressing this shortcut, you will be asked to enter a keyword.

7. Create a date filter query & report
   a. Use SQL query syntax between A and B

b. will automatically create a report

8. Join the function
   a. Round (value, number of digits):


b. Left (string, take how many letters)
Example: Select a customer and display a short name.



c. Select the year and month





9. Query + Subtotal --> Report
a. First, use the "order details (quantity)" & "books (unit price)" two data sheets to create a query with a subtotal field.
    b. Then use the query to synthesize a report with "Order"

a. Make a query
Note: The order number must be selected here. Because the next step is to report with the "order", you must first select the order number as the associated key value, in order to associate with the "order" data table.

b. Reporting
"Order": Same as the previous step, you must choose the order number.

 "書籍(單價)"
"book (unit price)"


報表有小計
Report has subtotal


No comments: