You are on page 1of 5

MS ACCESS - Assignment

1. MS Access is better than MS Excel in storing non-numerical data. Explain primary key,
foreign key and two fundamental integrity rules used in relational database management
systems.
Access should be used to maintain data integrity in a format that can be accessed by multiple
users, whereas Excel is better suited for complex numerical data. Access is the best choice
when one must track and record data regularly, and then display, export, or print subsets of
that data. Access can be used to filter, sort and present a large set of data in presentable
manner which is not possible in the case of MS Excel.
Primary Key: A primary key, is a field in a relational database table that is distinctive for each
record. It is a unique identifier, such as an employer’s ID, roll number or Product ID. A
relational database must have only one primary key. Every row of data must have a primary
key value and none of the rows can be null.
Foreign Key: A foreign key is a column or columns of data in one table that refers to the
unique data values -- often the primary key data -- in another table. Foreign keys link together
two or more tables in a relational database.
Integrity Constraints:
Entity Integrity Constraints – It is used to ensure that the primary key cannot be null. If
primary Key is null, records cannot be identified.
Referential Integrity Constraint – Ensures that there must always exist a valid relationship
between two relational database tables.
2. Explain with examples, the difference between the following in a database:
a. List Box and Combo Box
b. Option Button and Toggle Button

List Box & Combo Box:


1. A combo box is appropriate when there is a list of suggested choices, and a list box is
appropriate when you want to limit input to what is on the list.
2. A Combo box contains a text box field, so choices not on the list can be typed in. On the
other hand, no such option is available with List box.
3. In addition, combo boxes save space on a form. Because the full list is not displayed until
the user clicks the down arrow, a combo box can easily fit in a small space where a list box
would not fit.
Option Button and Toggle Button:
Option Button: An option button on a form or report is a stand-alone control used to display
a Yes/No value from an underlying record source. When you select or clear an option
button that's bound to a Yes/No field, Microsoft Access displays the value in the underlying
table according to the field's Format property (Yes/No, True/False, or On/Off).
Toggle Button: Its use case is similar to that of an Option Button, but it differs on the part
that it is in the form of a switch.
3. What do you mean by cell referencing? Differentiate between relative, mixed, and
absolute referencing giving appropriate examples for each.
A cell reference refers to a cell or a range of cells on a worksheet and can be used in a
formula so that Microsoft Office Excel can find the values or data that you want that formula
to calculate.
Types of Cell Referencing:
A. Relative cell references – It does not contain dollar signs in a row or column, e.g., A2.
Relative cell reference type in excel changes when a formula is copied or dragged to
another cell. In Excel, cell referencing is relative by default.
Examples: If we have Quantity of a Product in (A2:A10), Price in (B2:B10) and we need to
calculate total sales value in (E2:E10). We will apply formula “=A2*B2” in E2 & drag the result
till E10. In this case relative referencing would trigger and formula will change to “=A3*B3” in
E3 and so on till cell E10.
B. Absolute cell references – It contains dollar signs attached to each letter or number in a
reference, e.g., $B$4. Suppose we mention a dollar sign before the column and row
identifiers. It makes absolute or locks both the column and the row, i.e., where cell
reference remains constant even if it is copied or dragged to another cell.
Example: In the previous example if we have same Price for every product in cell “D2”. Then
to arrive correct Sales Value, the formula applied in “E2” will be “=C2*$D$2” and drag till E10.
This will fix price entered in “D2”.
C. Mixed cell references – In Excel, mixed cell references contain dollar signs attached to
either the letter or the number in a reference. E.g., $B2 or B$4. It is a combination of
relative and absolute references.
Example: Suppose we have a 3X3 table array with header as 1,2&3 and rows with
corresponding number as 1,2&3. We will use mixed referencing in such a case to multiply the
numbers and get desired result in each cell.
4. Define database and explain the 4 database objects with their uses.
A database is an organized collection of structured information, or data. A database is usually
controlled by a database management system (DBMS).
Data within the most common types of databases in operation today is typically modelled in
rows and columns in a series of tables to make processing and data querying efficient. The
data can then be easily accessed, managed, modified, updated, controlled, and organized.
Databases in Access are composed of 4 objects: Tables, Queries, Forms, and Reports.
Together, these objects allow you to enter, store, analyse, and compile your data however
you want.
A. Tables: In Access, all data is stored in tables. Tables are organized into vertical columns
and horizontal rows. In Access, rows and columns are referred to as records and fields.
Every piece of information within a field is of the same type. A record is more than just a
row; it's a unit of information. Every cell in each row is part of that row’s record.
B. Queries: Queries are a way of searching for and compiling data from one or more tables.
Running a query is like asking a detailed question of the database. While a search would
be able to help you find the name of one customer at your business, you could run a query
to find the name and phone number of every customer who's made a purchase within the
past week.
C. Forms: Forms are used for entering, modifying, and viewing records. Forms make entering
data easier. Working with extensive tables can be confusing, and when you have
connected tables, you might need to work with more than one at a time to enter a set of
data.
D. Reports: Reports offer you the ability to present your data in print. Reports present data
from tables and also from queries, which then search for and analyse data within these
same tables.
5. Describe the benefits of generating forms in a database. Explain briefly the bound,
unbound, and calculated controls for forms with the help of an example.
Forms in Access are like display cases in stores that make it easier to view or get the items
that you want. Forms are objects through which you or other users can add, edit, or display
the data stored in your Access desktop database, the design of your form is an important
aspect. If your Access desktop database is going to be used by multiple users, well-designed
forms is essential for efficiency and data entry accuracy.
Types of control in MS Access:
Unbound: A control that doesn't have a source of data (such as a field or expression) is called
an unbound control. You use unbound controls to display information, pictures, lines or
rectangles. For example, a label that displays the title of a form is an unbound control.
Bound: A control whose source of data is a field in a table or query is called a bound control.
You use bound controls to display values that come from fields in your database. The values
can be text, dates, numbers, Yes/No values, pictures, or graphs. For example, a text box that
displays an employee's last name might get this information from the Last Name field in the
Employees table.
Calculated: A control whose source of data is an expression, rather than a field, is called a
calculated control. You specify the value that you want to use as the source of data in the
control by defining an expression. An expression can be a combination of operators (such as =
and +), control names, field names, functions that return a single value, and constant values.
For example, the following expression calculates the price of an item with a 25 percent
discount by multiplying the value in the Unit Price field by a constant value (0.75).

You might also like