61bdbf4846c3f - Database Management System 2078

You might also like

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

Database management system (DBMS)

A database management system (DBMS) is system software for creating and


managing databases. The DBMS provides users and programmers with a systematic way to
create, retrieve, update and manage data.

A DBMS makes it possible for end users to create, read, update and delete data in a database.
The DBMS essentially serves as an interface between the database and end users or application
programs, ensuring that data is consistently organized and remains easily accessible.

The DBMS manages three important things: the data, the database engine that allows data to be
accessed, locked and modified -- and the database schema, which defines the database’s logical
structure. These three foundational elements help provide concurrency, security, data
integrity and uniform administration procedures. Typical database administration tasks supported
by the DBMS include change management, performance monitoring/tuning
and backup and recovery. Many database management systems are also responsible for
automated rollbacks, restarts and recovery as well as the logging and auditing of activity.

The DBMS is perhaps most useful for providing a centralized view of data that can be accessed
by multiple users, from multiple locations, in a controlled manner. A DBMS can limit what data
the end user sees, as well as how that end user can view the data, providing many views of a
single database schema. End users and software programs are free from having to understand
where the data is physically located or on what type of storage media it resides because the
DBMS handles all requests.

The DBMS can offer both logical and physical data independence. That means it can protect
users and applications from needing to know where data is stored or having to be concerned
about changes to the physical structure of data (storage and hardware). As long as programs use
the application programming interface (API) for the database that is provided by the DBMS,
developers won't have to modify programs just because changes have been made to the database.

With relational DBMSs (RDBMSs), this API is SQL, a standard programming language for
defining, protecting and accessing data in a RDBMS.
Popular types of DBMSes

Popular database models and their management systems include:

Relational database management system (RDMS) - adaptable to most use cases, but
RDBMS Tier-1 products can be quite expensive.

NoSQL DBMS - well-suited for loosely defined data structures that may evolve over time.

In-memory database management system (IMDBMS) - provides faster response times and
better performance.

Columnar database management system (CDBMS) - well-suited for data warehouses that
have a large number of similar data items.

Cloud-based data management system - the cloud service provider is responsible for providing
and maintaining the DBMS.

Advantages of a DBMS

Using a DBMS to store and manage data comes with advantages, but also overhead. One of the
biggest advantages of using a DBMS is that it lets end users and application programmers access
and use the same data while managing data integrity. Data is better protected and maintained
when it can be shared using a DBMS instead of creating new iterations of the same data stored in
new files for every new application. The DBMS provides a central store of data that can be
accessed by multiple users in a controlled manner.

Central storage and management of data within the DBMS provides:

 Data abstraction and independence

 Data security

 A locking mechanism for concurrent access

 An efficient handler to balance the needs of multiple applications using the same data

 The ability to swiftly recover from crashes and errors, including restartability and
recoverability

 Robust data integrity capabilities

 Logging and auditing of activity

 Simple access using a standard application programming interface (API)

 Uniform administration procedures for data

Another advantage of a DBMS is that it can be used to impose a logical, structured organization
on the data. A DBMS delivers economy of scale for processing large amounts of data because it
is optimized for such operations.

A DBMS can also provide many views of a single database schema. A view defines what data
the user sees and how that user sees the data. The DBMS provides a level of abstraction between
the conceptual schema that defines the logical structure of the database and the physical schema
that describes the files, indexes and other physical mechanisms used by the database. When a
DBMS is used, systems can be modified much more easily when business requirements change.
New categories of data can be added to the database without disrupting the existing system and
applications can be insulated from how data is structured and stored.
Of course, a DBMS must perform additional work to provide these advantages, thereby bringing
with it the overhead. A DBMS will use more memory and CPU than a simple file storage
system. And, of course, different types of DBMSes will require different types and levels of
system resources.

Types of Data base

1. Centralized Database

The information(data) is stored at a centralized location and the users from different locations
can access this data. This type of database contains application procedures that help the users to
access the data even from a remote location.

Various kinds of authentication procedures are applied for the verification and validation of end
users, likewise, a registration number is provided by the application procedures which keeps a
track and record of data usage. The local area office handles this thing.

2. Distributed Database

Just opposite of the centralized database concept, the distributed database has contributions from
the common database as well as the information captured by local computers also. The data is
not at one place and is distributed at various sites of an organization. These sites are connected to
each other with the help of communication links which helps them to access the distributed data
easily.

You can imagine a distributed database as a one in which various portions of a database are
stored in multiple different locations(physical) along with the application procedures which are
replicated and distributed among various points in a network.

3. Personal Database

Data is collected and stored on personal computers which is small and easily manageable. The
data is generally used by the same department of an organization and is accessed by a small
group of people.

4.End User Database

The end user is usually not concerned about the transaction or operations done at various levels
and is only aware of the product which may be a software or an application. Therefore, this is a
shared database which is specifically designed for the end user, just like different levels’
managers. Summary of whole information is collected in this database.

5. Commercial Database

These are the paid versions of the huge databases designed uniquely for the users who want to
access the information for help. These databases are subject specific, and one cannot afford to
maintain such a huge information. Access to such databases is provided through commercial
links.

6. Operational Database

Information related to operations of an enterprise is stored inside this database. Functional lines
like marketing, employee relations, customer service etc. require such kind of databases.

7. Relational Databases

These databases are categorized by a set of tables where data gets fit into a pre-defined category.
The table consists of rows and columns where the column has an entry for data for a specific
category and rows contains instance for that data defined according to the category. The
Structured Query Language (SQL) is the standard user and application program interface for a
relational database.

