Data Base

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 23

Database

Database Management System


Objectives
• Database, Data and Information
• Data Integrity
• Hierarchy of Data
• File, Record, field and Character
• Data Type of Fields
• File Maintenance Procedures
• Adding, Modifying, Deleting Records
• Validation
• Types of Database
• Advantages and Disadvantages
Definition

• Database is a collection of related data or facts


arranged in a specific structure
• DBMS is a software tool that allow people to store,
access and process data or facts into useful information
Databases, Data, and Information
• A database at a school, for example, contains data about its students and classes.
• When a student is admitted to a school, an admissions department clerk enters several
data items into a computer. The clerk also uses a digital camera to photograph the new
student.
• This photo, along with the other entered data, is stored in a database on a server’s hard
disk.
• A computer at the school then processes the new student data and sends advising
appointment information to a laser printer
History of Database

The history of databases dates back long before computers were


invented. In the past, data was stored in journals, libraries, and
filing cabinets, taking up space and making it difficult to find and
back up. In 1960, Charles W. Bachman designed the integrated
database system, the “first” DBMS.
Garbage in

Data Integrity
 Data integrity identifies
the quality of the data
Garbage out
 Garbage in, garbage out
(GIGO) points out the
accuracy of a computer’s
output depends on the
Data Integrity
accuracy of the input is lost
Syntax of database
Fields  Records
• Hold an individual piece of data • One full set of fields Often called a row
• Phone book example
• Are named descriptively, Often
• Smith, Joe, 123 Some Street, 412-555-7777
called a column
• Databases may have unlimited rows
• Phone book examples
• Name, address, e-mail, phone
 Tables
number • One complete collection of records
• Fields may contain no data • bnDatabases may have thousands of
tables
The Hierarchy of Data
• A field is a combination of one or more related
characters and smallest unit of data user accesses
• Field name uniquely identifies each field
• Field size defines maximum number of
characters a field can contain
• Data type specifies kind of data field contains
Field types
Most DBMS use the same types
• Text fields store letters and numbers
• Numeric field store numbers
• Date and time field
• Logical field stores yes or no
• Binary field stores images or sounds
The Hierarchy of Data
• A record is a group of related fields
• A primary key uniquely identifies each record
• A data file is a collection of related records
Maintaining Data
Adding Modifying
 Users add new records to a file
when they obtain new data records records
 Users modify a record to correct
inaccurate data or update old data
 When a record no longer is
needed, a user deletes it from a
Deleting
file records
Alphabetic/Numeric
Range check
check

Validation
Consistency check Completeness check
 Validation compares
data with a set of
rules or values to find
out if the data is
Check digit Other checks
correct
Database Approach
Types of Database

There are different types of database, few types are discuss here,
 Relational Database
 Embedded Database
 Graph Database
 Hypertext Database
Relational Database
 Data in a relational database is organized into tables. Each
table consists of rows and columns, where each row
represents a record, and each column represents a field or
attribute of that record.
 Relationships between tables are established using keys. A
primary key uniquely identifies each record in a table, and
foreign keys establish relationships between tables by
referencing the primary key of another table.
 Relational databases follow the principles of
normalization, which involves organizing data to minimize
redundancy and dependency. This ensures efficient storage..
Embedded Database

 The database engine runs within the same process


as the application. This eliminates the need for a
separate database server and simplifies deployment.
 Embedded databases are often designed for single-
user scenarios or small-scale multi-user scenarios
where concurrent access is limited..
 Embedded databases are designed to be
lightweight and fast, optimized for scenarios
where the application's data management needs are
relatively straightforward.
Graph Database

 Nodes are the entities in the graph, representing


objects or entities in the real world. Each node can
have properties that describe attributes or
characteristics of that entity.
 Edges (or relationships) define connections between
nodes. They represent how entities are related to each
other. Edges can also have properties, providing
additional information about the relationship.
 Nodes and edges can have key-value pairs called
properties, which store additional information about
the entities or relationships they represent.
Hypertext Database
 Hypertext Model: Data is organized as nodes, where each
node contains information and can be connected to other
nodes through hyperlinks. This model supports the creation
of a web of interconnected information.
 Rich Media Support: Hypertext databases can handle a
variety of media types, including text, images, audio, and
video. This makes them suitable for applications where
multimedia content is essential.
 Dynamic Content: Content in hypertext databases can be
dynamic and change over time. Users can add, modify, or
delete nodes and links, allowing the database to evolve as
information changes.
Advantages
Databases offer numerous advantages in managing and organizing data efficiently. Here are some key advantages of using a database:
 Data Security: Databases provide access control and security features to restrict unauthorized access to sensitive information. User roles
and permissions can be defined to control who can view, modify, or delete data.
 Backup and Recovery: Databases offer mechanisms for backup and recovery, ensuring that data can be protected against accidental loss
or system failures. Regular backups enable the restoration of data to a previous state.
 Data Redundancy Reduction: Through normalization techniques, databases help minimize data redundancy, reducing the likelihood of
inconsistencies and improving overall data quality.
 Data History Tracking: Some databases support the tracking of changes to data over time. This feature is valuable for auditing purposes
and maintaining a historical record of data modifications.
 Data Independence: Databases allow separation between the logical structure of the data (schema) and the physical storage. This data
independence makes it easier to modify the database schema without affecting the application.
 Centralized Data Management: Databases provide a centralized and structured way to store and manage data. This centralization
facilitates better control, organization, and management of data assets.
Disadvantages
Here are some common disadvantages of using databases:
 Complexity: Setting up and maintaining a database system can be complex, especially for large-scale databases. Database administrators (DBAs) need
to be well-versed in the chosen database management system (DBMS) and its intricacies.
 Cost: Implementing and maintaining a database system, including hardware, software, and personnel costs, can be expensive. Smaller organizations
may find it challenging to afford the necessary resources.
 Size and Performance: As databases grow in size, performance considerations become critical. Retrieving and processing large volumes of data can
lead to performance bottlenecks, requiring optimization strategies such as indexing.
 Security Concerns: Databases store sensitive information, making them attractive targets for unauthorized access and cyber attacks. Robust security
measures are essential to protect against data breaches.
 Single Point of Failure: In a traditional client-server architecture, the database server can become a single point of failure. Failures in the database
server can lead to downtime and data unavailability.
 Upgrades and Maintenance: Performing upgrades or maintenance tasks on a live database can be challenging, requiring careful planning to minimize
disruptions to ongoing operations.

You might also like