Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

DBMS-UNIT1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

UNIT 1

What is Data?

Data is a collection of a distinct small unit of information. It can be used in a variety of forms like text, numbers, media,
bytes, etc. it can be stored in pieces of paper or electronic memory, etc.

Word 'Data' is originated from the word 'datum' that means 'single piece of information.' It is plural of the word datum.

In computing, Data is information that can be translated into a form for efficient movement and processing. Data is
interchangeable.

What is a Database?

A database is an organized collection of data, so that it can be easily accessed and managed. You can organize data into
tables, rows, columns, and index it to make it easier to find relevant information.

Database handlers create a database in such a way that only one set of software program provides access of data to all
the users.

The main purpose of the database is to operate a large amount of information by storing, retrieving, and managing data.

There are many dynamic websites on the World Wide Web nowadays which are handled through databases. For example,
a model that checks the availability of rooms in a hotel. It is an example of a dynamic website that uses a database.

There are many databases available like MySQL, Sybase, Oracle, MongoDB, Informix, PostgreSQL, SQL Server, etc.

Modern databases are managed by the database management system (DBMS).

SQL or Structured Query Language is used to operate on the data stored in a database. SQL depends on relational algebra
and tuple relational calculus.

A cylindrical structure is used to display the image of a database.

What is a Database System?

Database System or DBMS is the software that entails every process of gathering, collecting, storing,
monitoring, and sorting similar information or data in the same criteria as a software program.

This system gathers logically similar data through the various Database Management System's software.
A database system requires an administrator known as the Database Administrator saddled with the
responsibility of managing every activity of a database system. They include access regulation, backup actions,
database security, and data recovery.

Data could be in any format in a database system. It can either be unstructured or structured, depending on the
arrangement of the data.

When complex data such as the 3V's (volume, velocity, and variety) are combined, it might not be easy to
process them because they are a group of structured and unstructured data.

However, due to the technological advancement of databases, you can easily process and analyze big data.

A standard database can keep and retrieve or revive data when lost. A relational model is a database with the
specific function of processing and storing arranged or structured data.

Structured Query Language (SQL) is majorly used to access a series of data from database tables. DBMS and
databases are key when analyzing and processing complex data. DBMS registered trademarks are Microsoft
Access, Sybase, Oracle, dBase, and MY SQL.

Elements of a Database

Database elements are the group of objects or entities that makes up a database. They include tables, indexes,
data elements, database schemas, fields, columns, records, rows, keys, relationships, and data types.

1. Table

The table is the simplest and primary unit of organization and storage of data in a database. You need this
database element to modify and check for stored data.

When there is more than one table containing a database, they are always connected by what we call a
relationship.
The relationship between the related tables makes it easy to link them together and figure out what they have
in common. A table is a composition of related data items, usually with a unique identity.

A table is usually in rows (horizontal) and columns (vertical), all arranged physically in a grid model. Every row
and column intersect at a point called a cell. Each cell contains data of unique identity as every data can only be
accessed by their names.

The database table consists of four major types.

 Subset Tables comprise subsets of data obtained from a database table.

 Data Tables are the primary storage of data in a database.

 Join Tables help summon a link or relationship between tables, majorly two that might seem related.

 Validation Tables, also known as code tables, help to validate data entries from other tables. Tables make
data easily accessible to users. However, some sets of delimits and constraints control the type of data
allowed on the table.

2. Columns

A column, commonly called a field, is a particular type of data on a table. It is believed that a column only exists
in a table, while an attribute exists in an entity.

On the contrary, attributes can be columns, and entities can form a table against the previous immediate claim
when a business model transforms into a database model.

A column is the smallest storage element in any database and depicts related records of a table. A unique data
type is given to every column. The data entered into the table will be dependent on the table's data types.
3. Database Schema

A database schema represents groups of related objects in a database. Some objects might be related to one
another in a schema. This database element gives access to just a single owner who has exclusive access to
modify, reclassify and manipulate the makeup of objects found within a schema. It is always linked to a particular
or unique user account in a database for specific purposes.

There are three models related to a schema.

The Conceptual Model

The conceptual model is otherwise known as the logical model. It is referred to as the fundamental model in a
database.

A conceptual model is characterized by organizational and physical structures usually used to understand
database structures like views, indexes, and constraints.

The Internal Model

The internal model is also known as the physical model. Just as its name implies, it majors on the physical
storage in a database. Additionally, the internal model regulates access to data in a database.
Finally, it helps distinguish between the hardware's physical specifications and the OS (Operating System)
initiated by the database model.

The External Model

The external model is commonly known as the application interface. With the application interface, users might
be able to access schema in many ways, like the data input. It makes establishing a relationship between the
database model and user application feasible.

4. Rows

A row is the collection of vertical records in a database. The population of rows in a table is not constant. A
collection of data in a row is also known as a tuple.

5. Data Types

