0% found this document useful (0 votes)
16 views

Dbms Programs

1. The document describes how to create tables, queries, and relationships in Microsoft Access. It provides steps to create tables to store student and book information, create queries to display data from the tables, and create a relationship between tables. 2. Specific instructions are given to create tables to store student details and marks, then a query to display student name, register number, and marks from both tables. 3. Similarly, steps are provided to create tables for books and publishers, and a query using the wizard to display book name, publisher and price.

Uploaded by

www.adarsh04
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Dbms Programs

1. The document describes how to create tables, queries, and relationships in Microsoft Access. It provides steps to create tables to store student and book information, create queries to display data from the tables, and create a relationship between tables. 2. Specific instructions are given to create tables to store student details and marks, then a query to display student name, register number, and marks from both tables. 3. Similarly, steps are provided to create tables for books and publishers, and a query using the wizard to display book name, publisher and price.

Uploaded by

www.adarsh04
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

1.

AIM:
• Create a table named StudentDetails in data sheet view. It should contain the
fields:
a) Register No b) Name c) DOB d) Phone No
Insert the details of 10 students
Set Register number as primary key

STEPS:
1. Start->all programs->Microsoft office->Microsoft access 2007
2. Create blank database
3. Create a table in datasheet view
4. In the Add New Field Column Name, rename the column with relevant fields you
want
5. Right click on column name->click insert column
6. Set the primary key
7. Insert the details of 10 students
8. Save and close the program
• Create a second table named InternalMarks in design view. It should contain
the fields
a) Internal ID b) Register No c)Mark 1 d)Mark 2 e)Mark 3
Insert the details of the above 10 students

STEPS:
1. Start->all programs->Microsoft office->Microsoft access 2007
2. Create a table in design view in the same database and insert the details of 10
students
a) From the create tab->tables group->table design button
b) Create a tables in design view(InternalMark)
c) To insert data: (Right click on table name->open)

1
d) Save the table
3. Close the program

• Relationship between two tables

STEPS:

1. On database tool tab->click relationship button


2. A show table dialogue box will be open->add two tables
3. Then connect primary key of one table with foreign key of another table
4. A edit relationship dialogue box appears
5. Then enable enforce referential integrity
6. Last press create button. A relationship will be occurred between two tables.

2
2. AIM: Create two tables and create a Query in Design view displaying the following
information of the students:

Table Name-Student Details


Fields: a) RegisterNo b) Name c) DOB d) PhoneNo

Insert the details of 10 students

STEPS: For creating tables in Design view


1. Start->all programs->Microsoft office->Microsoft access 2007
2. Create Blank Database
3. Create two tables in Design View in the same database and insert the
details of 10 students
a) Open the database
b) From the create tab->Tables Group->Table Design button
c) Create two tables in design view(Student Details and Internal
Mark)
d) To insert data: (Right click on table name->open)
e) Save the table
4. Close the program
• Table Name-InternalMark

Fields: a) Register Nob) Mark1 c) Mark2 d) Mark3

Insert the details of the above 10 students

STEPS: Create a Query in Design view with following Fields:

a) RegisterNo b) Name c) Mark1 d) Mark2 d) Mark3


1. From the Create tab->Other group->Click Query Design Button
2. From the show Tables Box->Add tables
3. Select the required field and add into the Design grid
4. To run the query : From Design tab->Results Group->Run Button

3
3. AIM: Create two tables and create a Query using Wizard , displaying information of the
Books:

STEPS: For creating tables in Design view

1. Start->All programs->Microsoft Office->Microsoft Access 2007


2. Create Blank Database
3. Create two tables in Design View and insert the details of 10 books
a) Open the database
b) From the create tab->Tables Group->Table Design button
c) Create two tables in Design View(Books and Publisher)
d) To insert data: (Right click on table name->open)
e) Save the table
• Table Name: Books
Fields: a) ISBN b) BookName c) Author d) Publisher e) Price

Insert the details of 10 books

• Table Name: Publisher


Fields: a) SupplierNo b) Publisher c) Street d) City e) Pincode
Insert the details of 10 Publishers

