0% found this document useful (0 votes)
73 views33 pages

Introduction to Database Concepts

The document introduces the concept of databases, defining key terms such as database, data, mini-world, and Database Management System (DBMS). It outlines the properties and functionalities of databases, including data manipulation, sharing, and the importance of metadata. Additionally, it discusses the advantages of using a database approach, historical developments in database technology, and considerations for when a DBMS may not be necessary.

Uploaded by

anisha.cotta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views33 pages

Introduction to Database Concepts

The document introduces the concept of databases, defining key terms such as database, data, mini-world, and Database Management System (DBMS). It outlines the properties and functionalities of databases, including data manipulation, sharing, and the importance of metadata. Additionally, it discusses the advantages of using a database approach, historical developments in database technology, and considerations for when a DBMS may not be necessary.

Uploaded by

anisha.cotta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Chapter 1

Introduction and Conceptual Modeling

Prof. Anisha Cotta


ECS Dept.
Don Bosco College of Engg.
Copyright © 2004 Pearson Education, Inc.
Basic Definitions
 A database is a collection of related data.
 Data is facts that can be recorded and that have implicit meaning. For
example, consider the names, telephone numbers, and addresses
 Database: A collection of related data.
 Data: Known facts that can be recorded and have an implicit meaning.
 Mini-world: Some part of the real world about which data is stored in a
database. For example, student grades and transcripts at a university.
 Database Management System (DBMS): A software package/
system to facilitate the creation and maintenance of a computerized
database. The DBMS is a general-purpose software system that facilitates the
processes of defining, constructing, manipulating, and sharing databases
among various users and applications.
 Database System: The DBMS software together with the data itself.
Slide 1-2
Sometimes, the applications are also included.
Properties of Databases
 Represent some aspect of the real world
 Data is logically coherent and has some meaning
 Designed, built and populated for a specific reason
 Built with a target group of users and particular applications
in mind

Slide 1-3
Typical DBMS Functionality
 Define a database : in terms of data types, structures and constraints.
The database definition or descriptive information is also stored by
the DBMS in the form of a database catalog or dictionary; it is called
meta-data.
 Constructing the database is the process of storing the data on
some storage medium that is controlled by the DBMS.
 Manipulating the database : includes functions such as querying
the database to retrieve specific data, updating the database to reflect
changes in the miniworld, and generating reports from the data.
 Sharing a database allows multiple users and programs to access the
database simultaneously.

Slide 1-4
Typical DBMS Functionality
 An application program accesses the database by sending queries or requests
for data to the DBMS.
 Query typically causes some data to be retrieved.
 Transaction may cause some data to be read and some data to be written into the
database.

Other important functions:


 Protecting the database and maintaining it over a long period of time.
Protection includes system protection against hardware or software malfunction (or
crashes) and security protection against unauthorized or malicious access. A typical
large database may have a life cycle of many years, so the DBMS must be able to
maintain the database system by allowing the system to evolve as requirements
change over time.
 “Active” processing to take internal actions on data
Slide 1-5 Presentation and Visualization of data
FIGURE 1.1
A simplified
database
system
environment.

Slide 1-6
Example of a Database
(with a Conceptual Data Model)

 Mini-world for the example: Part of a


UNIVERSITY environment.
 Some mini-world entities:
 STUDENTs
 COURSEs
 SECTIONs (of COURSEs)
 (academic) DEPARTMENTs
 INSTRUCTORs
Note: The above could be expressed in the ENTITY-
RELATIONSHIP data model.

Slide 1-7
Example of a Database
(with a Conceptual Data Model)
 Some mini-world relationships:
 SECTIONs are of specific COURSEs
 STUDENTs take SECTIONs
 COURSEs have prerequisite COURSEs
 INSTRUCTORs teach SECTIONs
 COURSEs are offered by DEPARTMENTs
 STUDENTs major in DEPARTMENTs

Note: The above could be expressed in the ENTITY-


RELATIONSHIP data model.

Slide 1-8
FIGURE 1.2a
A database that stores student and course information .

Slide 1-9
FIGURE 1.2b
A database that stores student and course information .

Slide 1-10
FIGURE 1.2c
A database that stores student and course information.

Slide 1-11
FIGURE 1.3
Internal storage format for a STUDENT record .

Slide 1-12
FIGURE 1.4
Two views derived from the database in Figure 1.2 (a) The
STUDENT TRANSCRIPT view. (b) The COURSE PREREQUISITES
view.