Data types control the type of data you can enter in a column. The following are the available data types:

 Numeric data types can only be used to store numeric values, that is, numbers.

 Alphanumeric data types consist of alphabetical characters, numerical values, and a combination of both.
However, the alphanumeric data type only considers stored numeric data values as alphabetical characters,
not numbers.

 Date and Time data types enable the storage of data and time. This data type varies with the Relational
Database Management System (RDBMS) employed.
6. Keys

A key is an entity of a database that is used to identify or point out desired data in a table. This database
element is usually most associated with just a single column and could be more than one column at times.

Hence, there are two main types of keys:

Primary Keys

Primary Keys combine single or multiple-column values obtained from a table.

Moreover, a primary key will not allow duplicate entries even if the table does not have the fundamental identity
of table values like SSN, school, and examination registration numbers that are unique.

These table values are never the same and can be set as a primary key in a database.

Foreign Keys

Foreign keys always have primary keys or keys as references in a different table. Primary keys are considered
the mother table, while the foreign key is the child table. It helps to create a relationship between two tables.

7. Relationship

There are various tables in a database that are related. A relational database is a modern database that creates
links between tables using primary and foreign keys.
Entering data in a table and creating links between tables helps to reduce data redundancy in the relational
database. There are three types of relationships in a table under the database elements.

 One-to-One Relationship relates one record with another in a different table.

 One-to-Many Relationship links one table record to more than one record from another table.

 Many-to-Many Relationships are more comprehensive than the first two. Here, many records are linked to
records from a different table; consequently, you can connect more records in the second table to many
more in the top table.

3 Tier Schema Architecture in DBMS

In DBMS, the 3-tier architecture is a client-server architecture that separates the user interface, application processing,
and data management into three distinct tiers or layers. The 3-tier architecture is widely used in modern web
applications and enterprise systems because it offers scalability, flexibility, and security. Here is a brief description of
each tier in the 3-tier architecture:

Presentation Tier: The presentation tier is the user interface or client layer of the application. It is responsible for
presenting data to the user and receiving input from the user. This tier can be a web browser, mobile app, or desktop
application.

Application Tier: The application tier is the middle layer of the 3-tier architecture. It is responsible for processing and
managing the business logic of the application. This tier communicates with the presentation tier to receive user input
and communicates with the data management tier to retrieve or store data. This tier may include application servers,
web servers, or APIs.

Data Management Tier: The data management tier is the bottom layer of the 3-tier architecture. It is responsible for
managing and storing data. This tier can include databases, data warehouses, or data lakes. The data management tier
communicates with the application tier to receive or store data.

Advantages of Database Management System

The advantages of database management systems are:

Data Security: The more accessible and usable the database, the more it is prone to security issues. As the number of
users increases, the data transferring or data sharing rate also increases thus increasing the risk of data security. It is
widely used in the corporate world where companies invest large amounts of money, time, and effort to ensure data is
secure and used properly. A Database Management System (DBMS) provides a better platform for data privacy and
security policies thus, helping companies to improve Data Security.

Data integration: Due to the Database Management System we have access to well-managed and synchronized forms of
data thus it makes data handling very easy and gives an integrated view of how a particular organization is working and
also helps to keep track of how one segment of the company affects another segment.

Data abstraction: The major purpose of a database system is to provide users with an abstract view of the data. Since
many complex algorithms are used by the developers to increase the efficiency of databases that are being hidden by
the users through various data abstraction levels to allow users to easily interact with the system.

Reduction in data Redundancy: When working with a structured database, DBMS provides the feature to prevent the
input of duplicate items in the database. for e.g. – If there are two same students in different rows, then one of the
duplicate data will be deleted.

Data sharing: A DBMS provides a platform for sharing data across multiple applications and users, which can increase
productivity and collaboration.

Data consistency and accuracy: DBMS ensures that data is consistent and accurate by enforcing data integrity
constraints and preventing data duplication. This helps to eliminate data discrepancies and errors that can occur when
data is stored and managed manually.

Data organization: A DBMS provides a systematic approach to organizing data in a structured way, which makes it easier
to retrieve and manage data efficiently.

Efficient data access and retrieval: DBMS allows for efficient data access and retrieval by providing indexing and query
optimization techniques that speed up data retrieval. This reduces the time required to process large volumes of data
and increases the overall performance of the system.

Concurrency and maintained Atomicity: That means, if some operation is performed on one particular table of the
database, then the change must be reflected for the entire database. The DBMS allows concurrent access to multiple
users by using the synchronization technique.

Scalability and flexibility: DBMS is highly scalable and can easily accommodate changes in data volumes and user
requirements. DBMS can easily handle large volumes of data, and can scale up or down depending on the needs of the
organization. It provides flexibility in data storage, retrieval, and manipulation, allowing users to easily modify the
structure and content of the database as needed.

Data Independence