STEPS: Create a Query in Design Wizard displaying the following information:


a) ISBN b) BookName c) Publisher d) Price
1. From the create tab->Other Group-> Click Query Wizard
2. From the New Query Box-> Simple Query Wizard->OK
3. Click Next -> Click Radio Button Detail->Click Next
4. Click Finish Button

4
4. AIM:Create a Table named HomeAppliances with the following fields:
a) ID b) Products c) DateOfSale d) Sales e) Profit

STEPS: For creating tables in Design view

1. Start->All programs->Microsoft Office->Microsoft Access 2007


2. Create Blank Database
3. Create a table in Design View and insert data in 10 rows showing sales of
Fan,TV,Computer
a) Open the Database
b) From the create tab->Tables Group->Table Design button
c) Create a table in Design View(HomeAppliances)
d) To insert data: (Right click on table name->open)
e) Save the table

STEPS: For creating Summary Query displaying

a) Sum of Product wise sale


b) Sum of Product wise profit
c) Average of Product wise sale

1. From the Create Tab-> Other Group->Click Query Design


2. Select table or tables from the Show table Dialog box
3. On the Design tab->Show/Hide group->click Total
4. A total to row appeared on the Grid
5. Leave one field as Group By
6. In the Sales Field Choose Total value as sum and average and set the
profit value as average.
7. Save the table and run the result.

5
5. AIM:Create a Table named Mark Sheet with the following fields:
a) Name b) Mark1 c) Mark2 d) Mark3

STEPS: For creating tables in Design view

1. Start->All programs->Microsoft Office->Microsoft Access 2007


2. Create Blank Database
3. Create a table in Design View
a) Open the Database
b) From the create tab->Tables Group->Table Design button
c) Create a table in Design View(MarkSheet)
d) To insert data: (Right click on table name->open)
e) Save the table

STEPS: For creating Calculated Query displaying, Name, Mark1, Mark2, Mark3
and Total Mark

1. From the Create Tab-> Other Group->Click Query Design


2. Select table or tables from the Show table Dialog box
3. Select the Fields that want to include in your query(in our ex. add
Fieldname, name, Mark1, Mark2, Mark3 to the grid)
4. For finding the Total Mark. Click the field cell to the first empty column
and type: Total Mark: [Mark1] + [Mark2] + [Mark3].
5. Save the table and run the result.

6
6. AIM: Create a Table named Products with the following fields:
a) ProductID b) ProductName c) Price
Insert the details of 5 Products

STEPS: For creating tables in Design view

1. Start->All programs->Microsoft Office->Microsoft Access 2007


2. Create Blank Database
3. Create a table in Design View and insert the details of 5 Products
a) Open the Database
b) From the create tab->Tables Group->Table Design button
c) Create a table in Design View(Products)
d) To insert data: (Right click on table name->open)
e) Save the table

STEPS: Creating an Update Query to increase the price of all products by 20%.

1. From the Create Tab-> Other Group->Click Query Design


2. Select table or tables from the Show table Dialog box
3. Select the Fields that wants to include in your query
4. On the Design tab->Query Type Group->Click Update Query Button
5. A new row “Update To” is added in the design grid
6. In the Update To row, below the field name price type like this
[price]*1.20
7. Click the view Button to show the result
8. Save the table and run the result. A warning Message appeared click Yes

7
7. AIM: Create a Table named Cosmetics with the following fields:
a) ProductID b) ProductName c)Price
Insert the details of 5 Products

STEPS: For creating tables in Design view

1. Start->All programs->Microsoft Office->Microsoft Access 2007


2. Create Blank Database
3. Create a table in Design View and insert the details of 5 Products
a) Open the Database
b) From the create tab->Tables Group->Table Design button
c) Create a table in Design View(Cosmetics)
d) To insert data: (Right click on table name->open)
e) Save the table

STEPS: Creating an Update Query to increase the price of all products by Rs.10

1. From the Create Tab-> Other Group->Click Query Design


