2. 1. Relationships & Linking Tables
2. Query & its types
3. Creating a Select Query
Contents
4. Forms & its views
5. Creating a Form
6. Working with Reports
7. Let’s Know more
8. Career in IT
2
3. Relationships are links between the tables. Relationship works by matching data
in key fields (a field with the same name in both the tables). These matching
fields are the Primary key from one table and a Foreign key in other table.
Relationship between Tables
Foreign key is a value in one table that must match the Primary key in another table.
Example:- The given tables can be
linked using Roll No field.
After creating relationships, you can create queries, forms and reports to display
information from several tables at once.
After working with relationships, you must delete the relationship before you make
changes to the fields on which Relationship is based (Ex-Roll No fields).
To delete relationships, select the Link line Press DELETE key. 3
4. Linking Tables (Making Relationships)
1) Open one of the table
Click Database Tools tab
in Show/Hide group
click Relationships button.
2) Show table dialog box opens
Select Students Personal Record table
click Add Select Result table click Add
click Close button
3) Drag the Primary key of the
parent table over the Foreign
key in Child table (Roll No).
Parent
Table
Child
Table
4) A link line will join the tables
Edit Relationships dialog box
opens click Create button.
4
5. Query
A Query is like a simple question that displays specific records from a table that meet
a certain criteria. Example, who lives in Gwalior, Who is Fail in Exam etc.
?
?
Accessprovidesfourtypesofqueries:SelectQuery,UpdateQuery,CrosstabQuery,AppendQuery.
Creating Select Query
We can create Select Query by using: 1) Query Design option, 2) Query Wizard.
Creating Select Query using ‘Query Design’
1) Open the Result table.
5
6. 5) Double click the field names to add them to ‘Query Design grid.’
Or Drag the field names from field list to query design grid to add them.
YoucansavethequeryforfutureusealsobypressingCTRL+S.
Creating Select Query using ‘Query Design’
Field List
Query
Design
Grid
6) You can apply sort also. Type the condition in the Criteria row of the required field.
=“Fail”>60
7) Run the query from Design tab to see its result.
6
7. Forms
A form resembles a fill-in-the-blanks sheet. It is a way to enter data into a database.
Access links the form to the table and stores the information of the form into the table.
Data can be inserted, updated and deleted from a table using a form.
Three View of the Forms
1) Form View
(by default)
2) Layout View
3) Design View
7
8. Creating a Form
1) Open the Students Personal Record table.
2)
3) The form opens in Layout view.
4) Use Format tab to change its appearance.
5) To edit/enter data in the form, Open
form in Form View.
New(blank)Recordbutton,to enternewdata.8
9. Report
1) Open the Students Personal Record table.
2)
3) Use Format tab to change its
appearance print it.
A Report is an effective way to present your data in a printed format.
To create a report:-
9
10. Career in IT
A Database Administrator designs, implements and
maintains the database system in an organization.
How to become:- Bachelor’s degree in Computer
Science/Information Technology.
Skills:- Knowledge of database theory and design along with
RDBMS (Access, MySQL), Logical reasoning, critical thinking,
strong problem solving skills.
10