Slide 1-13
Example of a Database
(with a Conceptual Data Model)
 Database manipulation involves querying and updating. Examples of queries are
as follows:
■ Retrieve the transcript—a list of all courses and grades—of ‘Smith’
■ List the names of students who took the section of the ‘Database’ course offered
in fall 2008 and their grades in that section
■ List the prerequisites of the ‘Database’ course

 Examples of updates include the following:


■ Change the class of ‘Smith’ to sophomore
■ Create a new section for the ‘Database’ course for this semester
■ Enter a grade of ‘A’ for ‘Smith’ in the ‘Database’ section of last semester
These informal queries and updates must be specified precisely in the query
language of the DBMS before they can be processed.
Slide 1-14
 Design of a new application for an existing database or design of a brand new
database starts off with a phase called requirements specification and
analysis.
 These requirements are documented in detail and transformed into
conceptual design that can be represented and manipulated using some
computerized tools so that it can be easily maintained, modified, and
transformed into a database implementation.
 The design is then translated to a logical design that can be expressed in a
data model implemented in a commercial DBMS.
 The final stage is physical design, during which further specifications are
provided for storing and accessing the database. The database design is
implemented, populated with actual data, and continuously maintained to
reflect the state of the miniworld.

Slide 1-15
Main Characteristics of the Database
Approach
1) Self-describing nature of a database system:
 A fundamental characteristic of the database approach is that the database
system contains not only the database itself but also a complete definition or
description of the database structure and constraints. This definition is
stored in the DBMS catalog, which contains information such as the
structure of each file, the type and storage format of each data item, and
various constraints on the data.
 The information stored in the catalog is called meta-data, and it describes
the structure of the primary database A DBMS catalog stores the
description of the database. The description is called meta-data). This
allows the DBMS software to work with different databases.

Slide 1-16
Main Characteristics of the Database
Approach

Slide 1-17
Main Characteristics of the Database
Approach
Insulation between programs and Data Abstraction:
 In traditional file processing, the structure of data files is embedded in the application
programs, so any changes to the structure of a file may require changing all programs
that access that file.
 By contrast, DBMS access programs do not require such changes in most cases. The
structure of data files is stored in the DBMS catalog separately from the access
programs.
 This property is called program-data independence. Allows changing data storage
structures and operations without having to change the DBMS access programs.

Slide 1-18
Main Characteristics of the Database
Approach
Insulation between programs and Data Abstraction:
 In traditional file processing, if we want to add another piece of data to each
STUDENT record, say the Birth_date, such a program will no longer work
and must be changed.
 By contrast, in a DBMS environment, we only need to change the
description of STUDENT records in the catalog to reflect the inclusion of
the new data item Birth_date; no programs are changed. The next time a
DBMS program refers to the catalog, the new structure of STUDENT
records will be accessed and used.

Slide 1-19
Main Characteristics of the Database
Approach
 In some types of database systems, such as object-oriented and object-relational systems,
users can define operations on data as part of the database definitions.
 An operation (also called a function or method) is specified in two parts. The interface (or
signature) of an operation includes the operation name and the data types of its arguments
(or parameters).
 The implementation (or method) of the operation is specified separately and can be
changed without affecting the interface. User application programs can operate on the data
by invoking these operations through their names and arguments, regardless of how the
operations are implemented. This may be termed program-operation independence
 The characteristic that allows program-data independence and program-operation
independence is called data abstraction. A DBMS provides users with a conceptual
representation of data that does not include many of the details of how the data is stored or
how the operations are implemented. Informally, a data model is a type of data abstraction
that is used to provide this conceptual representation.

Slide 1-20
Main Characteristics of the Database
Approach
Support of Multiple Views of the Data
 A database typically has many types of users, each of whom may require a different
perspective or view of the database.
 A view may be a subset of the database or it may contain virtual data that is derived from
the database files but is not explicitly stored.
 Some users may not need to be aware of whether the data they refer to is stored or
derived. A multiuser DBMS whose users have a variety of distinct applications must
provide facilities for defining multiple views.
 For example, one user of the database of Figure 1.2 may be interested only in accessing
and printing the transcript of each student; the view for this user is shown in Figure 1.5(a).
A second user, who is interested only in checking that students have taken all the
prerequisites of each course for which the student registers, may require the view shown in
Figure 1.5(b)

