Database Management
Database Management
Database Management
[email protected] 1|P age http://www.edutap.co.in
Contents
1 Database Management System....................................................................................................4
1.1 Important Database Management System ............................................................................4
1.1.1 Oracle Database ...........................................................................................................4
1.1.2 MySQL .........................................................................................................................4
1.1.3 Microsoft SQL Server ....................................................................................................4
1.2 Fundamentals of Database ...................................................................................................4
1.3 Types of Database................................................................................................................5
1.3.1 Network Database ........................................................................................................5
1.3.2 Hierarchical Database ...................................................................................................5
1.3.3 Relational Database ......................................................................................................5
1.4 Components of a Database...................................................................................................5
1.4.1 Tables ..........................................................................................................................5
1.4.2 Queries ........................................................................................................................5
1.4.3 Forms ..........................................................................................................................5
1.4.4 Reports ........................................................................................................................6
1.5 Database Management System (DBMS) ................................................................................6
1.6 Architecture of DBMS...........................................................................................................6
1.6.1 Internal Level ...............................................................................................................6
1.6.2 Conceptual Level ..........................................................................................................6
1.6.3 External Level...............................................................................................................7
2 Advantages & Disadvantages of DBMS..........................................................................................7
3 Applications of DBMS ..................................................................................................................8
4 Data Model.................................................................................................................................8
4.1 Relation...............................................................................................................................8
4.2 Domain ...............................................................................................................................8
4.3 Entities................................................................................................................................9
4.4 Attributes............................................................................................................................9
4.5 Tuples .................................................................................................................................9
4.6 Constraints..........................................................................................................................9
4.7 Normalization......................................................................................................................9
4.8 Data Integrity ......................................................................................................................9
4.9 Data Modeling Notations .....................................................................................................9
Some other operations can also be performed on database such as adding, updating, and
deleting data.
A database could be simple as a single text file with a list of names or it could be complex as a
large bunch of text files including some data.
1.4.2 Queries
✓ These are questions based on the data available in a database. A query consists of
specifications indicating which fields, records, and summaries a user wants to fetch from
a database. Queries allow you to extract data based on the criteria that you define.
1.4.3 Forms
✓ Although you can enter and modify data in datasheet view of tables but you neither
control the user’s action very well nor you can do much to facilitate the data -entry
process. To overcome this problem, forms are introduced. Like tables, forms can be
used to view and edit your data. However, forms are typically used to view the data in
an underlying table one record at a time. e.g. a user can create a data entry form that
✓ Reduction in Data Redundancy – The duplication of data refers to data redundancy. DBMS
cannot make separate copies of the same data. All the data is kept in a place and different
applications refer to data from a centrally controlled system.
✓ Better Interaction with Users – In DBMS, the availability of up-to-date information improves
the data to be accessed or responded to as per user requests.
✓ Improvement in Data Security – DBMS can allow the means of access to the database
through authorized channels. To ensure security, DBMS provides security tools, i.e.
username and password.
✓ Maintenance of Data Integrity – Data integrity ensures that the data of the database is
accurate. In DBMS, data is centralized and used by many users at a time, so it is essential to
enforce integrity controls.
✓ Ease of Application Development – The application programmer needs to develop the
application programs according to the user’s needs. The other issues like concurrent access,
security, data integrity, etc. are handled by the database itself. This makes application
development an easier task.
✓ Backup and Recovery – The DBMS provides a backup and recovery subsystem that is
responsible for recovering data from hardware and software failures.
As there are many advantages, DBMS also has some minor disadvantages. These disadvantages
are listed here:
✓ Cost of Hardware and Software – A processor with high speed of data processing and
memory of large size is required to run the DBMS software. It means that you have to
upgrade the hardware used for file-based system. Similarly, database software is also very
costly.
✓ Complexity – The provision of the functionality that is expected from a good DBMS makes
the DBMS an extremely complex piece of software. Failure to understand the system can
lead to bad design decisions, which can have serious consequences for an organization.
✓ Cost of Staff Training – Mostly DBMS are often complex systems so the training for user to
use the database is required. The organization has to pay a lot of amount for the training of
staff to run the DBMS.
3 Applications of DBMS
Some applications of DBMS are as follows
✓ Banking – For customer information, accounts, loans and other banking transactions.
✓ Reservation – For reservation and schedule information.
✓ Universities – For student information, course registration, grades, etc.
✓ Credit Card Transaction – For purchase of credit cards and generation of monthly
statements.
✓ Telecommunication – For keeping records of calls made, generating monthly bill, etc.
✓ Finance – For storing information about holdings, sales and purchase of financial statements.
✓ Sales – For customer, product and purchase information.
4 Data Model
A data model is a conceptual representation of the structure of data, describing how data is
organized, stored, and manipulated within a system or application. It serves as a blueprint for
designing databases, software applications, and information systems. Data models help ensure
that data is accurately and efficiently managed, retrieved, and analyzed.
4.1 Relation
✓ It is a table with columns and rows which represent is the data items and relationships
among them. Relation have three important properties a name, cardinality and a degree.
These properties help us to further define and describe relations.
• Name – The first property of a relation is its name, which is represented by the tide or
the entity identifier.
• Cardinality – The second property of a relation is its cardinality, which refers to the
number of tuples (rows) in a relation.
• Degree – The third property of a relation is its degree, which refers to the number of
attributes (columns) in each tuple.
4.2 Domain
✓ It is a collection of all possible values from which the values for a given column or an
attribute is drawn. A domain is said to be atomic if elements are considered to be
indivisible units.
[email protected] 8|P age http://www.edutap.co.in
4.3 Entities
✓ Entities represent real-world objects, concepts, or events that are relevant to the system
being modeled. Each entity typically corresponds to a table in a relational database and is
defined by its attributes.
4.4 Attributes
✓ Attributes are the properties or characteristics of entities. Each attribute of a table has a
distinct name.
4.5 Tuples
✓ The rows in a relation are also known as tuples. Each row or tuple has a set of permitted
values for each attribute.
4.6 Constraints
✓ Constraints define rules or conditions that must be satisfied by the data in a database to
maintain integrity and consistency. Common constraints include primary key constraints,
foreign key constraints, uniqueness constraints, and check constraints.
4.7 Normalization
✓ Normalization is the process of organizing data in a database to minimize redundancy and
dependency, thereby improving data integrity and reducing anomalies. It involves breaking
down large tables into smaller, related tables and eliminating repeating groups of
attributes.
4.10 Keys
✓ Key is one of the important concepts of database. A key is defined as the column or set of
columns in a table that is used to identify either row of data in a table or establish
relationship with another table.
✓ It is also referred as super key, arranging the records either in ascending or descending
order.
✓ If a table has id, name, and address as the column names then each one is known as the
key for that table. The keys are also used to uniquely identify each record in the database
table.
4.10.1 Types of Keys
✓ There are mainly four types of keys which are described below:
4.10.1.1 Primary Key
✓ It is a set of one or more attributes that can uniquely identify tuples within the
relation. It identifies unique records within a table. The primary key should be chosen
[email protected] 9|P age http://www.edutap.co.in
in such a way, i.e. its value must not be changed. There should not be duplicated in the
record of primary key. Primary key can be atomic or composite. The field chosen as
primary key, cannot accept null value.
4.10.1.2 Candidate Key
✓ The set of all attributes which can uniquely identify each tuple of a relation, are known
as candidate keys. Each table may have one or more candidate keys and one of them
will become the primary key. The candidate key of a relation is always a minimal key.
4.10.1.3 Alternate Key
✓ From the set of candidate keys after selecting one of the keys as primary key, all other
remaining keys are known as alternate keys.
4.10.1.4 Foreign Key
✓ It is a non-key attribute whose value is derived from the primary key of the same or
some another table. The relationship between two tables is established with the help
of foreign key. A table may have multiple foreign keys and each foreign key can have a
different referenced table. Foreign keys play an essential role in database design, when
tables are broken apart then foreign keys make it possible for them to be
reconstructed.
Let’s Discuss Relational Database Management System (RDBMS) and Entity - Relationship Model
(E-R Model)in detail.
5 Relational Database
In a relational database, data is stored in different tables with relationships to each other.
These tables communicate and share information, which facilitates data search ability,
organisation and reporting. In the case of relational database, a Relational Database
Management System (RDBMS) performs these tasks.
6.2 Attributes
✓ It describes the characteristics or properties of entity. In tables, attributes are represented
by columns. Attributes are drawn in elliptical shapes (ovals), e.g. ITEM entity may contain
code and price.
6.4 Relationship
✓ It is an association among several entities. A relationship describes how two or more
entities are related to each other. It is represented by diamond shape.
✓ Relationship can be divided into three parts
• One to one
• Many to one
• One to many
[email protected] 11 | P a g e http://www.edutap.co.in