0% found this document useful (0 votes)
6 views44 pages

Unit I

This document provides an overview of relational database systems (RDBMS), highlighting their definition, key features, and differences from traditional database management systems (DBMS). It discusses data integrity, database architecture, various data models, and the roles of different database users. The document emphasizes the importance of structured query language (SQL) and the organization of data into tables for efficient management and retrieval.

Uploaded by

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

Unit I

This document provides an overview of relational database systems (RDBMS), highlighting their definition, key features, and differences from traditional database management systems (DBMS). It discusses data integrity, database architecture, various data models, and the roles of different database users. The document emphasizes the importance of structured query language (SQL) and the organization of data into tables for efficient management and retrieval.

Uploaded by

Hemant Kushwaha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 44

UNIT 1

Relational Databases
By
Gauri Kulkarni.
Introduction to Relational Database System:

• Definition: "A relational database system is a


type of DBMS that utilizes a relational model to
organize and store data.“
• All modern database management systems like
SQL, MS SQL Server, IBM DB2, ORACLE, My-SQL,
and Microsoft Access are based on RDBMS.
• It is called Relational Database Management
System (RDBMS) because it is based on the
relational model introduced by E.F. Codd.
DBMS vs RDBMS
• RDBMS DBMS
• Relational
• TABULAR FORMAT STORED IN file
• system
• form of table
• hierarchical form and navigation form
• Relation bet data no relation bet data
• Normalization no normalized data
• Multiuser single user
• Distributed database no distributed db
• Oracle,sql server file ststem
• Large amt data small amt data
• Explain Data:unprocessed data/no
structure.electronic mode
• Database:organized data RDBMS-row and col ..in
table
• DBMS:database have multiple table store in .db.
• DBMS:managing data insrt,delete is a tool use to
manage the database.oracle,mysql,mangoDB,sqlLite,
• SQL:structure query lang used to manage the
data.queries help to manipulation.
• RDBMS:
Key Features of Relational Database System
Title: Key Features
Bullet Points:
1)Data organized into tables (relations).
2)Relationships established between tables.
3)Enforces data integrity through keys and constraints.
4)Provides a structured query language (SQL) for data
manipulation.
:
Following are the various terminologies of RDBMS
• Properties of a Relation:
• Each relation has a unique name by which it is
identified in the database.
• Relation does not contain duplicate tuples.
• The tuples of a relation have no specific order.
• All attributes in a relation are atomic, i.e., each
cell of a relation contains exactly one value.
• There are the following categories of data integrity exist with
each RDBMS:
• Entity integrity: It specifies that there should be no duplicate
rows in a table.
• Domain integrity: It enforces valid entries for a given column by
restricting the type, the format, or the range of values.
• Referential integrity specifies that rows cannot be deleted,
which are used by other records.
• User-defined integrity: It enforces some specific business rules
defined by users. These rules are different from the entity,
domain, or referential integrity.
• Introduction to Database Systems
• Title: Introduction to Database Systems
• Purpose of Database System:
– Efficiently store, manage, and retrieve data.
– Provide a structured and organized way to handle
information.
– Ensure data integrity and security.
• Database System Applications
• Title: Database System Applications
• Bullet Points:
– Business applications (e.g., CRM, ERP).
– Scientific applications.
– Embedded systems.
– Social media platforms.
– Data warehouses.
• View of Data
• Title: View of Data
• Data Abstraction:Database systems are made-up of complex
data structures. To ease the user interaction with database,
the developers hide internal irrelevant details from users. This
process of hiding irrelevant details from user is called data
abstraction. The term “irrelevant” used here with respect to
the user, it doesn’t mean that the hidden data is not relevant
with regard to the whole database. It just means that the user
is not concerned about that data
– Hide complex details, provide a simplified view.
– Levels: Physical, Logical, View.
For example: When you are booking a train ticket,
you are not concerned how data is processing at the
back end when you click “book ticket”, what
processes are happening when you are doing online
payments. You are just concerned about the
message that pops up when your ticket is
successfully booked. This doesn’t mean that the
process happening at the back end is not relevant, it
just means that you as a user are not concerned
what is happening in the database.
• Physical level: This is the lowest level of data abstraction. It describes how
data is actually stored in database. You can get the complex data structure
details at this level.
• Logical level: This is the middle level of 3-level data abstraction
architecture. It describes what data is stored in database.
• View level: Highest level of data abstraction. This level describes the user
interaction with database system.
• Example: Let’s say we are storing customer information in a customer table.
At physical level these records can be described as blocks of storage (bytes,
gigabytes, terabytes etc.) in memory. These details are often hidden from
the programmers.
• At the logical level these records can be described as fields and attributes
along with their data types, their relationship among each other can be
logically implemented. The programmers generally work at this level
because they are aware of such things about database systems.
• At view level, user just interact with system with the help of GUI and enter
the details at the screen, they are not aware of how the data is stored and
what data is stored; such details are hidden from them.
• Instances and Schemas
• Title: Instances and Schemas
• Definition of schema: Design of a database is called the schema. For example: An employee table in
database exists with the following attributes:
• EMP_NAME EMP_ID EMP_ADDRESS EMP_CONTACT -------- ------ ----------- -----------This is the schema of
the employee table. Schema defines the attributes of tables in the database. Schema is of three types:
Physical schema, logical schema and view schema.
• Schema represents the logical view of the database. It helps you understand what data needs to go where.
• Schema can be represented by a diagram as shown below.
• Schema helps the database users to understand the relationship between data. This helps in efficiently
performing operations on database such as insert, update, delete, search etc.
• In the following diagram, we have a schema that shows the relationship between three tables: Course,
Student and Section. The diagram only shows the design of the database, it doesn’t show the data present
in those tables. Schema is only a structural view(design) of a database as shown in the diagram below.

