Databases and MS ACCESS
Databases and MS ACCESS
DATA
Data are the raw bits and pieces of information with no context. If I told you,
“15, 23, 14, 85,” you would not have learned anything. But I would have given
you data.
Qualitative data is descriptive. “Ruby Red,” the color of a 2013 Ford Focus, is an example of
qualitative data. A number can be qualitative too: if I tell you my favorite number is 5, that is qualitative
data because it is descriptive, not the result of a measurement or mathematical calculation.
Once we have put our data into context, aggregated and analyzed it, we can use
it to make decisions for our organization. We can say that this consumption of
information produces knowledge. This knowledge can be used to make
decisions, set policies, and even spark innovation.
The final step up the information ladder is the step from knowledge (knowing a
lot about a topic) to wisdom. We can say that someone has wisdom when they
can combine their knowledge and experience to produce a deeper understanding
of a topic. It often takes many years to develop wisdom on a particular topic,
and requires patience.
DATABASES
The goal of many information systems is to transform data into information in
order to generate knowledge that can be used for decision making. In order to
do this, the system must be able to take data, put the data into context, and
provide tools for aggregation and analysis. A database is designed for just such
a purpose.
A database is an organized collection of related information. It is an organized
collection, because in a database, all data is described and associated with other
data. All information in a database should be related as well; separate databases
should be created to manage unrelated information.
For example, a database that contains information about students should not also
hold information about company stock prices. Databases are not always digital –
a filing cabinet, for instance, might be considered a form of database. For the
purposes of this text, we will only consider digital databases.
RELATIONAL DATABASES
Databases can be organized in many different ways, and thus take many forms.
The most popular form of database today is the relational database. Popular
examples of relational databases are Microsoft Access, MySQL, and Oracle. A
relational database is one in which data is organized into one or more tables. Each
table has a set of fields, which define the nature of the data stored in the table. A
record is one instance of a set of fields in a table. To visualize this, think of the
records as the rows of the table and the fields as the columns of the table. In the
example below, we have a table of student information, with each row
representing a student and each column representing one piece of information
about the student.
DESIGNING A DATABASE
Suppose a university wants to create an information system to track participation
in student clubs. After interviewing several people, the design team learns that
the goal of implementing the system is to give better insight into how the
university funds clubs. This will be accomplished by tracking how many
members each club has and how active the clubs are. From this, the team decides
that the system must keep track of the clubs, their members, and their events.
Using this information, the design team determines that the following tables need
to be created:
Clubs: this will track the club name, the club president, and a short description
of the club.
Students: student name, e-mail, and year of birth.
Memberships: this table will correlate students with clubs, allowing us to have
any given student join multiple clubs.
Events: this table will track when the clubs meet and how many students
showed up.
Now that the design team has determined which tables to create, they need to
define the specific information that each table will hold. This requires identifying
the fields that will be in each table. For example, Club Name would be one of the
fields in the Clubs table. First Name and Last Name would be fields in the
Students table. Finally, since this will be a relational database, every table
should have a field in common with at least one other table (in other words: they
should have a relationship with each other).
In order to properly create this relationship, a primary key must be selected for
each table. This key is a unique identifier for each record in the table.
You can see the final database design in the figure below:
The Difference between a
Database and a Spreadsheet
Many times, when introducing the concept of databases to students, they quickly
decide that a database is pretty much the same as a spreadsheet. After all, a
spreadsheet stores data in an organized fashion, using rows and columns, and
looks very similar to a database table. This misunderstanding extends beyond the
classroom: spreadsheets are used as a substitute for databases in all types of
situations every day, all over the world.
To be fair, for simple uses, a spreadsheet can substitute for a database quite well.
If a simple listing of rows and columns (a single table) is all that is needed, then
creating a database is probably overkill. In our Student Clubs example, if we only
needed to track a listing of clubs, the number of members, and the contact
information for the president, we could get away with a single spreadsheet.
However, the need to include a listing of events and the names of members would
be problematic if tracked with a spreadsheet.
When several types of data must be mixed together, or when the relationships
between these types of data are complex, then a spreadsheet is not the best
solution. A database allows data from several entities (such as students, clubs,
memberships, and events) to all be related together into one whole. While a
spreadsheet does allow you to define what kinds of values can be entered into its
cells, a database provides more intuitive and powerful ways to define the types of
data that go into each field, reducing possible errors and allowing for easier
analysis.
Though not good for replacing databases, spreadsheets can be ideal tools for
analyzing the data stored in a database. A spreadsheet package can be connected
to a specific table or query in a database and used to create charts or perform
analysis on that data.
MICROSOFT -ACCESS
MICROSOFT AND ITS HISTORY
INTRODUCTION TO MS – ACCESS
DATASHEET
TABLES
A table is a collection of data about a specific topic, such as students
or contacts. Using a separate table for each topic means that you
store that data only once, which makes your database more efficient,
and reduces data-entry errors.
Tables organize data into columns (called fields) and rows (called records).
DATASHEET VIEW
Datasheet View : A view that displays data from a table, form, query, view,
or stored procedure in a row-and-column format. In Datasheet view, you can
edit fields, add and delete data, and search for data. In Access 2007, you
can also modify and add fields to a table in Datasheet view.
3. To add your fields, click the first blank field header – the words Click
to Add. That starts a menu of data types, and you select a data type
for the field. After that, the field header then becomes available for
writing, so...
4. You just type the field name and press ENTER. Doing that shifts the
focus to the next field, where you repeat the process. As you work,
remember that if your field names contain more than one word, don’t
use spaces between the words.
5. When you’ve finished, press CTRL+S, or go to the Quick Access
Toolbar and click Save. That starts a Save As dialog box, where you
enter a name for the table and then save it.
DESIGN VIEW
A view that shows the design of these database objects: tables, queries,
forms, reports, and macros. In Design view, you can create new database
objects and modify the design of existing objects.
Design view allows you to build a table from scratch and set or change
every available property for each field.
You can also open existing tables in Design view and add, remove, or
change fields.
1. On the Create tab, in the Tables group, click Table Design.
2. In the Field Name column of the designer, enter the names of your
table fields. As a rule, the first field you create should be your primary
key field. And remember that you don’t need to add any foreign key
fields now. You can do that when you create your relationships.
3. In the Data Type column, use the list next to a field name to choose a
data type for that field.
4. Optionally, use the Field Properties pane to set properties for
individual fields.
PRIMARY KEY
ENTERING DATA
Click on the Datasheet View and simply start by entering the data into
each field.
MANIPULATING DATA
• Adding a new row
Simply drop down to a new line and enter the information
• Updating a record
Simply select the record and field you want to update, and change its data
with what you want
• Deleting a record
Simply select the entire row and hit the Delete Key on the keyboard