2. Select table or tables from the Show table Dialog box
3. Select the Fields that wants to include in your query
4. On the Design tab->Query Type Group->Click Update Query Button
5. A new row “Update To” is added in the design grid
6. In the Update To row, below the field name price type like this [price]+10
7. Click the view Button to show the result
8. Save the table and run the result. A warning Message appeared click Yes

8
8. AIM: Create a Table named Cosmetics with the following fields:
a) ProductID b) ProductName c) Supplier d)Price
Insert the details of 8 Products

STEPS: For creating tables in Design view

1. Start->All programs->Microsoft Office->Microsoft Access 2007


2. Create Blank Database
3. Create a table in Design View and insert the details of 8 Products
a) Open the Database
b) From the create tab->Tables Group->Table Design button
c) Create a table in Design View(Cosmetics)
d) To insert data: (Right click on table name->open)
e) Save the table
STEPS: Creating an DeleteQuery, delete the product Shampoo from the Table

1. From the Create Tab-> Other Group->Click Query Design


2. Select table or tables from the Show table Dialog box
3. Select the Fields that wants to include in your query
4. On the Design tab->Query Type Group->Click Delete Query Button
5. Drag the *(Asterisk) option from the table Field (Table3.*) list the first
column of design grid. The delete row shows ‘From’.
6. Drag the field where you want to delete some record, in the 2nd column
of the design grid(in our ex. Drag the field name product)
7. The Delete row shows where
8. In the criteria Field Type the criteria for deleting record(type “Shampoo”)
9. Click the view Button to show the result
10. Save the table and run the result. A warning Message appeared click Yes
to run the query

9
9. AIM: Create a Table named Products with the following fields:
a) ProductID b) ProductName c) Price
Insert the details of 5 Products
STEPS: For creating tables in Design view

1. Start->All programs->Microsoft Office->Microsoft Access 2007


2. Create Blank Database
3. Create a table in Design View and insert the details of 5 Products
a) Open the Database
b) From the create tab->Tables Group->Table Design button
c) Create a table in Design View(Products)
d) To insert data: (Right click on table name->open)
e) Save the table

STEPS:For creating a form in Design view and insert the details of another 5
products to the table

1. From the create tab->Forms Group->click form Design


2. A blank form appears in Design view
3. From the Tools group->click add existing fields->A field list pane open on
right side
4. Click the expansion button (+). Drag the required field into the grid
5. “Use control Wizards” button activated.
6. Add command button into the form from the controls group.
7. A command button wizard open. From the categories box select ‘Record
operation’. From the action box select the action (‘Add New Record’).
8. Then click next. Select any radio button whether your button appear on
text or picture.
9. Click finish
10. Open the form in form view. Click add record and add new record.

10
10. AIM: Create a Table named Sales with the following fields:
a) ProductID b) Product c)UnitPrice d) Quantity
Insert the details of 7 Products
STEPS: For creating tables in Design view

1. Start->All programs->Microsoft Office->Microsoft Access 2007


2. Create Blank Database
3. Create a table in Design View and insert the details of 7 Products
a) Open the Database
b) From the create tab->Tables Group->Table Design button
c) Create a table in Design View(Products)
d) To insert data: (Right click on table name->open)
e) Save the table

STEPS:For creating a form in Design view having all fields. The field Total Sales
should be created as a calculated control.

1. From the create tab->Forms Group->click form Design


2. A blank form appears in Design view
3. From the Tools group->click add existing fields->A field list pane open on
right side
4. Click the expansion button (+). Drag the required field into the grid
5. “Use control Wizards” button activated.
6. Add command button into the form from the controls group.
7. A command button wizard open. From the categories box select ‘Record
operation’. From the action box select the action (‘Add New Record’).
8. Then click next. Select any radio button whether your button appear on
text or picture.
9. Click finish
10. Click on the text box button in the controls group and draw it on the
form.

11
11. Click property sheet button in the tools tab.
12. In the name property type name for the field (type Total Sales).
13. In the control source property type the expression= [Quantity]*[Price].
14. In the Format property, set currency
15. Insert products into the fields and click add record button
16. Open the form in form view. Click add record button and then add new
record.

