Professional Documents
Culture Documents
BITWeek1_L2_ITE2422 V1
BITWeek1_L2_ITE2422 V1
Introduction
This is the second lesson you would be learning for the “Database Management
Systems” module. This lesson provides you with a broad coverage of the concepts of
the Database Systems and its architectures. Since you are already able to describe a
database and database management system (DBMS), now it is essential to know the
concepts in database systems and architectures before starting to design and develop
databases.
Learning outcomes
After completing this lesson, you will be able to describe and differentiate different
types of data models, data independence and types of DBMS architectures.
For businesses, data is a very important resource. In fact, data is the new ‘gold’.
With the huge amount of data getting created today, there are so many ways to
handle and use it.
Thus, it is important the know the role of the data models (e.g. network, relational
data models) and different architectures available to work with.
As database designers or admins, it is important to pick the right model and the
architecture appropriate for the requirements.
There are different types of data models. Most of the DBMS are built targeting a
particular data model and require users to adopt that model. In addition, different
models apply to different stages of the database design process.
• Network model
This is an extension of the Hierarchical model. In this model, data is organised
like a graph (Figure 2). This data model allows to map many-to-many data
relationships. That is, one child can connect to more than one parent node.
Seller
Sales
Order
This was the most widely used database model, before Relational Model was
introduced.
• Entity-relationship model
This model is used to visually represent the relationship among different data
objects. It is known as the Entity-relationship (E-R) diagram (Figure 3). Usually,
this is used to design a database and later to be converted to a relational
model when implementing the database. In this data model, relationships are
created by dividing objects of interest into entities and its characteristics into
attributes. Then the different entities are related using relationships.
You will be learning about E-R diagrams and how to map an E-R diagram to a
relational model later.
• Relational model
In relational data model, there will be a table (relation) with rows and
columns. Each relation is related to another relation (Figure 4). Every relation
has a schema, which describes the columns or fields. You will be learning about
schema in the next section.
Most of the databases today are based on the relational data model. As such,
we will be learning in this module about designing and creating relational
databases.
Do Activity 1.1, to understand the differences between various types of data models.
Activity 1.1
Identify the difference between the relational data model and the network data model.
In the next section you will learn about schema and instances.
In a relational DBMS, the conceptual schema describes all relations that are
stored in the database.
For instance, if you are asked to design a database for the university, there will be
relations that contain information about entities, such as students and courses, and
about relationships, such as students' enrollment in courses.
Decisions about the physical schema are based on an understanding of how the data is
typically accessed. The process of arriving at a good physical schema is called physical
database design.
Other than the conceptual and physical schema, there is an external schema (View).
The external schema design is guided by end user requirements. This is the view of
the relational database that end users see, and it involves a high level of abstraction.
For example, we might want to allow students to find out the number of students
enrolled to a course (enrollments).
This can be done by defining the following view:
• CourseInfo(cid:string, enrollment: integer)
Views can be created as needed. We did not include CourseInfo in the conceptual
schema as Courseinfo can be created from the relations in the conceptual schema.
Otherwise, we would be duplicating the same data.
This allows to separate the design maintenance from the core system maintenance.
Each of these levels can be changed internally without affecting other levels. It is
known as data independence.
However, a database schema does not contain any data or information. A database
instance is a state of operational database with data at any given time. It contains a
snapshot of the database. Thus, the database instances tend to change with time.
them. If we do some changes on table format, it should not change the data
residing on the disk.
Activity 1.4
In the next section, we will be learning about the differences between centralized
and distributed databases.
• Centralized database
All the DBMS functionality, application program execution, and user interface
processing were carried out on one machine (Figure 6). For example, a
database that is located, stored, and maintained in a desktop or server CPU, or
a mainframe computer. Other machines can access via a communications
network LAN or WAN.
Centralized database systems are used by some major banks to do all their
processing on a mainframe and airline reservation systems to avoid double
bookings.
Advantages:
• Reduced redundancy - good planning can allow duplicate or similar data
stored in different files for different applications to be combined and
stored only once.
• Improved availability - information may be made available to any
application program using the DBMS.
• Reduced inconsistency - if the same data is stored in more than one
place, then updating in one place and not everywhere can lead to
inconsistencies in the database.
• Enforced data security - authorization to use information can be
centralized.
Disadvantages:
• When the central site computer or database system goes down, then
everyone (users) is blocked from using the system until the system
comes back.
• Distributed database
A single logical database that is spread physically across computers in multiple
locations that are connected by a data communications link (Figure 7). In
distributed databases, most of the processing is done locally. It needs to
consider the local ownership of data (e.g. application of region/country
specific data protection laws) when sharing data. However, the users think that
they are working with a single corporate database.
For example, chain-stores/supermarkets have their individual databases and
may be updated monthly/annually with the central system.
Advantages:
• Distributed database architecture provides greater efficiency and better
performance.
• As data volumes and transaction rates increase, users can grow the
system incrementally.
• It causes less impact on ongoing operations when adding new locations.
• Distributed database system provides local autonomy.
Disadvantage:
• Recovery from failure is more complex in distributed database systems
than in centralized systems.
Do Activity 1.5 to identify the difference between two-tier architecture and three-tier
architecture.
Activity 1.5
Do a search and find the difference between the two-tier architecture and three-tier
architecture. Explain the difference.
Summary
Now we have completed learning the Lesson 2. In this lesson, we discussed various
concepts in database systems.
In the lesson 3, you will learn more details about components of an ER diagram.
Thus, you will be able to start database designing. Before you go to the next
lesson, complete the self-assessment Quiz 2 to check what you have learnt in
the Lesson 2.