Sie sind auf Seite 1von 11

RELATIONAL DATABASE MANAGEMENT SYSTEMS (RDBMS)

COURSE OUTLINE

• The Database Approach

• The Relational Database

• Entity Relationship Modeling

• Relational Representation and Normalization

• Higher Normalization

• Introduction to SQL

• File Organization and Indexing

• Database Administration Facility

• Recovery and Concurrency

Book:

The Relational Database, 1st Edition

By John Carter: Chapman & Hall

Terminal Exam: 7 Review Questions out of 10.

Assignments (10 Marks), Quizzes (10 Marks), Presentation/Attend (5 Marks)


Mid Term includes Chap 1-4 attempt all Question (25 Marks), Terminal Exam (50
Marks)

NOTE: 50% Attendance is required to appear in MID TERM Examination and 70%
for Terminal Examination.

THE DATABASE APPROACH


• The Database Approach
• Components of DBMS
• ANSI/SPARC Model
• Life Cycle of Relational Databases

WHAT IS DATABASE?

A shared collection of logically related data, designed to meet the information needs of
multiple users in an organization.

Databases are designed to offer an organized mechanism for storing, managing and retrieving
information. They do so through the use of tables. If you’re familiar with spreadsheets like
Microsoft Excel, you’re probably already accustomed to storing data in tabular form.

To access information from a database, you need a database management system (DBMS).
This is a collection of programs that enables you to enter, organize, and select data in a
database.

ADVANTAGES OF DATABASE APPROACH

• Control of Data Redundancy:

• Minimized or controlled redundancy. Every Department e.g. Accounts,


Admission, Computer Department and store department was managing its own
data. But now the whole data is managed at one place in a database.

• Data Consistency:

• Redundancy is linked with the consistency. If data is updated at one place will
have effect on all the linked concerned departments. So data will be
consistent. e.g. if the address of the student is changed all the concerned
department like Accounts, Admission, Computer and store Departments have the
effect of change.

• More Information from the same amount of data:

• As data of the organization is placed at a centralized place at the database so


information can be utilized by all the departments if they required.

• Sharing of Data:

• Data is shared by all the authorized users.


• Improved Data Integrity:

• Integrity in terms of constraints.

• Improved Security:

• Authentication, access rights.

• Enforcement of Standards:

• Data format, naming convention documents etc.

• Economy of Scale:

• Cost saving due to database approach

• Balance Conflict Requirements:

• DBA resolve conflicts between different users group.

• Improved Data Accessibility/Responsiveness:

• Ad-hoc queries on integrated data

• Increase Productivity:

• Developers need to focus on Application.

• Improved Maintenance:

• Increase Concurrency:
• Multiple users are allowed to access the same data.

• Improved Backup and Recovery Services:

• Routine backups and recovery procedures by the skilled staff.

Disadvantages Of Database Approach


• Complexity

• Size

• Cost of DBMS

• Additional Hardware Costs

• Cost of Conversion

• Performance

• Higher Impact of failure

COMPONENTS OF DBMS
All modern DBMS’s contains the following components.

• File Manager:

• The component that handles all the files creation, record-insertion, and
modification is called files manager.

• It also maintains the relationship between the files.

• Structured Query Language:

• SQL is the data sub-language of relation system.


• It includes Data Definition language (DDL) and Data Manipulation language
(DML).
• SQL can be used for manipulation i.e. output, update, insertion and deletion of
data.
• It can also be used for the definition of database objects.
• SQL is now an international standard and is provided with most database
management packages.
• In end user environment, SQL is usually hidden by more user-friendly interfaces.

• Data definition Language Statements are


• CREATE TABLE DROP TABLE
• CREATE VIEW DROP VIEW
• CREATE INDEX DROP INDEX

• Data Manipulation language statements are


• SELECT UPDATE DELETE INSERT

• 4GL:

• It is the most modern feature of DBMS for report writing and screen
designing.

• This utility allows formatted reports and screen derived from one or more
database tables to be easily produced without complex code.

• Code generated by such utility may also be embedded in host programs.

• The standard reports, screens and forms can be defined and kept in library and
inserted in required programs, thus further reducing programming efforts.

• INGRES and ORACLE Developer 2000 are well-known set of 4GL utilities.

• Integrated CASE Tools:

• The databases are equipped with the tools allows the database designer to draw
entity relationship diagram (ERD) interactively using graphics facilities, and thus
to develop the database schema and make changes where necessary.

• Then attributes are added.


• The CASE tools can automatically generate the actual database from these
definitions.

ANSI/SPARC Model
• Database Task Group in 1971 give two level model for the standardization of database
system architecture which was refined by the Standard Planning and Requirements
Committee (SPARC) of ANSI in 1975.

• Therefore this is also called ANSI/SPARC model.

