Introduction To Database
Introduction To Database
What is a Table?
A table is a collection of data elements organised in terms of rows and columns. Table is the
simplest form of data storage. Below is an example of an Employee table.
1 Adam 34 13000
2 Alex 28 15000
3 Stuart 20 18000
4 Ross 42 19020
What is a Tuple?
A single entry in a table is called a Tuple or Record or Row. A tuple in a table represents a set of
related data. For example, the above Employee table has 4 tuples/records/rows.
1 Adam 34 13000
What is an Attribute?
A table consists of several records (rows); each record can be broken down into several smaller
parts of data known as Attributes. The table above consists of four attributes; namely
ID, Name, Age and Salary.
What is a field?
In a database table, a field is a data structure for a single piece of data. Fields are organized
into records, which contain all the information within the table relevant to a specific entity.
Data Types
The most important property for a field is its data type. A field's data type determines what kind
of data it can store. MS Access supports different types of data, each with a specific purpose.
Date/Time Date and time values for the years 100 through 9999.
Yes and No values and fields that contain only one of two values
Yes/No
(Yes/No, True/False, or On/Off).
Files, such as digital photos. Multiple files can be attached per record.
Attachment
This data type is not available in earlier versions of Access.
OLE objects can store pictures, audio, video, or other BLOBs (Binary
OLE objects
Large Objects)
The Lookup Wizard entry in the Data Type column in the Design view
is not actually a data type. When you choose this entry, a wizard
starts to help you define either a simple or complex lookup field.
Lookup Wizard A simple lookup field uses the contents of another table or a value
list to validate the contents of a single value per row. A complex
lookup field allows you to store multiple values of the same data type
in each row.
You can create an expression that uses data from one or more fields.
Calculated
You can designate different result data types from the expression.
Design view allows you to create and modify the table structure, form, or other database object,
and configure the fields. You can also set keys and restrict the values entered here. But you
cannot change the entries in the table in the design view.
Types of Keys
In a relational database, keys ensure that any record in a table can be uniquely identified by one
field or a combination of fields in the table. Keys also link tables in the database together and
identify relationships between them.
Primary keys
The primary key is a field which uniquely identifies each record in a table in a relational
database.
Foreign keys
Foreign keys are the columns of a table that points to the primary key of another table. They act
as a cross-reference between tables.
Composite key
A composite key is a specific type of primary key which uses the contents of two or more fields
from a table to create a unique value.
Candidate Key
A candidate key is a set of attributes that uniquely identify tuples in a table. Candidate Key is a
super key with no repeated attributes.
Objects in Microsoft Access
Although tables store all of your data, the other three objects—forms, queries, and reports—
offer you ways to work with it. Each of these objects interacts with the records stored in your
database's tables.
Forms
Forms are used for entering, modifying, and viewing records. You likely have had to fill out forms
on many occasions, like when visiting a doctor's office or registering for school. When you enter
information into a form in Access, the data goes exactly where the database designer wants it to
go: in one or more related tables.
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 your database. When you build a query in Access, you
are defining specific search conditions (criteria) to find exactly the data you want.
Reports
Reports offer you the ability to present your data in print. If you've ever received a computer
printout of a class schedule you've seen a database report. Reports are useful because they
allow you to present components of your database in an easy-to-read format.