• Bullet Points:
– Instances: Snapshots of the database at a particular moment.
– Schemas: Describes the structure of the database.
• DBMS Instance
• Definition of instance: The data stored in database at a particular moment of time is called
instance of database. Database schema defines the attributes in tables that belong to a
particular database. The value of these attributes at a moment of time is called the instance
of that database.
• For example, we have seen the schema of table “employee” above. Let’s see the table with
the data now. At this moment the table contains two rows (records). This is the the current
instance of the table “employee” because this is the data that is stored in this table at this
particular moment of time.
• EMP_NAME EMP_ID EMP_ADDRESS EMP_CONTACT ------- ------ ----------- -----------
• Chaitanya 101 Noida 95********
• Ajeet 102 Delhi 99********
• Let’s take another example: Let’s say we have a single table student in the database, today
the table has 100 records, so today the instance of the database has 100 records. We are
going to add another 100 records in this table by tomorrow so the instance of database
tomorrow will have 200 records in table. In short, at a particular moment the data stored in
database is called the instance, this changes over time as and when we add, delete or update
data in the database.
• Data Models
• Title: Data Models:Data Model is the modeling of
the data description, data semantics, and
consistency constraints of the data. It provides the
conceptual tools for describing the design of a
database at each level of data abstraction.
• Bullet Points:
– Conceptual representation of data and relationships.
– Common models: Relational, Hierarchical, Network,
Object-Oriented.
• 1) Relational Data Model: This type of model designs the data in the form of
rows and columns within a table. Thus, a relational model uses tables for
representing data and in-between relationships. Tables are also called
relations. This model was initially described by Edgar F. Codd, in 1969. The
relational data model is the widely used model which is primarily used by
commercial data processing applications.
• 2) Entity-Relationship Data Model: An ER model is the logical representation
of data as objects and relationships among them. These objects are known as
entities, and relationship is an association among these entities. This model
was designed by Peter Chen and published in 1976 papers. It was widely used
in database designing. A set of attributes describe the entities. For example,
student_name, student_id describes the 'student' entity. A set of the same
type of entities is known as an 'Entity set', and the set of the same type of
relationships is known as 'relationship set'.
• 3) Object-based Data Model: An extension of the ER model with notions of
functions, encapsulation, and object identity, as well. This model supports a
rich type system that includes structured and collection types. Thus, in 1980s,
various database systems the object-oriented approach were developed.
Here, the objects are nothing but the data carrying its properties.
• 4) Semistructured Data Model: This type of data model
is different from the other three data models (explained
above). The semistructured data model allows the data
specifications at places where the individual data items
of the same type may have different attributes sets. The
Extensible Markup Language, also known as XML, is
widely used for representing the semistructured data.
Although XML was initially designed for including the
markup information to the text document, it gains
importance because of its application in the exchange of
data.
• Database Architecture
• Title: Database Architecture:The DBMS design depends upon its
architecture. The basic client/server architecture is used to deal with a
large number of PCs, web servers, database servers and other
components that are connected with networks.
• The client/server architecture consists of many PCs and a workstation
which are connected via the network.
• DBMS architecture depends upon how users are connected to the
database to get their request done.