• The data in DBMS is described in three levels of abstraction.

• The data as perceived at each level is described by a schema.

• Users that is end users and application programmers, both operate at the external level
interact with the data by mean of a data sublanguage, which consist of two
components, a data definition language (DDL) and data manipulation language (DML).
The data sublanguages are embedded in a host language.

• The aim of the three schema architecture is the separation of the user applications
from the physical database. Physically the data is only existent on the internal level
while other forms of representation are calculated or derived respectively if needed.

• The DBMS has the task to realise this representation between each of these levels.

Characteristics of Database Approach


• Represent Some Aspects of real world applications

• Manages Information

• Easy Operation implementation

• Multiple views of database


• Data for specific purpose

• It has Users of Specific interest

• Logical relationship between records and data

Data and Related Structures

Data are actually stored as bits, or numbers and strings, but it is difficult to work with
data at this level.It is necessary to view data at different levels of abstraction.

Schema:

Description of data at some level. Each level has its own schema.

We will be concerned with three forms of schemas:

• physical,

• conceptual, and
• external.

Physical Data Level

The physical schema describes details of how data is stored: files etc.

Conceptual Data Level

• Also referred to as the Logical level.

• Hides details of the physical level.

• In the relational model, the conceptual schema presents data as a set of tables.

• The DBMS maps data access between the conceptual to physical schemas
automatically.

• Physical schema can be changed without changing application:

• DBMS must change mapping from conceptual to physical.

• Referred to as physical data independence.

• External Level Views / External Schema:

The external view level is closest to the users. It is concerned with the way the data is viewed by
individual users. You can say that external level is the individual user level. A user can either be
an application programmer or an end-user, but DBA is an important special case.

The external level consist of many different external views of database. Each external view
describes that a particular user group is interested in and hides the rest of the database from
that user group. In addition, different views may have different representations of the same data.
For example, one user may view date in the form (day, month, year).. while another may view
date as (year, month, day).

The external views are defined by means of external schemes, which are written in the data
definition language (DDL). Usually, the DBA writes an external schema to create a user view.
Each user's view. An external record is a record seen by a particular user (a part of his external
view). Actually, an external view is a collection of external records.

The external schemes are compiled by the DBMS and store in its data dictionary. The DBMS
uses the external schema created for a specific user, to create a user interface to access the
database
SQL Constraints
SQL constraints are used to specify rules for data in a table.

The following constraints are commonly used in SQL:

NOT NULL - Ensures that a column cannot have a NULL value

UNIQUE - Ensures that all values in a column are different

PRIMARY KEY - A combination of a NOT NULL and UNIQUE. Uniquely identifies


each row in a table

FOREIGN KEY - Uniquely identifies a row/record in another table

CHECK - Ensures that all values in a column satisfies a specific condition

DEFAULT - Sets a default value for a column when no value is specified

INDEX - Used to create and retrieve data from the database very quickly
Mappings:
Mappings define the correspondence between different levels of schemas which means that
three levels of schemas communicate through mappings. The DBMS is responsible for
communication between these three types of schemas. The DBMS must check that all external
schemas are derivable form conceptual schemas and it must use the information in conceptual
schema to map between each external schema and the internal schema.

These mappings are the key to the provision of logical and physical data independence.

LIFE CYCLE OF A RELATIONAL DATABASES:


• Understanding of Real Word Problem:

• The understanding of nature of the problem and the constraints and outline feasibility
is performed using any system analysis methodology.

• Entity Relation Diagram:

• ERDs are drawn at early stages to find the requirement of the database and to
understand the processing. The entities, their attributes, relationships, Primary
and Foreign Keys specification etc. are decided at this stage.

• Normalization:

• It is the process of converting the complex data structure into stable and small one.

• Different normal forms are available to normalize the database.

• Some splitting and even recombination of entity types may result from normalization.

• Tables Creation:

• The database table is then created according to the set of tables.

• SQL create table command is used to create the table and to apply the
constraints and to specify the primary and foreign keys.

• File Organization, Indexing and views:


• Selecting appropriate file-organization according to the user application.

• Create index using SQL CREATE INDEX.

• Create views using SQL CREATE VIEW

• Query Design:

• Designing of the queries according to the user requirements.

• SQL SELECT Command can be used to design the queries.

• Screen Design:

• Designing of the screens to create the input output interfaces, required by the user
applications.

• The interface can contain different colors, fonts, prompts etc.

• Report Design:

• Reports are very important and are used in almost all the business applications.

• Reports are designed according to requirements.

• The contents and format are specified to generate the reports.

• Testing:

• All the important queries, inputs and update screens and report programs are tested
for the correctness of database schema and the viability of the system as a whole.

• Hand Over: This is the stage where user receives the finished database applications and
starts the data entry.

Das könnte Ihnen auch gefallen