IT lecture
IT lecture
Barrios II
Disclaimer
Some of the materials in this book are accepted wisdom, while most of the contents have
been adapted from various published materials such as books, public websites, and other
relevant documented information.
There is no claim of either ownership nor originality of the materials included herein and
therefore, credit is due to all the authors of that information.
The author that prepared this guide simply put together what they thought to be of
practical use for the local consumption of the administrators, faculty, and students of the
BS Information Technology program of the College of Computer Studies of Aklan State
University. Your suggestions and recommendations to better improve the contents of this
book are very much welcome, kindly contact his email dbarrios@asu.edu.ph.
P a g e | ii
University’s Expectations:
Overview:
CONTENTS
Database System
DBMS is a software tools that allows the users to manage the database such
as;
• create and delete database
• add, delete and edit data
• sort and retrieve data
Advantages of a DBMS:
Data Models
A data model is a conceptual representation of how data is organized,
stored, and accessed within a database system. It defines the structure,
constraints, and relationships of the data. There are different types of data models,
including:
a. Relational Model
The relational model is the most widely used data model. It
represents data as a collection of tables with rows and columns.
Relationships between tables are established through keys.
b. Hierarchical Model
The hierarchical model organizes data in a tree-like structure, where
each record has a single parent and can have multiple children. It was
popular in early mainframe databases.
c. Network Model
The network model is similar to the hierarchical model but allows
records to have multiple parents, forming complex network-like
structures.
d. Object-Oriented Model
The object-oriented model represents data as objects, which
encapsulate both data and behavior. It supports inheritance,
encapsulation, and polymorphism.
e. Entity-Relationship Model
The entity-relationship model focuses on the entities (objects) in a
system and their relationships, attributes, and constraints.
Schemas
A schema is a logical description or blueprint of a database system. It
defines the structure, organization, and constraints of the database. A schema
specifies the tables, their columns, data types, relationships, and any other rules
governing the data.
a. Physical Schema
The physical schema defines how data is physically stored on a
storage medium, such as disk or memory. It includes details like file
organization, indexing, and data partitioning.
b. Logical Schema
The logical schema defines the logical organization of the
database, including tables, columns, relationships, and constraints. It is
independent of the physical storage details.
c. Conceptual Schema
The conceptual schema provides an abstract, high-level view of the
entire database. It focuses on the overall structure and organization of
data without delving into implementation details.
Instances
An instance refers to the actual data stored in a database at a specific
point in time. It represents a snapshot of the data contained in the database
system. For example, if you have a relational database with tables for employees,
departments, and projects, an instance of that database would contain the
specific data for each employee, department, and project at a particular
moment.
Instances are dynamic and can change over time as data is inserted,
updated, or deleted. They are governed by the data model and schema defined
for the database system.
1. The internal level has an internal schema, which describes the physical storage
structure of the database. The internal schema uses a physical data model
and describes the complete details of data storage and access paths for the
database.
2. The conceptual level has a conceptual schema, which describes the structure
of the whole database for a community of users. The conceptual schema
hides the details of physical storage structures and concentrates on describing
entities, data types, relationships, user operations, and constraints. Usually, a
representational data model is used to describe the conceptual schema when
a database system is implemented. This implementation conceptual schema
is often based on a conceptual schema design in a high-level data model.
3. The external or view level includes several external schemas or user views. Each
external schema describes the part of the database that a particular user
group is interested in and hides the rest of the database from that user group.
As in the previous level, each external schema is typically implemented using
a representational data model, possibly based on an external schema design
in a high-level data model.
These guidelines are aimed at ensuring that the database design meets the
requirements of the application, promotes data integrity and consistency, and
optimizes performance (Shelly et al., 2008).
Foreign Keys
The Foreign Key is the field that links a related table to the main table. In
example, in the sales database, a customer may appear many times in the
“Purchase” table, as a customer may purchase multiple products. A product
may also occur many times in the “Purchase” table as a product can be
purchased many times. Therefore, the “Purchase” table would contain many
links to a particular customer and many links to a particular product, but each
transaction record in the “Purchase” table would relate to only one product
and one customer. This is illustrated below:
tbl_Customer
CustomerID (PK) Name
1 Joe Smith
2 Peter Davis
3 Tommy Jones
tbl_Products
ProductID (PK) ProductName Price
1 Laptop 35,000.00
2 Smartphone 65,000.00
3 Headphones 12,500.00
tbl_Purchase
ORNo (PK) CustomerID (FK) ProductID (FK)
1 1 1
2 1 2
3 1 3
4 2 1
5 2 2
6 3 2
7 3 3
Note: Only the ID field is kept in the purchase table, no other information is
needed from the customer table or the product table. By setting up
relationships between the tables, Microsoft Access knows which foreign
key belongs to which primary key (unique identifier) and can pull the
information from the relevant tables when needed.
1
2
1 A primary key, identified by the key icon next to the field name.
2 A foreign key — note the absence of the key icon.
• Short Text – The field can contain any characters. A maximum number of
255 characters is allowed in a field whose data type is Text.
• Number – The field can contain only numbers. The numbers either can be
positive or negative. Fields are assigned this type so they can be used in
arithmetic operations. Fields that contain numbers but will not be used for
arithmetic operations usually are assigned a data type of Text.
• Currency – The field can contain only monetary data. The values will
appear with currency symbols, such as dollar signs, commas, and decimal
points, and with two digits following the decimal point. Like numeric fields,
you can use currency fields in arithmetic operations. Access assigns a size
to currency fields automatically.
• Long Text – Field can store a variable amount of text or combinations of text
and numbers where the total number of characters may exceed 255
(formerly known as “Memo”).
• Date/Time – Field can store dates and times.
• AutoNumber – Field can store a unique sequential number that Access
assigns to a record. Access will increment the number by 1 as each new
record is added.
• Yes/No – Field can store only one of two values. The choices are Yes/No,
True/False, or On/Off.
• OLE Object – Field can store an OLE object, which is an object linked to or
embedded in the table.
• Hyperlink – Field can store text that can be used as a hyperlink address.
• Attachment – Field can contain an attached file, images, spreadsheets,
documents, charts, and so on can be attached to this field in a record in
the database. You can view and edit the attached file.
• Calculated – A field that has a derived value determined by some function.
CASE STUDY 1
Apply your creative thinking and problem solving skills to design and
implement a solution.
Implement the Database Design Guidelines in Book Borrower Database using the
given fields.
First Name Juan
Middle Name J.
Last Name De Juan
Course BSInfoTech
Book Type Magazine
Book Category Science and Technology
Address San Juan City
Date Borrowed January 23, 2024
Date Return January 28, 2024
Date of Birth December 02, 2003
Age 20
Sex Male
Book Title Discover Magazine
Author/Editor Steve George
Penalty 20.00
No. of days borrowed 5
Due Date January 26, 2024
Allowed number of days 3
Year level 2
Section SE-A
SOLUTION:
Identify the tables and determine the primary key and data types for the fields.
Table Name Field Name Data Type
tbl_Students
fld_IDNO Text Primary Key
fld_Fname Text
fld_Mname Text
fld_Lname Text
fld_Address Text
fld_DOB Date/Time
fld_Sex Text
tbl_BookBorrowed
fld_TransNO AutoNumber Primary Key
fld_IDNO Text
fld_CourseID Text
fld_Section Text
fld_YrLevel Number
fld_ControlNo Text
fld_DateBorrowed Date/Time
fld_DateReturn Date/Time
tbl_BookCategory
fld_BookCategory Text Primary Key
tbl_BookDetails
fld_ControlNo Text Primary Key
fld_BookTitle Text
fld_Author Text
fld_Type Text
fld_Category Text
fld_Penalty Currency
fld_AllowedNoDays Number
tbl_BookType
fld_BookType Text Primary Key
tbl_Author
fld_Author Text Primary Key
tbl_Course
fld_CourseID Text Primary Key
fld_Course Text
tbl_Sections
fld_Section Text Primary Key
Microsoft Access has the look and feel of other Microsoft Office products,
including its layout and navigational aspects. That is where the similarity ends.
Microsoft® Access is a database and, more specifically, a relational database.
This will be explained in more detail later.
Tables
The tables are the backbone and the storage container of the data
entered into the database. If the tables are not set up correctly, with the correct
relationships, then the database may be slow, give you the wrong results or not
react the way you expect. So, take a bit of time when setting up your tables.
Queries, forms, etc. are usually based on a table.
The tables that contain data look a bit like a table in Microsoft® Word or a
Microsoft® Excel Spreadsheet, when opened. They have columns and rows as
does a table in Microsoft® Word and an Excel worksheet. Each of the columns will
have a field name at the top and each of the rows will represent a record.
As an example:
Relationships
Relationships are the bonds you build between the tables. They join tables
that have associated elements. To do this there is a field in each table, which is
linked to each other, and have the same values.
Queries
Are the means of manipulating the data to display in a form or a report.
Queries can sort, calculate, group, filter, join tables, update data, delete data,
etc. Their power is immense. The Microsoft® Access database query language is
SQL (Structured Query Language). The need to know SQL is not required in the
early stages of learning Access. Microsoft® Access writes the SQL for you, after you
tell it what you want, in the Design view of the queries window.
Forms
Forms are the primary interface through which the users of the database
enter data. The person who enters the data will interact with forms regularly. The
programmer can set the forms to show only the data required. By using queries,
properties, macros and VBA (Visual Basic for Applications), the ability to add, edit
and delete data can also be set. Forms can be set up and developed to reflect
the use they will be required for.
Reports
Reports are the results of the manipulation of the data you have entered
into the database. Unlike forms, they cannot be edited. Reports are intended to
be used to output data to another device or application, i.e. printer, fax,
Microsoft® Word or Microsoft® Excel.
Macros
Macros are an automatic way for Access to carry out a series of actions
for the database. Access gives you a selection of actions that are carried out in
the order you enter. Macros can open forms; run queries, change values of a field,
run other Macros, etc. the list is almost endless.
Modules
Modules are the basis of the programming language that supports
Microsoft® Access, The module window is where you can write and store Visual
Basic for Applications (VBA). Advanced users of Microsoft® Access tend to use
VBA instead of Macros. If you would like to learn VBA, I have a simple step by step
lessons.
All of the above components are persistent; this means that changes are
saved when you move from one component to another, not when the database
is closed, as in a Microsoft® Word Document.
Limitations
The total size of a database file (.MDB) is limited only by the storage
capacity of your PC (Microsoft® quote the maximum database size of 2 Gigabyte
(2000 Megabytes)). These figures are for pre 2007 versions of Microsoft Access.
Very few realistic limitations exist, though here are some parameters:
Maximum table size 1 Gb
No. if fields in a record or table 255
No. of indexes in a table or a record 32
No. of fields in an index 10
No. of tables in a query 32
Maximum size of a form or report 22"
Characters in a memo field 64,000
MDB size 2 Gb
Max Integer 2,147,483,648
Concurrent Users 255
No. of characters in object names 64
Ribbon
Navigation Pane
The Ribbon
The Ribbon contains all the commands you will need to perform common
tasks in MS Access. It has multiple tabs, each with several groups of commands.
This guide is retrieved from the Microsoft webpage (Guide to the Access
User Interface - Microsoft Support, 2023).
These three elements provide the environment in which you create and use
databases.
The Ribbon
The ribbon is the primary replacement for menus and toolbars and provides
the main command interface in Access. One of the main advantages of the
ribbon is that it consolidates, in one place, those tasks or entry points that used to
require menus, toolbars, task panes, and other UI components to display. This way,
you have one place in which to look for commands, instead of a multitude of
places.
When you open a database, the ribbon appears at the top of the main
Access window, where it displays the commands in the active command tab.
The commands that are available on the ribbon also reflect the currently
active object. For example, if you have a table opened in Datasheet view and
you click Form on the Create tab, in the Forms group, Access creates the form,
based on the active table. That is, the name of the active table is entered in the
new form's RecordSource property. Moreover, some ribbon tabs only appear in
certain contexts. For example, the Design tab only appears when you have an
object open in Design view.
You can use keyboard shortcuts with the ribbon. All of the keyboard
shortcuts from an earlier version of Access continue to work. The Keyboard Access
System replaces the menu accelerators from earlier versions of Access. This system
uses small indicators with a single letter or combination of letters that appear on
the ribbon when you press the ALT key. These indicators show what keyboard
shortcut actives the control underneath.
When you have selected a command tab, you can browse the commands
available within that tab.
Execute a command
1. Start Access.
2. Click the appropriate tab for the command. The following table shows a
representative sampling of the tabs and the commands available on each
tab. The tabs and the commands available change depending on what
your are doing.
The Backstage view occupies the File tab on the ribbon and contains many
commands. The Backstage view also contains other commands that apply to an
entire database file. When you open Access but do not open a database (e.g.,
you open Access from the Windows Start menu), you see the Backstage view.
ii. On the right, under Blank web database, type a name for
your database file in the File Name box or use the one that is
provided for you.
iii. Click Create.
The new database is created, and a new table is opened in
Datasheet view.
o Create a new desktop database
i. Under Available templates, click Blank database.
ii. On the right, under Blank database, type a name for your
database file in the File Name box or use the one that is
provided for you.
iii. Click Create.
The new database is created, and a new table is opened in
Datasheet view.
Access provides a number of templates with the product, and you can
download more from Office.com. An Access template is a predesigned database
complete with professionally designed tables, forms, and reports. Templates give
you a big head start when you create a new database.
Access creates the new database from the template and opens it.
You can download additional Access templates from office.com directly from the
Backstage view.
When you open (or create and open) a database, Access adds the file
name and location of the database to an internal list of the most recently used
documents. This list is displayed on the Recent tab of Backstage view so that you
can easily open your most recently used databases.
Navigation Pane
When you open a database or create a new one, the names of your
database objects appear in the Navigation Pane. The database objects include
your tables, forms, reports, pages, macros, and modules.
Note that you can set an option to open objects with a single click in the
Navigation Options dialog box.
The Navigation Pane divides your database objects into categories, and
these categories contain groups. Some categories are predefined for you, and
you can also create your own custom groups.
Creating Queries
1. Click on the "Create" tab and select "Query Design" to create a new query.
2. In the "Show Table" window, select the tables you want to include in the
query and click "Add."
3. Close the "Show Table" window.
4. Drag and drop fields from the tables into the query design grid to specify
which fields to include in the query.
Creating Forms
1. Click on the "Create" tab and select "Form Design" to create a new form.
2. In the "Field List" window, select the table that you want to use as the data
source for the form.
3. Drag and drop fields from the table onto the form design grid to include
them in the form.
4. Arrange and format the form elements as desired.
5. Save the form and switch to the "Form View" to interact with the form.
Creating Reports
1. Click on the "Create" tab and select "Report Design" to create a new report.
2. In the "Field List" window, select the table or query that you want to use as
the data source for the report.
3. Drag and drop fields from the data source onto the report design grid to
include them in the report.
4. Arrange and format the report elements as desired.
5. Save the report and switch to the "Report View" to view and print the report.
These procedures will help you get started with Microsoft Access 2016 and
familiarize yourself with its basic features.
Tables and fields also have properties that you can set to control their
characteristics or behavior.
1. Table properties
2. Field properties
Data types
Every field has a data type. A field's data type indicates the kind of data
that the field stores, such as large amounts of text or attached files.
A data type is a field property, but it differs from other field properties as follows:
• You set a field's data type in the table design grid, not in the Field Properties
pane.
• A field's data type determines what other properties the field has.
• You must set a field's data type when you create the field.
You can create a new field in Access by entering data in a new column in
Datasheet view. When you create a field by entering data in Datasheet
view, Access automatically assigns a data type for the field, based on the
value that you enter. If no other data type is implied by your input, Access
sets the data type to Text. If needed, you can change the data type by
using the Ribbon.
2. In the new table, for the first field, enter a field name and a data type.
3. To set the primary key for the table, select the Field Name cell for the
appropriate field and then select Primary Key.
The Primary Key indicator appears to the left of the field name. You can
change the primary key at any time, but each table can have only one
primary key.
There are many more options when you build and modify tables with Table Design.
• Switch between Design View and Datasheet View for any saved table.
• Designate any field as the table’s primary key.
• Use Builder to create an expression or input mask.
• Test validation rules.
• Insert and delete rows.
• Create lookup lists.
• Create, rename, and delete data macros.
• Define relationships and object dependencies.
CASE STUDY 2
Apply your creative thinking and problem solving to design and implement
a solution.
Creating a Form
Creating forms for your database can make entering data more
convenient. When you create a form, you can design it in a way that works with
your database and that makes sense to you.
Access makes it easy to create a form from any table in your database.
Any form you create from a table will let you view the data that's already in that
table and add new data. Once you've created a form, you can modify it by
adding additional fields and design controls like combo boxes (Access: Creating
Forms, 2017).
4. To save the form, click the Save command on the Quick Access Toolbar.
When prompted, type a name for the form, then click OK.
About Subforms
If you created a form from a table with records that are linked to another
table, your form probably includes a subform. A subform is a datasheet form that
displays linked records in a table-like format. For instance, the subform included in
the Customers form we just created displays linked customer orders.
Subforms are often quite helpful. Depending on the content and source of
your form, you might find that the subform contains useful information, like in the
example below. In our Orders form, the subform contains the name, quantity, and
price of each item contained in the order, which is all useful information.
When you use the Form command on an existing table, all of the fields from
the table are included in the form. However, if you later add additional fields to
the table, these fields will not automatically show up in existing forms. In situations
like this, you can add additional fields to a form.
3. The Field List pane will appear. Double-click the desired field(s).
You can also use the above procedure to add fields to a totally blank form.
Simply create a form by clicking the Blank Form command on the Create tab,
then follow the above steps to add the desired fields.
Form Design
In Form Design, you can create a blank form in design view from scratch.
You can make advance design changes to forms, such as adding custom control
types and writing code.
Add a Control
Any graphic object that appears on forms and reports is called a control.
A text box used to enter and display information, a text label, and a button you
click to print a report would all be examples of controls. Let’s look at how to add
controls in Design View.
1. In Design View, click the control button you want to add from the Controls
group. Some controls, such as buttons or lists, have a wizard that helps you
set them up.
2. If the control you added opens the Control Wizard, navigate through it
and specify the settings you want.
See the table below for a list of some of the controls you can add and what they
do.
Controls
Click this button and then click the control you want to
select. To select multiple controls, click this button and hold
Select
down the Shift key as you click each control, or drag a
rectangle around all controls you want to select.
Creates a text box that displays information from a table
Text Box
and query. You can also use text boxes to simply enter text.
Creates a static text label that is the same for every record,
Label such as a heading. Most controls already have a text label
attached.
Button Creates a button that runs a macro or Visual Basic function.
Enables you to create tabs (like the ones found in some
Tab Control dialog boxes) to include more than one page of controls on
the form.
Hyperlink Inserts a link to a webpage or file.
Web Browser Inserts a control that allows the database user to access the
Control computer’s web browser.
Navigation
Creates a control that allows the form to be navigated.
Control
Creates a box around a group of option buttons so that the
Option Group user is only allowed to make one selection from the group
box.
Insert Page Break Inserts a page break.
Creates a drop-down box that lets the user enter text or
Combo Box
select an item from a list of options.
Chart Inserts a chart.
Line Enables you to draw a line.
Creates a toggle button that allows you to display and enter
Toggle Button
data from a Yes/No field.
Creates a box that lets the user select an item from a list of
List Box
options.
Rectangle Enables you to draw a rectangle.
Creates a box that is checked or unchecked. Use to enter
Check box
data from a Yes/No field.
Inserts an OLE object that is not bound to a field in the
Unbound Object current database. Use an Unbound Object Frame to display
Frame information from an external source or program, such as a
spreadsheet, graphic, or other file.
Attachment Provides the option to include an attachment.
Creates an option button (or radio button) that allows the
Option Button
user to make a single selection from two or more choices.
Controls
Option buttons are normally used with the Option Group
control.
Inserts another form within the main form. Use when you
Subform/Subreport
want to show data from a one-to-many relationship.
Inserts an OLE object that is bound to a field in the
Bound Object
database. Use Bound Object Frames to display pictures or
Frame
other OLE information in the database.
Image Displays a picture or graphic file that you specify.
Combo boxes
A combo box is a drop-down list you can use in your form in place of a field.
Combo boxes limit the information users can enter by forcing them to select only
the options you have specified.
Combo boxes are useful for fields that have a limited number of possible valid
responses. For instance, you might use a combo box to make sure people only
enter a valid U.S. state while entering an address, or that they only choose
products that already exist in your database while placing an order.
3. Select the desired location for the combo box. A line will appear to indicate
the location where your combo box will be created. In our example, we'll place it
between the City field and the Add to Mailing List? fields.
4. The Combo Box Wizard dialog box will appear. Select I will type in the
values that I want, then click Next.
5. Type the choices you want to appear in your drop-down list. Each choice
should be on its own row. In our example, we are creating a combo box for
the Add to Mailing List? field in our form, so we will enter all of the possible valid
responses for this field. Users will be able to select one of three choices from our
finished combo box: No, Yes - Weekly, and Yes - Special Events and Offers.
6. If necessary, resize the column so all of your text is visible. Once you are
satisfied with your list, click Next.
7. 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.
8. Enter the label—or name—that will appear next to your combo box.
Generally, it's a good idea to use the name of the field you chose in the previous
step.
9. Click Finish. Your combo box will appear on the form. If you created your
combo box to replace an existing field, you should delete the first field. In our
example, you might notice that we now have two fields with the same name.
These two fields send information to the same place, so we don't need them both.
We'll delete the one without the combo box.
10. Switch to Form view to test your combo box. Simply click the drop-down
arrow and verify that the list contains the correct choices. The combo box can
now be used to enter data.
If you want to include a drop-down list with a long list of options and don't
want to type all of them out, create a combo box and choose the first option in
the Combo Box Wizard: I want the combo box to get the values from another table
or query. This will allow you to create a drop-down list from a table field.
Some users report that Access malfunctions while working with forms. If you
have a problem performing any of these tasks in Layout view, try switching to
Design view.
The best way to familiarize yourself with the Property Sheet is to open it
and select various options. When you select an option, Access will display a brief
description of the option on the bottom-left border of the program window.
Pay close attention as you modify your form and its fields. It's possible to
make subtle changes with the Property Sheet. Because there are so many options,
it can sometimes be difficult to remember which one you used to modify each
aspect of your form.
To hide a field:
1. In either Layout or Design view, select the Design tab, then locate
the Tools group. Click the Property Sheet command.
2. The Property Sheet will appear in a pane on the right. On the form, select the
field you want to hide. In our example, we'll hide the Customer ID field because
we don't want any of our users to try editing it.
3. In the Property Sheet, click the All tab, then locate the Visible option on the
fifth row.
4. Click the drop-down arrow in the column to the right, then select No.
3. In the Property Sheet, click the Data tab, then select the Default Value field in
the fourth row. Click the Expression Builder button that appears in the column
to the right.
4. The Expression Builder dialog box will appear. In the Expression Elements list,
click the words Common Expressions.
5. In the Expression Categories list, double-click Current Date.
7. Switch to Form view to verify that the expression works. When you create a new
record with that form, the date field you modified will automatically fill in the
current date.
Creating Reports
If you need to share information from your database with someone but
don't want that person actually working with your database, consider creating a
report. Reports allow you to organize and present your data in a reader-friendly,
visually appealing format. Access makes it easy to create and customize a report
using data from any query or table in your database.
1. Open the table or query you want to use in your report. We want to print a list
of cookies we've sold, so we'll open the Cookies Sold query.
2. Select the Create tab on the Ribbon. Locate the Reports group, then click
the Report command.
5. To save your report, click the Save command on the Quick Access Toolbar.
When prompted, type a name for your report, then click OK.
Just like tables and queries, reports can be sorted and filtered. Simply right-
click the field you want to sort or filter, then select the desired option from the
menu.
Deleting fields
You might find that your report contains some fields you don't really need
to view. For instance, our report contains the Zip Code field, which isn't necessary
in a list of orders. Fortunately, you can delete fields in reports without affecting the
table or query where you grabbed your data.
When you delete a field, be sure to delete its header as well. Simply select
the header and press the Delete key.
To print a report:
1. From the Home tab, click the View command, then select Print Preview from the
drop-down list. Your report will be shown as it will appear on the printed page.
2. If necessary, modify the page size, margin width, and page orientation using the
related commands on the Ribbon.
4. The Print dialog box will appear. Set any desired print options, then click OK. The
report will be printed.
Saving reports
You can save reports in other formats so they'll be viewable outside of
Access. This is called exporting a file, and it allows you to view and even modify
reports in other formats and programs.
Access offers options to save your report as an Excel file, text file, PDF,
and HTML document, among other file types. Experiment with the different export
options to find the one that best suits your needs.
To export a report
1. From the Home tab, click the View command, then select Print Preview from
the drop-down list.
2. Locate the Data group on the Ribbon.
3. Select one of the file type options, or click More to see options to save your
report as a Word or HTML file.
4. A dialog box will appear. Select the location where you want to save the
report.
5. Enter a file name for the report, then click Publish.
6. A dialog box will appear to notify you that your file has been successfully
saved. Click Close to return to your report.
7. Some export options will cause the Export Wizard to appear. Simply follow the
instructions to export your report.
CASE STUDY 3
Apply your creative thinking and problem solving to design and implement
a solution.
2. SQL View
SQL (Structured Query Language) is a standard language for interacting
with databases. In MS Access, you can directly write SQL statements in the SQL
View to create queries. It gives you more control and flexibility over the query
design.
This query will return all the fields and records from the "Customers" table.
Once you create a query, you can save it and reuse it whenever needed.
MS Access provides options to run queries, view their results, and even create
forms or reports based on the query output.
Note that MS Access has a limit on the complexity and size of databases it
can handle. For larger or more complex database systems, you may need to
consider using other database management systems like Microsoft SQL Server or
MySQL (Introduction to Queries - Microsoft Support, 2023).
• Data Retrieval
Queries can be used to retrieve specific data from one or more tables
based on specified criteria. You can filter records, sort data, and extract
the required information from the database.
• Data Manipulation
Queries allow you to modify existing data in the database. You can
update, insert, or delete records in one or more tables using SQL statements
or visual tools.
• Data Joining
MS Access queries allow you to combine data from multiple tables using
join operations. This enables you to retrieve information from related tables
based on common fields.
• Data Validation
Queries can be used to enforce data integrity by checking and
validating data against predefined rules or conditions. This ensures that the
data entered into the database meets specific criteria.
Queries in MS Access can be created using the Query Design View, where
you can visually define the query criteria, or by writing SQL statements directly in
the SQL View. These queries can be saved and reused whenever necessary,
allowing for efficient data retrieval and manipulation in the database (Chapple,
2020).
One-Table Queries
We will run a query on the Customers table of our bakery database. Let's
say our bakery is having a special event, and we want to invite our customers who
live nearby because they are the most likely to come. This means we need to see
a list of all customers who live close by, and only those customers.
We want to find our customers who live in the city of Raleigh, so we'll search
for "Raleigh" in the City field. Some customers who live in the suburbs live fairly close
by, and we'd like to invite them as well. We'll add their zip code, 27513, as another
criteria.
If you think this sounds a little like applying a filter, you're right. A one-table
query is actually just an advanced filter applied to a table.
3. Access will switch to Query Design view. In the Show Table dialog box that
appears, select the table you want to run a query on. We are running a
query on our customers, so we'll select the Customers table.
6. Set the search criteria by clicking the cell in the Criteria: row of each field
you want to filter. Typing criteria into more than one field in the Criteria: row
will set your query to include only results that meet all criteria. If you want to
set multiple criteria but don't need the records shown in your results to meet
all of them, type the first criteria in the Criteria: row and additional criteria
in the or: row and the rows beneath it. Because we want to find customers
who either live in Raleigh or in the 27513 zip code, we'll type "Raleigh" in the
City field and "27513" into the or: row of the Zip Code field. The quotation
marks will search these fields for an exact match.
7. After you have set your criteria, run the query by clicking the Run command
on the Design tab.
8. The query results will be displayed in the query's Datasheet view, which looks
like a table. If you want, save your query by clicking the Save command in
the Quick Access Toolbar. When prompted to name it, type the desired
name, then click OK.
Scenario:
You are working with an MS Access database that contains two tables:
"Customers" and "Orders." The "Customers" table has the following fields:
CustomerID, CustomerName, Email, and Country. The "Orders" table has the
following fields: OrderID, CustomerID, ProductName, Quantity, and OrderDate.
Your goal is to retrieve specific information using queries.
Tasks:
Note: You can use either the Query Design View or the SQL View to create the
queries.
Solutions:
These exercises will help you practice retrieving data using queries in MS
Access, and you can modify and expand upon them to further explore the
capabilities of database queries.
CASE STUDY 4
Apply your creative thinking and problem solving to design and implement
a solution.
data warehouse. This ETL process ensures that the data in the warehouse is clean,
standardized, and suitable for analysis.
1. Star Schema
The star schema is a simple and widely used data warehousing
architecture. It consists of a central fact table surrounded by dimension tables.
The fact table contains the numeric measures or facts of interest, such as sales
revenue or quantities, while the dimension tables store descriptive attributes or
dimensions, such as time, product, and location.
2. Snowflake Schema
The snowflake schema is an extension of the star schema. It adds additional
levels of normalization to the dimension tables, resulting in a more normalized
structure. In a snowflake schema, dimension tables may be further broken
down into multiple tables, creating a hierarchical or snowflake-like structure.
3. Data Cubes
Data cubes, also known as multidimensional cubes or OLAP cubes, provide
a multi-dimensional view of data for analysis. They organize data into a multi-
dimensional array, where each axis represents a different dimension or
attribute. The intersections of these dimensions form cells that store
aggregated values or measures.
Data cubes allow for efficient and rapid analysis of data across multiple
dimensions. Users can slice (select a subset of data along one dimension), dice
(select a subset of data along multiple dimensions), and drill down (navigate
from higher-level summaries to detailed data) to gain insights from the data.
EXERCISES
CASE STUDY 5
Apply your creative thinking and problem solving to design and implement
a solution.
Form a group of five members and apply what you have learned in
database management system to real-world business scenarios. Present the
database system according to the provided rubric.
Group:
Needs
Criteria Excellent (5) Good (4) Fair (3) Poor (2) Improvement SCORE
(1)
Functionality All required Most required Some required Few required Most required
features are fully features are features are features are features are
functional. functional. functional. functional or dysfunctional.
significant errors
are present.
Usability Intuitive interface, Interface is mostly Interface requires Interface is Interface is highly
easy to navigate. intuitive. some learning. confusing or confusing.
difficult to
navigate.
Efficiency Fast performance, Acceptable Performance is Significant Unusable due to
minimal latency. performance slow under load. performance performance
under load. issues under any issues.
load.
Design & Well-organized Structure is mostly Structure needs Structure is Structure is
tables, logical. some disorganized or chaotic or
Structure relationships, and improvement. lacks coherence. nonexistent.
queries.
Data Integrity Data validation Data integrity Some data Insufficient data No data integrity
and error handling measures mostly integrity measures validation or error measures
implemented in place. implemented. handling. implemented.
effectively.
Scalability Database can Some provisions Limited scalability Database cannot Database crashes
scale effectively for scalability options. scale with growing or fails with more
with growing data. exist. data. data.
Security Robust security Basic security Some security Security measures No security
measures in measures measures in are inadequate. measures
place, access implemented. place. implemented.
controls
implemented
effectively.
Overall Exceptional Solid database Functional but Major flaws Unusable due to
database system, system with minor needs detract from numerous flaws.
Quality exceeds flaws. improvement. functionality.
expectations.
REFERENCES
Access: Creating Forms. (2017). https://edu.gcfglobal.org/en/access/creating-
forms/1/
Silberschatz, A., Korth, H. F., & Sudarshan, S. (2011). Database system concepts.
McGraw-Hill.