• Components:
– Data storage.
– Data retrieval and manipulation.
– Query processing and optimization.
• Types of Architecture:
• 1-Tier Architecture
• In this architecture, the database is directly available to the user. It means the user can
directly sit on the DBMS and uses it.
• Any changes done here will directly be done on the database itself. It doesn't provide a
handy tool for end users.
• The 1-Tier architecture is used for development of the local application, where
programmers can directly communicate with the database for the quick response.
• 2-Tier Architecture
• The 2-Tier architecture is same as basic client-server. In the two-tier architecture,
applications on the client end can directly communicate with the database at the
server side. For this interaction, API's like: ODBC, JDBC are used.
• The user interfaces and application programs are run on the client-side.
• The server side is responsible to provide the functionalities like: query processing and
transaction management.
• To communicate with the DBMS, client-side application establishes a connection with
the server side.
2-tier Architecture
• Three-Tier Architecture
• Title: Three-Tier Architecture:The 3-Tier architecture contains another layer
between the client and server. In this architecture, client can't directly
communicate with the server.
• The application on the client-end interacts with an application server which
further communicates with the database system.
• End user has no idea about the existence of the database beyond the
application server. The database also has no idea about any other user beyond
the application.
• The 3-Tier architecture is used in case of large web application.

• Bullet Points:
– Presentation layer.
– Application layer.
– Data layer.
o. DBMS RDBMS
1) DBMS applications store data as file. RDBMS applications store data in a tabular form.

2) In DBMS, data is generally stored in either a In RDBMS, the tables have an identifier called primary
hierarchical form or a navigational form. key and the data values are stored in the form of tables.

3) Normalization is not present in DBMS. Normalization is present in RDBMS.

4) DBMS does not apply any security with RDBMS defines the integrity constraint for the
regards to data manipulation. purpose of ACID (Atomocity, Consistency, Isolation and
Durability) property.

5) DBMS uses file system to store data, so there in RDBMS, data values are stored in the form of tables,
will be no relation between the tables. so a relationship between these data values will be
stored in the form of a table as well.

6) DBMS has to provide some uniform methods RDBMS system supports a tabular structure of the data
to access the stored information. and a relationship between them to access the stored
information.

7) DBMS does not support distributed RDBMS supports distributed database.


database.
8) DBMS is meant to be for small organization RDBMS is designed to handle large amount of data.
and deal with small data. it it supports multiple users.
supports single user.

9) Examples of DBMS are file systems, xml etc. Example of RDBMS are mysql, postgre, sql
server, oracle etc
• Database Users and Administrators
• Title: Database Users and Administrators
• Database users are categorized based up on their interaction with the
database. These are seven types of database users in DBMS.
• Naive / Parametric End Users : Parametric End Users are the
unsophisticated who don’t have any DBMS knowledge but they frequently
use the database applications in their daily life to get the desired results.
For examples, Railway’s ticket booking users are naive users. Clerks in any
bank is a naive user because they don’t have any DBMS knowledge but
they still use the database and perform their given task.
• System Analyst :
System Analyst is a user who analyzes the requirements of parametric end
users. They check whether all the requirements of end users are satisfied.
• Sophisticated Users : Sophisticated users can be engineers, scientists, business analyst, who are familiar
with the database. They can develop their own database applications according to their requirement. They
don’t write the program code but they interact the database by writing SQL queries directly through the
query processor.
• Database Designers : Data Base Designers are the users who design the structure of database which
includes tables, indexes, views, triggers, stored procedures and constraints which are usually enforced
before the database is created or populated with data. He/she controls what data must be stored and how
the data items to be related. It is responsibility of Database Designers to understand the requirements of
different user groups and then create a design which satisfies the need of all the user groups.
• Application Programmers : Application Programmers also referred as System Analysts or simply Software
Engineers, are the back-end programmers who writes the code for the application programs. They are the
computer professionals. These programs could be written in Programming languages such as Visual Basic,
Developer, C, FORTRAN, COBOL etc. Application programmers design, debug, test, and maintain set of
programs called “canned transactions” for the Naive (parametric) users in order to interact with database.
• Casual Users / Temporary Users : Casual Users are the users who occasionally use/access the database but
each time when they access the database they require the new information, for example, Middle or higher
level manager.
• Specialized users : Specialized users are sophisticated users who write
specialized database application that does not fit into the traditional data-
processing framework. Among these applications are computer aided-design
systems, knowledge-base and expert systems etc.

• Users and Interfaces:


