3 Database
3 Database
Communication Technology
Hamza Arif
[email protected]
Database
• Data: Data refers to raw, unorganized facts and figures that
are collected and stored. It consists of individual pieces of
information that, on their own, may not provide much
context or meaning.
• Information:
• Information is data that has been processed, organized, or
interpreted to provide context, relevance, and meaning. It
results from the analysis and interpretation of data,
transforming it into something that is useful and
meaningful for decision-making or understanding.
Database
• A database is a structured collection of data that is
organized in a way that makes it easy to manage,
retrieve, and update. Databases are used in various
applications and systems to store and organize
information efficiently. They serve as a central
repository for data, allowing users and applications
to interact with the stored information in a
systematic and controlled manner.
Key Components of a Database:
• Tables:
▫ Definition: Tables are the fundamental structure in a relational
database. They consist of rows and columns, where each row
represents a record, and each column represents an attribute or field.
• Rows (Records):
▫ Definition: Rows, also known as records or tuples, represent individual
entries or instances in a table. Each row contains values for each
column, representing a specific data record.
• Columns (Fields):
▫ Definition: Columns, also known as fields or attributes, represent the
different types of information that can be stored in a table. Each
column has a specific data type.
Hierarchy of Data in database
• Bit:
▫ Definition: The smallest unit of data in computing, representing a
binary value (0 or 1).
▫ Example: 0 or 1.
• Byte:
▫ Definition: A group of 8 bits, representing a basic unit of storage
capable of representing a single character or numerical value.
▫ Example: 01011011
• Field:
▫ Definition: A field is a specific attribute or property in a database table
that stores data of a particular type.
▫ Example: In a "Customer" table, fields could include "CustomerID,"
"FirstName," "LastName," and "Email."
Hierarchy of Data in database
• Record (Row or Tuple):
▫ Definition: A record is a complete set of related fields that represents a single
entity in a database table.
▫ Example: A record in a "Customer" table might include values for
"CustomerID," "FirstName," "LastName," and "Email."
• Table (Relation):
▫ Definition: A table is a collection of records with a consistent set of fields. Each
table in a database represents a specific entity or concept.
▫ Example: A "Customer" table containing multiple records.
• Database:
▫ Definition: A database is a collection of related tables that are organized and
structured to efficiently store, retrieve, and manage data.
▫ Example: A database might include tables for "Customers," "Orders," and
"Products," each related to a specific aspect of a business.
File Maintenance Procedures
• Adding (Inserting) Records: To add a new record to a table, you
use the INSERT INTO statement.