Slide 1-21
Main Characteristics of the Database
Approach
Support of Multiple Views of the Data
 For example, one user of the database may be interested only in accessing and printing the
transcript of each student; the view for this user is shown below
 A second user, who is interested only in checking that students have taken all the
prerequisites of each course for which the student registers, may require the view shown in

Slide 1-22
Main Characteristics of the Database
Approach
Sharing of Data and Multiuser Transaction Processing
 The DBMS must include concurrency control software to ensure that several users trying
to update the same data do so in a controlled manner so that the result of the updates is
correct.
 For example, when several reservation agents try to assign a seat on an airline flight, the
DBMS should ensure that each seat can be accessed by only one agent at a time for
assignment to a passenger.
 These types of applications are generally called online transaction processing (OLTP)
applications. A fundamental role of multiuser DBMS software is to ensure that concurrent
transactions operate correctly and efficiently

Slide 1-23
Main Characteristics of the Database
Approach
Sharing of Data and Multiuser Transaction Processing
 A transaction is an executing program or process that includes one or more database
accesses, such as reading or updating of database records.
 Each transaction is supposed to execute a logically correct database access if executed in its
entirety without interference from other transactions.
 The DBMS must enforce several transaction properties. The isolation property ensures
that each transaction appears to execute in isolation from other transactions, even though
hundreds of transactions may be executing concurrently.
 The atomicity property ensures that either all the database operations in a transaction are
executed or none are

Slide 1-24
Advantages of Using the Database
Approach
 Controlling redundancy in data storage and in development and
maintenence efforts.
 Sharing of data among multiple users.
 Restricting unauthorized access to data.
 Providing Storage Structures for efficient Query Processing

Slide 1-25
Advantages of Using the Database
Approach
 Providing backup and recovery services.
 Providing multiple interfaces to different classes of users.
 Representing complex relationships among data.
 Enforcing integrity constraints on the database.
 Drawing inferences and taking actions using rules.

Slide 1-26
Additional Implications of Using the
Database Approach

 Potential for enforcing standards: this is very crucial


for the success of database applications in large
organizations Standards refer to data item names,
display formats, screens, report structures, meta-
data (description of data) etc.
 Reduced application development time: incremental
time to add each new application is reduced.

Slide 1-27
Additional Implications of Using the
Database Approach

 Flexibility to change data structures: database


structure may evolve as new requirements are
defined.
 Availability of up-to-date information – very
important for on-line transaction systems such as
airline, hotel, car reservations.
 Economies of scale: by consolidating data and
applications across departments wasteful overlap of
resources and personnel can be avoided.
Slide 1-28
Historical Development of Database
Technology
 Early Database Applications: The Hierarchical
and Network Models were introduced in mid
1960’s and dominated during the seventies. A bulk
of the worldwide database processing still occurs
using these models.
 Relational Model based Systems: The model
that was originally introduced in 1970 was heavily
researched and experimented with in IBM and the
universities. Relational DBMS Products emerged in
the 1980’s.
Slide 1-29
Historical Development of Database
Technology

 Object-oriented applications: OODBMSs were


introduced in late 1980’s and early 1990’s to cater to the
need of complex data processing in CAD and other
applications. Their use has not taken off much.
 Data on the Web and E-commerce Applications:
Web contains data in HTML (Hypertext markup
language) with links among pages. This has given rise to a
new set of applications and E-commerce is using new
standards like XML (eXtended Markup Language).

Slide 1-30
Extending Database Capabilities
 New functionality is being added to DBMSs
in the following areas:
 Scientific Applications
 Image Storage and Management
 Audio and Video data management
 Data Mining
 Spatial data management
 Time Series and Historical Data Management
The above gives rise to new research and development in incorporating new data
types, complex data structures, new operations and storage and indexing schemes
in database systems.

Slide 1-31
When not to use a DBMS

 Main inhibitors (costs) of using a DBMS:


 High initial investment and possible need for additional hardware.
 Overhead for providing generality, security, concurrency control,
recovery, and integrity functions.
 When a DBMS may be unnecessary:
 If the database and applications are simple, well defined, and not
expected to change.
 If access to data by multiple users is not required.

Slide 1-32
When not to use a DBMS
 When no DBMS may suffice:
 If there are stringent real-time requirements that may not be
met because of DBMS overhead.
 If the database system is not able to handle the complexity of
data because of modeling limitations
 If the database users need special operations not supported by
the DBMS.

Slide 1-33

You might also like