– End-users, application developers, database administrators.
– Interfaces: Graphical user interfaces, command-line interfaces.
Database User
• The people who are accessing or working with the database are called database users and administrators.
We know that the primary aim of theDBMS is to store the data or information and retrieve whenever it is
needed by the database users.
• Database Users and Administrators
• Those who are working with the database can be categorized into two; the database users and the
database administrators.
• Database Users
• The database users also can be categorized again into five groups according to how they interact with the
database. They are:
• Native Users
• Application Programmers
• Sophisticated Users
• Specialized Users
• Stand-alone Users
• 1. Native Users
• These are the database users who are communicating with the database through an already written
program.
• For example, when a student is registering on a website for an online examination. He creates data in the
database by entering and submitting his name, address and exam details.
• 2. Application Programmers
• These are the software developers and programming
professionals who write the program codes.
• They use tools like Rapid Application Development
(RAD) tools for creating user interfaces with minimal efforts.
• 3. Sophisticated Users
• Sophisticated users are those who are creating the database.
These type of users do not write program code. And they do
not use any software to request the database.
• The sophisticated users directly interact with the database
system using query languages like SQL.
• 4. Specialized Users
• The sophisticated users who write
special database application programs are called
specialized users. The write complex programs
for the specific complex requirements.
• 5. Stand-alone Users
• Those who are using database fo personal
usage. There are many database packages for
this type database users.
• Database Administrator (DBA)
• Title: Database Administrator (DBA)
• Database Administrators
• The person who has the central control over a database system is called Database Administrator (DBA).
• The database administrator has the following functions in a database system.
• -Schema Definition: The database administrator creates the original database schema by executing a
set of data definition statements in DDL.
• -Storage structure an access method definition.
• -Schema and physical or organization modification: The database administrator performs the changes
to the schema according to the needs of organizations or physical needs to improve the database
performance.
• -Provide the granting of authorization to access data: The database administrator can decide the which
parts of the database can be accessed by a user, by using the different types of authorization methods.
• -Database maintenance: The database maintenance includes the following processes.
• Regular backing up of the database.
• Ensuring the disk space for performing the required operations.
• Monitoring the jobs running on the database.
• Database Administrator (DBA) : Database Administrator (DBA) is a person/team who
defines the schema and also controls the 3 levels of database. The DBA will then create a
new account id and password for the user if he/she need to access the database. DBA is
also responsible for providing security to the database and he allows only the authorized
users to access/modify the data base. DBA is responsible for the problems such as security
breaches and poor system response time.
– DBA also monitors the recovery and backup and provide technical support.
– The DBA has a DBA account in the DBMS which called a system or superuser account.
– DBA repairs damage caused due to hardware and/or software failures.
– DBA is the one having privileges to perform DCL (Data Control Language) operations such as
GRANT and REVOKE, to allow/restrict a particular user from accessing the database.

• Bullet Points:
– Manages and maintains the database system.
– Ensures data security and integrity.
– Performance optimization.
• Introduction to the Relational Model
• Title: Introduction to the Relational Model
• Structure of Relational Database:
– Tables (relations) with rows (tuples) and columns
(attributes).
• Database Schema and Keys
• Title: Database Schema and Keys
• Bullet Points:
– Blueprint of the database structure.
– Primary keys uniquely identify a record.
– Foreign keys establish relationships between
tables.
• Relational Query Language (SQL)
• Title: Relational Query Language (SQL)
• Bullet Points:
– SELECT, FROM, WHERE clauses for data retrieval.
– JOIN operations for combining data from multiple
tables.
• The Relational Algebra
• Title: The Relational Algebra
• Fundamental Operations:
– Selection, Projection, Cartesian Product, Union,
Set Difference.
• Formal Definition and Additional Operations.
• The Entity-Relationship Model
• Title: The Entity-Relationship Model
• Entity Set, Relationship Set, and Attributes.
• Constraints in the ER Model
• Title: Constraints in the ER Model
• Mapping Cardinalities, Key Constraints,
Participation Constraints.
• E-R Diagrams
• Title: E-R Diagrams
• Basic Structure, Complex Attributes, Roles.
Non-Binary Relationship Sets and Weak Entity
Set
Title: Non-Binary Relationship Sets and Weak
Entity Set
Ternary, quaternary, etc.
Entity that cannot be uniquely identified by its
attributes alone.
Relational Database Design using ER-to-
Relational Mapping
Title: Relational Database Design using ER-to-
Relational Mapping
Transforming ER diagrams into relational
schemas.
• Extended ER Features
• Title: Extended ER Features
• Specialization and Generalization, Attribute
Inheritance.
• Constraints on Generalization, Aggregation.

You might also like