12
11. AIM:
• Create a table named Student , with the following fields:
b) RegNo b) Name c) District d) PhoneNo
Insert the details of 5 students

STEPS: For creating tables in Design view

1. Start->All programs->Microsoft Office->Microsoft Access 2007


2. Create Blank Database
3. Create a table in Design View and insert the details of 5 Students.
a) Open the Database
b) From the create tab->Tables Group->Table Design button
c) Create a table in Design View(Student)
d) To insert data: (Right click on table name->open)
e) Save the table
STEPS: For creating form in Datasheet view with all fields. Create a combo box for
the field District.
1. In Form Layout view, select the Design tab, then locate
the Controls group.

2. Select the Combo Box command, which looks like a drop-down list.
3. Select the desired location for the combo box. A line will appear to indicate the
location where your combo box will be created.
4. Creating a combo box is very easy, if we setup a field as a lookup wizard (while
creating a table, in the data type selection box, click the lookup wizard and
create a list of values).
5. If a field was not designated as a lookup wizard we cannot create a combo box
as mentioned above. Then we have to use the control wizard to create a combo
box or list box.

13
6. Click the combo box button from the controls group. The Combo Box
Wizard dialog box will appear. Select I will type in the values that I want, then
click next.
7. Type the choices you want to appear in your drop-down list. Each choice should
be on its own row.
8. Users will be able to select one of three choices from our finished combo box.
9. If necessary, resize the column so all of your text is visible. Once you are
satisfied with your list, click next.
10. Select Store that value in this field, then click the drop-down arrow
and select the field where you want selections from your combo box to be
recorded. After making your selection, click next.
11. Enter the label or name that will appear next to your combo box.
12. Click Finish. Your combo box will appear on the form.

14
12. AIM: Create a Table named HomeAppliances with the following fields:
a) ID b) Products c) DateOfSales d) Sales e) Profit
Insert the details of 10 products

STEPS: For creating tables in Design view

1. Start->All programs->Microsoft Office->Microsoft Access 2007


2. Create Blank Database
3. Create a table in Design View and insert data in 10 rows showing sales of
Fan,TV,Computer
a) Open the Database
b) From the create tab->Tables Group->Table Design button
c) Create a table in Design View(HomeAppliances)
d) To insert data: (Right click on table name->open)
e) Save the table

STEPS: For creating a Report in Design view

1. Select the table in the Navigation pane.


2. From the create tab->Reports Group->Report Design button.
3. A blank report appears in design view.
4. Click the ‘Add Existing Fields’ button in the tools group. The field List pane
opens.
5. Click the expansion button (+). Drag the required field into the grid
6. Add Controls from the tools group. To add control click the appropriate
command and draw the control outline in the design.
7. Switch to Report view by clicking the view button. In order to return to
the design view, click the down arrow of the view button and select
Design view.
8. After finalizing the report, save it by clicking the save button.

15
13. AIM: Create a Table named MailingAddress with the following fields:
a) ID b) Name c) Housename d) Postoffice e) City f) District g) Pincode
Using Report create Mailing Labels.
STEPS: For creating tables in Design view

1. Start->All programs->Microsoft Office->Microsoft Access 2007


2. Create Blank Database
3. Create a table in Design View and insert data in 5 rows
a) Open the Database
b) From the create tab->Tables Group->Table Design button
c) Create a table in Design View(MailingAddress)
d) To insert data: (Right click on table name->open)
e) Save the table

STEPS: Create Mailing Labels Using Report.


1. Select the table or query in the navigation pane.
2. Click on create tab->Click the labels button on the reports group. The label
wizard opens.
3. Choose the type of label from the product number list. Click next.
4. Choose the font, font size, color etc. Then click next.
5. Choose the fields that you want to include on the label. Click Next.
6. Choose the fields by which to sort the records. Click Next.
7. Type a name for the report and click Finish
8. The report appears in print preview. If it is perfect then print it.

16

You might also like