meljun cortes csc 16 exer3

12
JOSE RIZAL UNIVERSITY – Computer Science Department CSC 16 – Integrated Application Software LABORATORY EXERCISES GRADED EXERCISE #3 Changing Field Properties 1. In the OpenOffice.org Main Base Window, select your 1 st table (e.g. TB01DL27) and in Edit menu click Edit to open the Table Design View. 2. The Database table design for your 1 st table will appear together with its Field Properties. 3. Click each field names and change the following field properties for each of your fields: Field Name Entry Required Lengt h Decima l Places Defaul t Value Format Example Page 1 of 12

Upload: meljun-cortes

Post on 14-Apr-2017

15 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: MELJUN CORTES CSC 16 exer3

JOSE RIZAL UNIVERSITY – Computer Science DepartmentCSC 16 – Integrated Application SoftwareLABORATORY EXERCISES

GRADED EXERCISE #3Changing Field Properties

1. In the OpenOffice.org Main Base Window, select your 1st table (e.g. TB01DL27) and in Edit menu click Edit to open the Table Design View.

2. The Database table design for your 1st table will appear together with its Field Properties.

3. Click each field names and change the following field properties for each of your fields:

Field Name Entry Required

Length Decimal Places

Default Value

Format Example

StudentID Yes 10 09-0000FirstName No 15MiddleName No 15LastName No 15Course Yes 5 Align – CenterUnits Yes 5 1 0.0 Align - CenterEntryDate Yes MMM D, YYYY

Align - CenterStudentStatus No 0

Page 1 of 9

Page 2: MELJUN CORTES CSC 16 exer3

JOSE RIZAL UNIVERSITY – Computer Science DepartmentCSC 16 – Integrated Application SoftwareLABORATORY EXERCISES

4. Click the Save button to update and save your table.

5. Change also the field properties of your 2nd table (e.g. TB02DL27). The output must be the same from the sample figure below. Consider the Length of characters especially in the field of EmailAddress and Format Example (Format & Alignment – center).

6. In StudentID the format is 09-0000 and in PhoneNumber field, click the textbox of Format example and type (063) in the format code textbox.

7. Save to update your table.

Page 2 of 9

Page 3: MELJUN CORTES CSC 16 exer3

JOSE RIZAL UNIVERSITY – Computer Science DepartmentCSC 16 – Integrated Application SoftwareLABORATORY EXERCISES

GRADED EXERCISE #4Queries using Design View and Wizard

A. CREATING A QUERY USING DESIGN VIEW1. Open your main Base Window – DB01 _ _ _ _ (e.g. DB01DL27)

2. In the Database list, click the second icon, the Queries.

Figure 1

3. Click Create Query in Design. Look at Figure 2.

Figure 2

4. The query design window should appear. In the Add Tables window, Add TB01_ _ _ Look at Figure 3.

Page 3 of 9

Page 4: MELJUN CORTES CSC 16 exer3

JOSE RIZAL UNIVERSITY – Computer Science DepartmentCSC 16 – Integrated Application SoftwareLABORATORY EXERCISES

Figure 3

5. This adds the table to the query.

Figure 4

6. Add fields to query, by clicking the arrow in the first column’s field box.7. In the Field properties choose StudentID, FirstName, LastName, Course and

StudentStatus. Under the LastName field choose the Ascending option in Sort properties; Under the Course field type the given Criteria (BCS or BSIT) in the Criteria properties. Your screen should resemble Figure 5.Fields: StudentID, FirstName, LastName, Course, StudentStatusCriteria: Students taking up BCS or BSIT

Run

Page 4 of 9

Page 5: MELJUN CORTES CSC 16 exer3

JOSE RIZAL UNIVERSITY – Computer Science DepartmentCSC 16 – Integrated Application SoftwareLABORATORY EXERCISES

Figure 58. Click the Run button the toolbar or press F5 to run the query result.9. Save us QR01_ _ _ _.10. Create the 2nd query, repeat step 2 to 7 then choose the given fields and criteria. Look Figure 6.

Fields: StudentID, LastName, FirstName, MiddleName, EntryDateCriteria: Show only those students enrolled before 6/1/08

Figure 6

11. Save your query file as : QR02 _ _ _ _.12. Create the 3rd query, (repeat step 2 to 7) but now choose your table 2: TBO2 _ _ _ _, and

follow the given fields and criteria. Look at Figure 7.Fields: LastName, FirstName, City, EmailAddressCriteria: Show only those students living in Quezon City or Manila and with the EmailAddress of Yahoo with descending order.

Page 5 of 9

Page 6: MELJUN CORTES CSC 16 exer3

JOSE RIZAL UNIVERSITY – Computer Science DepartmentCSC 16 – Integrated Application SoftwareLABORATORY EXERCISES

Figure 7

13. Save your query files as: QR03_ _ _ _.B. CREATING A QUERY USING SIMPLE QUERY WIZARD

(Same Databate file: DB01_ _ _ _)

1. In the Main Base Window, click the second tab, the Queries. Then click Use Wizard to Create Query. Look at Figure 8.

Figure 8

2. In the Query Wizard Window, choose your table 2 (TB02 _ _ _ _) in the list box. Look at Figure 9.

Figure 9

Page 6 of 9

Page 7: MELJUN CORTES CSC 16 exer3

JOSE RIZAL UNIVERSITY – Computer Science DepartmentCSC 16 – Integrated Application SoftwareLABORATORY EXERCISES

3. Click the Select All button (to select all fields). Then click Next.Choose the LastName as field to sort ascending. Click Next.

Figure 10

4. To Search Conditions: e.g. LastName that starts with letter V. Click LastName in the selection of Fields textbox arrow, choose like from the choices of Condition and type V* in the Value textbox. Click Next. Refer to Figure 11.

Figure 11

Page 7 of 9

Page 8: MELJUN CORTES CSC 16 exer3

JOSE RIZAL UNIVERSITY – Computer Science DepartmentCSC 16 – Integrated Application SoftwareLABORATORY EXERCISES

5. Leave the other steps as is by clicking Next. Save your 3rd query as QRO4 _ _ _ _ in the textbox of Name of the query, then click Finish to see the result.

Figure 12

6. Select again your QR04_ _ _ _ to modify query 4. Click Edit menu – Edit to switch to design view. Look at Figure 13.

Page 8 of 9

Page 9: MELJUN CORTES CSC 16 exer3

JOSE RIZAL UNIVERSITY – Computer Science DepartmentCSC 16 – Integrated Application SoftwareLABORATORY EXERCISES

Figure 13

7. Follow the given criteria. Look at Figure 14. Criteria: Lastname starts with a letter V, L, C, or R and in descending order.

Figure 14

8. Click Run button to see the result. Click Save button to update and save your query.

Page 9 of 9