Data independence means a change of data at one level should not affect another level. Two types of data
independence are present in this architecture:

Physical Data Independence: Any change in the physical location of tables and indexes should not affect the conceptual
level or external view of data. This data independence is easy to achieve and implemented by most of the DBMS.

Conceptual Data Independence: The data at conceptual level schema and external level schema must be independent.
This means a change in conceptual schema should not affect external schema. e.g.; Adding or deleting attributes of a
table should not affect the user’s view of the table. But this type of independence is difficult to achieve as compared to
physical data independence because the changes in conceptual schema are reflected in the user’s view.

Database Users:
A Database User is defined as a person who interacts with data daily, updating, reading, and modifying the given data.
Database users can access and retrieve data from the database through the Database Management System (DBMS)
applications and interfaces.

Types of Database Users

Database users are categorized based on their interaction with the database. There are seven types of database users in
DBMS. Below mentioned are the types of database users:

1. Database Administrator (DBA)

A Database Administrator (DBA) is a person/team who defines the schema and also controls the 3 levels of the database.
The DBA will then create a new account ID and password for the user if he/she needs to access the database. DBA is also
responsible for providing security to the database and he allows only authorized users to access/modify the database.
DBA is responsible for problems such as security breaches and poor system response time.

DBA also monitors the recovery and backup and provides technical support.

The DBA has a DBA account in the DBMS which is called a system or superuser account.

DBA repairs damage caused due to hardware and/or software failures.

DBA is the one having privileges to perform DCL (Data Control Language) operations such as GRANT and REVOKE, to
allow/restrict a particular user from accessing the database.

2. Naive / Parametric End Users

Parametric End Users are the unsophisticated who don’t have any DBMS knowledge but they frequently use the
database applications in their daily life to get the desired results. For example, Railway’s ticket booking users are naive
users. Clerks in any bank is a naive user because they don’t have any DBMS knowledge but they still use the database
and perform their given task.

3. A System Analyst

A system Analyst is a user who analyzes the requirements of parametric end users. They check whether all the
requirements of end users are satisfied.

4. Sophisticated Users

Sophisticated users can be engineers, scientists, business analyst, who are familiar with the database. They can develop
their own database applications according to their requirement. They don’t write the program code but they interact
the database by writing SQL queries directly through the query processor.

5. Database Designers

Data Base Designers are the users who design the structure of database which includes tables, indexes, views, triggers,
stored procedures and constraints which are usually enforced before the database is created or populated with data.
He/she controls what data must be stored and how the data items to be related. It is the responsibility of Database
Designers to understand the requirements of different user groups and then create a design which satisfies the need of
all the user groups.

6. Application Programmers

Application Programmers also referred as System Analysts or simply Software Engineers, are the back-end programmers
who writes the code for the application programs. They are the computer professionals. These programs could be
written in Programming languages such as Visual Basic, Developer, C, FORTRAN, COBOL etc. Application programmers
design, debug, test, and maintain set of programs called “canned transactions” for the Naive (parametric) users in order
to interact with database.

7. Casual Users / Temporary Users

Casual Users are the users who occasionally use/access the database but each time when they access the database they
require the new information, for example, Middle or higher level manager.

8. Specialized users

Specialized users are sophisticated users who write specialized database application that does not fit into the traditional
data-processing framework. Among these applications are computer aided-design systems, knowledge-base and expert
systems etc.

Different types of DBAs

There are several types of database administrators, each with specific duties and responsibilities. The most common
types of DBAs include system administrators, database architects, database analysts, data modelers, application DBAs,
task-oriented DBAs, performance analysts, data warehouse administrators, and cloud DBAs.

 System administrators are responsible for the overall management and upkeep of a computer system, including
installing and configuring software, applying security patches, and monitoring system performance.
 Database architects design databases to meet the specific needs of an organization.
 Database analysts collect and analyze data to help improve database performance. They may also be responsible for
developing reports and providing recommendations to database administrators.
 Data modelers create and maintain data models that depict the relationship between data elements. Data modeling
is a critical component of effective database design.
 Application DBAs are responsible for administrating databases that support applications. Specific tasks include
installing and configuring applications, ensuring that data is synchronized correctly between databases, and
troubleshooting application-related issues.
 Task-oriented DBAs focus on a particular area of database administration, such as backup and recovery, security, or
performance tuning. They typically have in-depth knowledge of a specific database management system (DBMS).
 Performance analysts monitor database performance and identify areas where improvement is needed. They may
also be responsible for creating performance reports and providing recommendations to database administrators.
 Data warehouse administrators manage databases that store data for business intelligence or decision-support
applications. They are responsible for extracting data correctly, transforming the data, and loading it into the data
warehouse.
 Cloud DBAs are responsible for administrating databases hosted in a cloud computing environment, provisioning and
managing database instances, setting up replication and high availability, and monitoring database performance.

You might also like