Database Concepts

Chapter's Outline

  • Data | Database | Data Processing | Information
  • Elements of Database
    • Field, record, column, row, table, Database System
  • Database Management System (DBMS)
    • RDBMS
    • OODBMS
    • DDBMS
    • HDBMS
  • Microsoft office Access
    • Table
      • Keys (Primary | Foreign Key | composite Key)
      • Indexing
      • Sorting
      • Filtering
    • Queries
    • Form
    • Report

Basic Concepts

Data

Data alone does not give any meaning. Raw form of any facts, figures or entities are known as data. For example, Ram, 23, Kalika etc are raw data individually does not give any meaning.

Information

The processed form of data is known as information. When the data becomes information it gives meaningful result. For Example Ram is 23 Years old who lives in Kalika.

Database

A collection of systematically organized inter-related data is called a database. For example Telephone directory(Phonebook), Mark Ledger, Attendance.

  • Database can be Manual and Computerized
  • Data in database are organized in rows and columns
  • Database may have single table or multiple tables

Why Database: Database is used to store, organize and retrieve data.

Elements of Database

Table

Tables also called the primary object of database are the building block of database. Table stores data into rows called records and column called field.

Record/Row

A record or row contains information about single items in a database. It is also called tuple.

Data Field/Column

A field or column contains information about a certain type for all records. It is also known as attributes.

Database Management System (DBMS)

Database management system (DBMS) is a computerized system that stores data, processes them and provides information in an organized form.

Creating, modifying, updating, appending, organizing, sorting, removing, and retrieving data are the major tasks performed easily, efficiently and accurately by using Database management system.

Example of DBMS are: My SQL, MS Access etc

Types/Model of Database Management System

  1. RDBMS (Relation Database Management System)
  2. OODBMS (Object Oriented Database Management System)
  3. DDBMS (Distributed Database Management System)
  4. HDBMS (Hierarchical Database Management System)

Difference between Database and Database Management System

Database DBMS
It is collection of related data. It is a software to maintain database.
It is not secured. It is highly secured.
Data sharing is impossible. Data can be easily share in a network
Every DBMS has database. Every database doesn't have DBMS.
Eg, Dictionary, telephone directory Eg, MY SQL, Oracle.

Relation Database Management System (RDBMS)

The database system which stores and display data in tabular format of rows and column like is known as RDBMS. It is the most practical DBMS those days. For example, MS-Access, MY SQL, Oracle etc

MS ACCESS

MS-Access is DBMS software based n RDMBS model developed by Microsoft Corporation. This software is distributed along with the Microsoft Office application package.

MS Access consists of seven objects. The various objects of MS-Access are

  • Tables: Tables are the primary building block of database. All data are stored and managed in a table.
  • Queries: A query is simply the question that we ask about the data stored in the table. Query is used to perform mathematical calculation.
  • Forms: Forms are used to display the information in specific manner, as well as it allows user to add, modify and delete data in a table.
  • Reports: Reports are generally created for the printing purpose of any desired information from table and queries.
  • Pages
  • Macros
  • Modules

All objects of a database are stored in a single file, and the extension of database file is .accdb.

Table

There are two views for Table : Design View and datasheet View

  • Design View: Used to Set Data field and Data Type
  • Datasheet View: Used to enter Data

Data Type in MS Access

Data type determines the kind of values that can be store in the data field. For example Text Data type is used to store Name, similarly Date and Time Data Type is uses to store data.

In MS Access following Data Types are used

Text

Used for storing alphanumeric characters, text, or combinations of text and numbers. It is suitable for data that doesn't require mathematical calculations.

Memo

Used for storing lengthy text or combinations of text and numbers. Memo fields can hold large amounts of text, making them suitable for notes, descriptions, or comments.

Number

Used for storing numeric data that will be used in mathematical calculations. You can specify the data type (integer, long integer, single, double, etc.) to control the precision and range of numeric values.

Yes/No

Used for storing data that can only have one of two possible values, such as "Yes" or "No," "True" or "False," or "1" or "0."

Date and Time

Used for storing date and time data. This data type allows you to store specific dates and times, making it useful for scheduling and tracking events.

Currency

Used for storing currency values. Currency data type provides built-in formatting for monetary values, including symbols and decimal places.

AutoNumber

Used for generating unique sequential numbers automatically. AutoNumber fields are typically used as primary keys to ensure each record has a unique identifier.

