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

Basic Database Concepts

The database system is an excellent computer-based record-keeping


system. A collection of data, commonly called a database, contains
information about a particular enterprise. It maintains any information that
may be necessary to the decision-making process involved in the
management of that organization.

Purpose of Database
The intent of a database is that a collection of data should serve as many
applications as possible. Therefore, a database is often thought of as a
repository of information needed to run certain functions in a corporation or
organization.
Database Abstraction

A major purpose of a database is to provide the user with only as much information as is
required of them. This means that the system does not disclose all the details of the data,
rather it hides some details of how the data is stored and maintained. The complexity of
databases is hidden from them

Internal Level(Physical Level): The lowest level of abstraction, the internal level, is closest
to physical storage. It describes how the data is stored concretely on the storage medium.

Conceptual Level: This level of abstraction describes what data is concretely stored in the
database. It also describes the relationships that exist between the data

External Level(View Level): It is the level closest to users and is related to the way the data
is viewed by individual users.

Concept of Database

To store and manage data efficiently in the database let us understand some key terms:

1. Database Schema: It is a design of the database. Or we can say that it is a skeleton


of the database that is used to represent the structure, types of data will be stored in
the rows and columns, constraints, relationships between the tables.
2. Data Constraints: In a database, sometimes we put some restrictions on the table
that what type of data can be stored in one or more columns of the table, it can be
done by using constraints. Constraints are defined while we are creating a table.

3. Data dictionary or Metadata: Metadata is known as the data about the data. Or we
can say that the database schema along with different types of constraints on the
data is stored by DBMS in the dictionary is known as metadata.

4. Database instance: In a database, a database instance is used to define the


complete database environment and its components.

5. Query: In a database, a query is used to access data from the database. So users
have to write queries to retrieve or manipulate data from the database.

6. Data manipulation: In a database, we can easily manipulate data using the three
main operations that is Insertion, Deletion, and updation.

7. Data Engine: It is an underlying component that is used to create and manage


various database queries.

Advantages of Database

Let us consider some of the benefits provided by a database system and see how a
database system overcomes the above-mentioned problems:-

Reduces database data redundancy to a great extent

The database can control data inconsistency to a great extent

The database facilitates sharing of data.

Database enforce standards.


The database can ensure data security.

Integrity can be maintained through databases.

Therefore, for systems with better performance and efficiency, database systems are
preferred.

Disadvantages of Database

With the complex tasks to be performed by the database system, some things may come
up which can be termed as the disadvantages of using the database system. These are:-

Security may be compromised without good controls.

Integrity may be compromised without good controls.

Extra hardware may be required

Performance overhead may be significant.

The system is likely to be complex

Advantages of DBMS over File system

File System: A File Management system is a DBMS that allows access to single files or
tables at a time. In a File System, data is directly stored in a set of files. It contains flat files
that have no relation to other files (when only one table is stored in a single file, then this
file is known as a flat file).

DBMS: A Database Management System (DBMS) is application software that allows users
to efficiently define, create, maintain and share databases.

Advantages of DBMS over File system:

Data redundancy and inconsistency: Redundancy is the concept of repetition of data i.e.
each data may have more than a single copy. The file system cannot control the
redundancy of data as each user defines and maintains the needed files for a specific
application to run.

DBMS controls redundancy by maintaining a single repository of data that is defined once
and is accessed by many users.
Data sharing: The file system does not allow sharing of data or sharing is too complex.
Whereas in DBMS, data can be shared easily due to a centralized system

Data searching: For every search operation performed on the file system, a different
application program has to be written. While DBMS provides inbuilt searching operations.
The user only has to write a small query to retrieve data from the database.

Data integrity: file system does not provide data integrity

DBMS provides

Data independence refers characteristic of being able to modify the schema at one level of
the database system without altering the schema at the next higher level.

There are two types of data independence:

1. Logical Data Independence

Logical data independence refers characteristic of being able to change the conceptual
schema without having to change the external schema.

2. Physical Data Independence

Physical data independence can be defined as the capacity to change the internal schema
without having to change the conceptual schema.

Components of DBMS

1. Hardware

Here the hardware means the physical part of the DBMS. Here the hardware includes
output devices like a printer, monitor, etc., and storage devices like a hard disk.

2. Software