What is Indexing?

Indexing is a data structure technique which allows you to quickly retrieve records from a
database file. An Index is a small table having only two columns. The first column comprises a
copy of the primary or candidate key of a table. Its second column contains a set of pointers for
holding the address of the disk block where that specific key value stored.

Primary Index

Primary Index is an ordered file which is fixed length size with two fields. The first field is the
same a primary key and second, filed is pointed to that specific data block. In the primary Index,
there is always one to one relationship between the entries in the index table.

The primary Indexing in DBMS is also further divided into two types.

 Dense Index
 Sparse Index

Secondary Index
The secondary Index in DBMS can be generated by a field which has a unique value for each
record, and it should be a candidate key. It is also known as a non-clustering index.

This two-level database indexing technique is used to reduce the mapping size of the first level.
For the first level, a large range of numbers is selected because of this; the mapping size always
remains small.

Relationship in DBMS

Any association between two entity types is called a relationship. Entities take part in the
relationship. It is represented by a diamond shape.

For example, A teacher teaches students. Here, "teaches" is a relationship and this is the
relationship between a Teacher entity and a Student entity.

We have two entity types of 'Customer'(Customer_id, Name, City, Phone) and


'Account'(Account_no, Type, Balance). We store the data of 'Customer' in one table and his
accounts details in the 'Account' table. Now, to link these two tables we need to insert the
primary key 'Customer_id' of the 'Customer' table in the 'Account' table. This key acts as a
foreign key for the 'Account' table and refers to a column with the same name in the 'Customer'
table. This is how a relationship between two tables is established. There are three types of
relationships that can exist between two entities.

 One-to-One Relationship
 One-to-Many or Many-to-One Relationship
 Many-to-Many Relationship

One-to-One Relationship

Such a relationship exists when each record of one table is related to only one record of the other
table.

For example, If there are two entities ‘Person’ (Id, Name, Age, Address)and
‘Passport’(Passport_id, Passport_no). So, each person can have only one passport and each
passport belongs to only one person.

Such a relationship is not very common. However, such a relationship is used for security
purposes. In the above example, we can easily store the passport id in the ‘Person’ table only.
But, we make another table for the ‘Passport’ because Passport number may be sensitive data
and it should be hidden from certain users. So, by making a separate table we provide extra
security that only certain database users can see it.

One-to-Many or Many-to-One Relationship

Such a relationship exists when each record of one table can be related to one or more than one
record of the other table. This relationship is the most common relationship found. A one-to-
many relationship can also be said as a many-to-one relationship depending upon the way we
view it.

For example, If there are two entity type ‘Customer’ and ‘Account’ then each ‘Customer’ can
have more than one ‘Account’ but each ‘Account’ is held by only one ‘Customer’. In this
example, we can say that each Customer is associated with many Account. So, it is a one-to-
many relationship. But, if we see it the other way i.e many Account is associated with one
Customer then we can say that it is a many-to-one relationship.

Many-to-Many Relationship

Such a relationship exists when each record of the first table can be related to one or more than
one record of the second table and a single record of the second table can be related to one or
more than one record of the first table. A many-to-many relationship can be seen as a two one-to-
many relationship which is linked by a 'linking table' or 'associate table'. The linking table links
two tables by having fields which are the primary key of the other two tables. We can understand
this with the following example.

Example: If there are two entity type ‘Customer’ and ‘Product’ then each customer can buy
more than one product and a product can be bought by many different customers.

Queries

 Advanced Filter/Sort: The simplest kind of query, Advanced Filter/Sort allows you to
find and sort information from a single table in the database. This option is available from
any datasheet by clicking Advanced in the Sort & Filter group of the Home tab on the
Ribbon and choosing Advanced Filter/Sort.
 Select Query: A select query selects the data you want from one or more tables and
displays the data in the order in which you want it displayed. A select query can include
criteria that tell Access to filter records and display only some of them. Select queries that
display individual records are called detail queries; those that summarize records are
called Summary or Totals queries.
 Totals or Summary Query: These queries are a subset of select queries, but they allow
you to calculate a sum or some other aggregate (such as an average) rather than
displaying each individual record.
 Parameter Query: A query that asks you for one or more pieces of information before
displaying the datasheet.
 AutoLookup Query: A query that fills in information for you. (AutoLookup queries are
covered later in this tutorial.)
 Action Query: Action queries change your data based on some set of criteria. Action
queries can delete records, update data, append data from one or more tables to another
table, and make a new table.
 Crosstab Query: Most tables in Access, including ones generated by queries, have
records down the side and field names across the top. Crosstab queries produce tables
with the values from one field down the side and values from another field across the top
of the table. A crosstab query performs a calculation - it sums, averages, or counts data
that is categorized in two ways, as defined by the row and column labels.

Macro

A Macro is a tool that allows you to automate tasks and add functionality to your forms, reports,
and controls. Access Macros are built from a set of predefined actions, allowing you to automate
common tasks, and add functionality to controls or objects.

Macros can be used to make tasks less repetitive by representing a complicated sequence of
keystrokes, mouse movements, commands, or other types of input. In computer programming,
macros are a tool that allows a developer tore-use code.

Beside above, what is macro and module? Modules are very similar to Macros since they are
objects that add functionality to the database. However, while you create macros in Access by
selecting from a list of macro actions, VBA (Visual Basic for Applications) programming
language is used for writing modules.

Views in DBMS

 Datasheet View allows you to enter information into your database. It is in a table format
similar to Excel.
 Design View allows you to setup and edit the fields of your database.

You might also like