Hyperlink

Used for storing hyperlinks to websites, files, or other resources. Access can recognize and open these hyperlinks for easy navigation.

OLE Object

Used for storing OLE (Object Linking and Embedding) objects, such as Microsoft Word documents, Excel spreadsheets, pictures, sounds, or other embedded objects.

Attachment

Allows you to attach and store multiple files of various types within a single field. It's useful for managing file attachments within the database.

Lookup Wizard

Used to create a field that allows you to choose a value from another table using a drop-down list or combo box. This is helpful for enforcing data integrity and reducing data entry errors.

Field Properties

Field properties are used to control over the contents of a data field. The general properties of fields are given below:

  • Field Size: Field Size property is used to set the maximum size for data stored in the field for Text or Number data type
  • Format: Format field property allows you to display data in a format different from the way it is actually stored in a table.
  • Input Mask: Input mask field property specifies the pattern of data that you wish to enter into the specific field
  • Caption: Caption field property is the alternative name given for any field
  • Default Value: Default Value field property is one that is displayed automatically for the field when you add a new record to the table.
  • Validation Rule: It is used to limit the values that can be entered into a field.
  • Validation Text: Validation Text is the error message that appears if the data entered is invalid according to the specified validation rule.
  • Required: Required property used to specify whether a value is required in a field or not
  • Allow Zero Length: AllowZeroLength property is used to specify whether a zero-length string (" ") is a valid entry in a table field.
  • Indexed: Indexed property is used to set an index on a field. It speeds up searching and sorting of records based on a field.

Primary Key

Primary Key is a special field or group of fields in the table that uniquely identifies each record from the database.

  • The primary key does not accept duplicate value for a field
  • It does not allow a user to leave the field blank or null.

Foreign key

A foreign key is a field or set of fields in a database table that establishes a link to the primary key of another table, enforcing referential integrity and creating relationships between tables.

Composite key

A composite key is a combination of two or more fields in a database table that together uniquely identify each record in that table, ensuring data integrity and allowing for complex relationships between tables.

Indexing

Indexing in a database is a technique used to quickly locate and access data within a table by creating a data structure that improves search speed.

Indexing is a database optimization technique that creates a data structure to improve the speed and efficiency of data retrieval by enabling fast lookup and searching of specific data

Sorting

Sorting is the process of arranging data in a specific order, often ascending (A to Z or 1 to 9) or descending (Z to A or 9 to 1)

Filtering

Filtering is the process of selecting and displaying a subset of data from a larger dataset based on specific criteria or conditions,

Queries

A query is simply the question that we ask about the data stored in the table. Query is used to perform mathematical calculation.

Functions of Queries

  • It is used to perform arithmetic or logical calculation on data
  • It is used to extract the selected records from various tables
  • Use to Sort Data based on fields name
  • Use to filter data based on criteria

Type of Query

Select Query

Retrieves specific data from one or more tables.

Action Query

Performs tasks like modifying, deleting, or creating data.

  • Update: Modifies existing data in a table.
  • Delete: Removes records from a table.
  • Append: Adds records from one table to another.
  • Make Table: Creates a new table from the results of a query.
Parameter Query

Asks for input to customize the query results.

Advance Filter/Sort Query

Filters and sorts data based on complex conditions.

Total or Summery Query

Calculates summary statistics like sums or averages.

Crosstab Query

Summarizes data in a matrix format, showing data grouped by rows and columns.

Wildcards

Wildcard are the special characters that represent one or series of characters present in the given word.

Forms and Reports

Forms

Forms are used to display the information in specific manner, as well as it allows user to add, modify and delete data in a table.

Function

  • Allows users to enter and edit Modify and delete data easily.
  • Displays records from a table in a user-friendly format.
  • Enables the creation of customized layouts for data display.
  • Provides buttons, dropdowns, and other controls for easier interaction with the database.

Reports

Reports are generally created for the printing purpose of any desired information from table and queries.

Function

  • Displays data in a structured and formatted way for easy reading.
  • Provides summaries of data, such as totals, averages, and counts.

Database Administration (DBA)

Role of Data Administration

  • Database Design
  • Data Integrity
  • Security management
  • Performance Tuning
  • Backup and Recovery
  • User Support
  • Database Maintenance
  • Version Control
  • Data migration
  • Training and Documentation