Database
Database
What is a Database?
A database is an organized collection of data, managed by a database program
that stores and retrieves data in a structured manner. This organization includes
the data itself and the relationships between different data items.
Note
Field: A single item of data, such as a forename or date of birth. Each field has a
unique field name for identification and contains one type of data (e.g., numbers,
text, or dates).
Record: A collection of fields that contains all the information about one person
or item, which may include different data types.
File: An organized collection of records, typically containing one or more tables
that store records together.
Database Types
Flat-File Database: Stores data in a single table organized by rows and columns.
Each column represents a field with a predefined data type.
Relational Database: Stores data in multiple linked tables within a file, designed to
avoid data repetition. Tables are linked through relationships using key fields.
Primary Key: A unique field in a table that identifies each record.
Foreign Key: A field in one table that references a primary key in another table.
Report Generation
Info
Task 18a
Create a document and Import the file
Make the adjustments
Edit the table as per the question in design mode
Task 18d
Import two tables
Go to database tools tab and click ‘RELATIONSHIPS’.
To create the one-to-many relationship between the two tables, click the
SCode field in the first table. Hold the left mouse button, drag to the Maths
field in the second table, and drop it. The Edit Relationships window will
appear.
Task 18e
Create tab click on ‘Form Wizard’ and select the table
Make the changes in design view as per the task
task 18g
Open the table in design view, make the changes.
Then open the form and select the ‘Option Group Wizard’ in controls section
Enter label names
Click the radio button ‘Yes, the default choice is:’
Put the values
Click ‘Store the value in this field:’
Click Finish
task 18i
Create a Simple Query Wizard
Select the radio button for ‘Modification’
This opens in design view
Complete the task as instructed
Write the values in **
Remember
Profit: SPrice - PPrice
Percentage: Profit/PPrice
values displayed as #####. This means the column is too
narrow to see all the data.
task 18q
Create a Simple Query Wizard
Choose 'Summary Options' in the "Would you like detailed or summary
query?" tab.
Tick the boxes as per the task and tick ‘Count records in table’
Highlight the column
In the Sort & Filter section and sort the data
Task 18r
Create a ‘Form Wizard’ in Form section
In the Tables/Queries box you need to select the correct query
Use the Layout section to choose how the page will be laid out; the page
orientation is chosen using the Orientation radio buttons.
It will open in design view
Move the cursor to the top of the light grey bar showing the Detail row
Move all of these controls down the page about 8 mm. Find the Control
section and click on the Label icon.
Drag (to draw) a new control into the Page Header and type the text ‘Report
by’ followed by your name into this control.
Select the control (the label you have just created) and, in the Design tab, from
the Tools section of the toolbar, click on the Property Sheet icon.
Change the text color to black in the Fore Color section and set the alignment
to Left using the drop-down menu in the Text Align section.
Task 18t
In the Navigation pane, locate your saved report, right-click its name for the
drop-down menu.
Select "Export" to open a drop-down menu, then choose "Word RTF File" to
export in .rtf format.
Open the destination file after the export operation is complete, then click on
ok.
task 18v
From the Create tab, find the Reports section and click on the Labels icon.
This opens the Label Wizard.
Select any label format such as Avery J8166 labels
Type the text ‘Special Offer’ in the grey area as the top row of the label. Press
<Enter> to move down to the second row.
Add a final row with your name, then click on ok.
This will open design view
Make the adjustments as per the task
It should look in 2 columns in Print Preview
definitions
Form: a user-friendly interface that allows users to easily input data into a
database by providing a structured layout with fields for specific
information.
Option Group Wizard: allowing users to select only one choice from a list of
possibilities
Report header: Anything that you place in this section appears only once at
the start of the document.
Report Footer: Anything that you place in this section appears only once at
the end of the document.