Software is the main component of the DBMS.

Software is defined as the collection of programs that are used to instruct the computer
about its work
3. Data
o The term data means the collection of any raw fact stored in the
database. Here the data are any type of raw material from which
meaningful information is generated.

o The database can store any form of data, such as structural data, non-
structural data, and logical data

4.Procedures

The procedure is a type of general instruction or guidelines for the use


of DBMS. This instruction includes how to set up the database, how to
install the database, how to log in and log out of the database

5.Database Access Language

Database Access Language is a simple language that allows users to


write commands to perform the desired operations on the data that is
stored in the database.

Data Definition Language(DDL):It is used to construct a database. DDL


implements database schema at the physical, logical, and external
levels.

2.Data Manipulation Language(DML): It is used to access a database.


The DML provides the statements to retrieve, modify, insert and delete
the data from the database.

6.People

The people who control and manage the databases and perform
different types of operations on the database in the DBMS.
The people includeincludee database administrator, software developer,
and End-user.

Three Parts that make up the Database System are:

Query Processor

Storage Manager

Disk Storage

1. Query Processor

The query processing is handled by the query processor, as the name


implies. It executes the user’s query, to put it simply.

2.Storage Manager:

An application called Storage Manager acts as a conduit between the


queries made and the data kept in the database. Another name for it is
Database Control System

3.Disk Storage

A DBMS can use various kinds of Data Structures as a part of physical


system implementation in the form of disk storage.

1.Entity: An entity is referred to as a real-world object. It can be a name,


place, object, class, etc. These are represented by a rectangle in an ER
Diagram.
2.Attributes: An attribute can be defined as the description of the entity.
These are represented by Eclipse in an ER Diagram. It can be Age, Roll
Number, or Marks for a Student.

3.Relationship: Relationships are used to define relations among


different entities. Diamonds and Rhombus are used to show
Relationships.

ATTRIBUTE AND DOMIAN

The main difference between attribute and domain is that an attribute


is a property that represents an entity while domain is a collection of
values that can be assigned to an attribute.

Relational Query Language: is used by the user to communicate with


the database user requests for the information from the database.

Types of Relational Query Language

There are two types of relational query language:

Procedural Query Language

Non-Procedural Language

Procedural Query Language


In Procedural Language, the user instructs the system to perform a
series of operations on the database to produce the desired results.
Users tell what data to be retrieved from the database and how to
retrieve it.

Non-Procedural Language

In Non Procedural Language user outlines the desired information


without telling the steps by step process for attaining the information.
It only gives a single Query on one or more tables to get .The user tells
what is to be retrieved from the database but does not tell how to
accomplish it.

Relational Calculus is a Non Procedural Language .

Relational Calculus exists in two forms:

Tuple Relational Calculus (TRC): Tuple Relational Calculus is a non


procedural query language , It is used for selecting the tuples that
satisfy the given condition or predicate . The result of the relation can
have one or more tuples (row).

Domain Relational Calculus (DRC): Domain Relational Calculus is a Non


Procedural Query Language , the records are filtered based on the
domains , DRC uses the list of attributes to be selected from relational
based on the condition.

Advantages of SQL :

SQL has many advantages which makes it popular and highly


demanded. It is a reliable and efficient language used for communicating
with the database. Some advantages of SQL are as follows:

Faster Query Processing –

Large amount of data is retrieved quickly and efficiently. Operations like


Insertion, deletion, manipulation of data is also done in almost no time.

No Coding Skills –

For data retrieval, large number of lines of code is not required. All basic
keywords such as SELECT, INSERT INTO, UPDATE, etc are used and also
the syntactical rules are not complex in SQL, which makes it a user-
friendly language.

Standardized Language –
Due to documentation and long establishment over years, it provides a
uniform platform worldwide to all its users.

Portable –

It can be used in programs in PCs, server, laptops independent of any


platform (Operating System, etc). Also, it can be embedded with other
applications as per need/requirement/use.

Interactive Language –

Easy to learn and understand, answers to complex queries can be


received in seconds.

Multiple data views –

Scalability: SQL databases can handle large volumes of data and can be
scaled up or down as per the requirements of the application.

Security: SQL databases have built-in security features that help protect
data from unauthorized access, such as user authentication, encryption,
and access control.

You might also like