SlideShare a Scribd company logo
RDBMS & ORACLE
Database concept
A relational approach
Dr. R. Khanchana
Assistant Professor
Department of Computer Science
Sri Ramakrishna College of Arts and Science for Women
CORE 8: RDBMS AND ORACLE
UNIT I: Database Concepts: A Relational approach: Database – Relationships – DBMS – Relational
Data Model – Integrity Rules – Theoretical Relational Languages. Database Design: Data Modeling
and Normalization: Data Modeling – Dependency – Database Design – Normal forms – Dependency
Diagrams – De -normalization – Another Example of Normalization.
UNIT II: Oracle9i: Overview: Personal Databases – Client/Server Databases – Oracle9i an
introduction – SQL *Plus Environment – SQL – Logging into SQL *Plus - SQL *Plus Commands –
Errors & Help – Alternate Text Editors - SQL *Plus Worksheet - iSQL *Plus. Oracle Tables: DDL:
Naming Rules and conventions – Data Types – Constraints – Creating Oracle Table – Displaying Table
Information – Altering an Existing Table – Dropping, Renaming, Truncating Table – Table Types –
Spooling – Error codes.
UNIT III: Working with Table: Data Management and Retrieval: DML – adding a new Row/Record –
Customized Prompts – Updating and Deleting an Existing Rows/Records – retrieving Data from Table
– Arithmetic Operations – restricting Data with WHERE clause – Sorting – Revisiting Substitution
Variables – DEFINE command – CASE structure. Functions and Grouping: Built-in functions –
Grouping Data. Multiple Tables: Joins and Set operations: Join – Set operations.
UNIT IV: PL/SQL: A Programming Language: History – Fundamentals – Block Structure – Comments –
Data Types – Other Data Types – Declaration – Assignment operation – Bind variables – Substitution
Variables – Printing – Arithmetic Operators. Control Structures and Embedded SQL: Control
Structures – Nested Blocks – SQ L in PL/SQL – Data Manipulation – Transaction Control statements.
PL/SQL Cursors and Exceptions: Cursors – Implicit & Explicit Cursors and Attributes – Cursor FOR
loops – SELECT…FOR UPDATE – WHERE CURRENT OF clause – Cursor with Parameters – Cursor
Variables – Exceptions – Types of Exceptions.
UNIT V: PL/SQL Composite Data Types: Records – Tables – arrays. Named Blocks: Procedures –
Functions – Packages –Triggers –Data Dictionary Views.
Books
TEXT BOOK: 1. Database Systems using Oracle,
Nilesh Shah, 2nd edition, PHI.
REFERENCE BOOKS:
1. Database Management Systems, Majumdar &
Bhattacharya, 2007, TMH.
2. Database Management Systems, Gerald V.
Post, 3rd edition, TMH.
Data base
• Electronic store of Data.
• Repository that stores
information about
“things”.
• It also contains
relationships among
those different
“Things”.
Basic Terms
• A person, place, event or item is called on entity.
• The facts describing an entity are known as data.
• Each entity can be described by its characteristics,
which are known as attributes.
For Ex: gender, first name last name, etc…
• All the related entities are collected together to form
an entity set .
• A database is collection of entity set
• The interactions between entity sets are called
relationships
Relationships
• The database design requires to create an entity
set each describing a set of related entities.
• Establishes all the relationship between the entity
sets with in the database.
• Depending on the type of interaction the
relationship are classified into three categories
One - to - one relationship
One - to - many relationship
Many - to - many relationship
Entity, Attributes, Relation
Basic Terms
Entity Data
(Attributes)
Entity
Set
Relationships
Relationship -Examples
Database management system
Components
• DBMS software package such as micro soft access, visual
fox pro, micro soft SQL server or oracle.
• A user developed and implemented database or databases
that includes tables , a data dictionary and other database
objects.
• Custom applications such as data entry form , reports,
queries, blocks, and programs.
• Hardware: personal computer,
• Software: operating system, network operating system
• Personnel: database administrator, database designer/analyst
User
Applications DBMS Database
OS Software
Hardware
• DBMS based on the relational model is
also known as RDBMS.
Important Functions managed by
Database
• Meta data
• All day to day transactions.
• Book keeping
• Transforms logical data requests to match physical data
structure.
• Data Validation
• Access Security
• Data Security
• Data Sharing
• Import and export utilities
Types of Database Models
Relational
Model
Hierarchical
Model
Network Model
Object Model
Relational Model
• Tables
Hierarchical Model
• Tree
Network Model
• Graph
Object Model
• Objects
Quiz
• https://quizizz.com/admin/quiz/5efef763e7b1
6f001b336a4f
Feedback
• https://docs.google.com/forms/d/1CFnpSga4s
LZGof3ut8X_nqegiKWzOSlkdnTxTp1cI9Y/edit
The Relational Database Model
• The relational is represented by two
dimensional flat Structure know as a table.
• Data base system that manages a relational
database environment is know as a
relational database management system.
• A table is a matrix of rows and columns
where
– each row represents an Record and each column
represents an Attribute.
The Relational Database Model
• Tuple / Record - Row
• Attribute / Field - Column
• Degree - number of column in an table
• Domain - Set of all possible values that a
column may have
• Key - Minimal set of columns use to uniquely
define any row in a table.
Table
Types of Keys
Types of Keys
Need for indentifying uniquely any row of data in a table.
• Super Key – A key with super set of all possibilities.
• Candidate key- Minimal set of super key
• Primary key - A single column is used as a unique identifier
• Composite key- A combination of a column is used as a unique
identifier (Composite Primary key)
• Secondary key - A more human approach is used to identify or
retrieve a row from a table
• Surrogate key - An extra column as a primary key instead of using
a composite key
• Foreign key - A column in a table that references a column in
another table
Keys -Example
• Candidate keys
• SID
• REGID
• EMAILID
• Foreign Key
• BRANCHID
• Super keys
• Not Candidate
key
• SID +REGID
• REGID +EMAILID
• EMAILID +SID
• SID+REGID+EMAILID
SID REGID NAME BRANCHCOD
E
EMAILID
1 12_CS Adam CS adamcs@yahoo.com
2 13_CA Adam CA adamca@yahoo.co.in
3 11_IT John IT johnit@gmail.com
4 14_CS Esitha CS esithacs@yahoo.com
• Primary
Keys
• REGID
BRANCH CODE BRANCH NAME
CS Compuer Science
IT Information Technology
CA Computer Application
Key - Examples
Mind-Map
Assignment
• July 7 /2020
– Draw an E – R Diagram for Customer and Products
Outcome
Quiz
• https://quizizz.com/admin/quiz/5f033838b64
a9f001ceee558
Feedback
• https://docs.google.com/forms/d/1aGxN647Y
mdmhTV1gnG_LPiTb93Xx8dmB8YTqpRyrZdw/
edit
Integrity Rules
• Entity –integrity: No column in a primary
key may be null. The primary key provides the
means of uniquely identifying a row or an
entity.
• A Null value means a value that is not known ,
not entered, not defined, or not applicable.
• A zero is not considered to be a null value.
• Referential-integrity: A foreign key value
may be a null value, or it must exist as a value
of a primary key in referenced table.
Theoretical Relational languages
• Relational algebra, a procedural language.
• Relational calculus, a nonprocedural language.
• Third- generations high level complier
languages can be used to manipulate data in a
table, but they can only work with one row at a
time.
• The database systems non procedural structured
query language is used as a data manipulation
sub language
Relational algebra
• The relational algebra is a procedural language
• Set of operations
–Union
–Intersection
–Difference
–Projection
–Selection
–Product
–Assignment
–Join
–Division
Union
• Union of two tables results in retrieval of all rows that
are in one or both tables.
• The duplicate rows are eliminated from the resulting
table.
• Basic requirement
• Both tables must have the same degree.
• The domains of the corresponding columns in two
tables must be same .
Union –Example 1
Result = Table1 Union Table 2
Union –Example 2
EMP_TESTDEISGN = EMP_TEST UNION EMP_DESIGN
Intersection
• Intersection of two tables produces a table with
rows that are in both tables.
• The two tables must be union compatible to
perform an intersection on them.
Intersection –Example 1
Intersection –Example 2
STUD_INS = STUDENT INTERSECTION INSTRUCTOR
STUD_INS
Projection
• Projection operation allows us to create a table based
on desirable columns from all existing column in a
table.
• The projection operation returns the “Vertical Slices”
of a table.
Difference
• The intersection of two tables produces a table
with rows that are present in the first table but
not in the second table.
• The difference can be performed on union
compatible tables only.
Difference -Example
RES_TABLE = R - S
RESULT_TABLE = S - R
RES_TABLE
RESULT_TABLE
Selection
• Selection operation selects the rows from a
table based on condition or conditions.
• The conditional (=,< >,>,>=,<,<=)and the
logical operators(AND, OR,NOT) are used
along with columns and value to create
conditions.
• The selection operation returns “Horizontal
Slices” .
Selection -Example
EMPLOYEE
E_SAL
E_SAL = Sel (EMPLOYEE : sal > 500)
Product
Example• The product of two
tables is a
combination every
thing in both tables.
• It is also known as a
Cartesian product.
C= A *B
A B
C
Assignment
• The operation creates a new table from existing table
• Table_New = E_SAL
Table_New
Old Table Name
New Table Name
Division - Example
Proj No
1
2
3
Proj No PartNo
1 11
2 33
3 11
1 22
2 11
PROJECT PROJPARTS
PartNo
11
PARTS
PARTS = PROJPARTS / PROJECT
Join
• The join is one of the most important
operations because of ability to get related
data from a number of tables.
• The join is based on common set of values.
• Other types of joins:
– Natural join
– Equijoin
– Outer join
– Non equijoin
– Self join
Join – Example
COM_PRO = Join(PRODUCT,COMPANY: COMPANY_ID = COMPANY_ID)
PRODUCT
COMPANY
COM_PRO
Division
• Division operation is most difficult operation
to comprehend
• It is not as simple as division in mathematics.
• In relational algebra it identifies rows in one
table that have a certain relationship to all
rows in another table.
Quiz
• https://quizizz.com/admin/quiz/5f01bc1de42
1e1001b981bc8
Assignment
• Create Student and Department table and
perform all Algebra operations
Feedback
• https://docs.google.com/forms/d/1uP3yhcDG
KEwsVm3Ei1Xxg7nkaPLFHxm0G63WE1LZK60/
edit

More Related Content

What's hot

Presentation on Relational Schema (Database)
Presentation on Relational Schema (Database)Presentation on Relational Schema (Database)
Presentation on Relational Schema (Database)
Salim Hosen
 
Database language
Database languageDatabase language
Key and its different types
Key and its different typesKey and its different types
Key and its different types
Umair Shakir
 
Primary Key & Foreign Key part10
Primary Key & Foreign Key part10Primary Key & Foreign Key part10
Primary Key & Foreign Key part10
DrMohammed Qassim
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
Arun Sharma
 
PL/SQL Introduction and Concepts
PL/SQL Introduction and Concepts PL/SQL Introduction and Concepts
PL/SQL Introduction and Concepts
Bharat Kalia
 
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
FUNCTION DEPENDENCY  AND TYPES & EXAMPLEFUNCTION DEPENDENCY  AND TYPES & EXAMPLE
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
Vraj Patel
 
Normalization PRESENTATION
Normalization PRESENTATIONNormalization PRESENTATION
Normalization PRESENTATION
bit allahabad
 
Database Keys
Database KeysDatabase Keys
Database Keys
Forrester High School
 
EER modeling
EER modelingEER modeling
EER modeling
Dabbal Singh Mahara
 
Sql subquery
Sql  subquerySql  subquery
Sql subquery
Raveena Thakur
 
DBMS: Types of keys
DBMS:  Types of keysDBMS:  Types of keys
DBMS: Types of keys
Bharati Ugale
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraints
madhav bansal
 
Relational algebra ppt
Relational algebra pptRelational algebra ppt
Relational algebra ppt
GirdharRatne
 
Basic SQL and History
 Basic SQL and History Basic SQL and History
Basic SQL and History
SomeshwarMoholkar
 
Functional dependency
Functional dependencyFunctional dependency
Functional dependency
Dashani Rajapaksha
 
Relational model
Relational modelRelational model
Relational model
Dabbal Singh Mahara
 
Relational Data Model Introduction
Relational Data Model IntroductionRelational Data Model Introduction
Relational Data Model Introduction
Nishant Munjal
 

What's hot (20)

Presentation on Relational Schema (Database)
Presentation on Relational Schema (Database)Presentation on Relational Schema (Database)
Presentation on Relational Schema (Database)
 
Database language
Database languageDatabase language
Database language
 
Key and its different types
Key and its different typesKey and its different types
Key and its different types
 
Primary Key & Foreign Key part10
Primary Key & Foreign Key part10Primary Key & Foreign Key part10
Primary Key & Foreign Key part10
 
Stored procedure
Stored procedureStored procedure
Stored procedure
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
 
PL/SQL Introduction and Concepts
PL/SQL Introduction and Concepts PL/SQL Introduction and Concepts
PL/SQL Introduction and Concepts
 
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
FUNCTION DEPENDENCY  AND TYPES & EXAMPLEFUNCTION DEPENDENCY  AND TYPES & EXAMPLE
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
 
Normalization PRESENTATION
Normalization PRESENTATIONNormalization PRESENTATION
Normalization PRESENTATION
 
Database Keys
Database KeysDatabase Keys
Database Keys
 
EER modeling
EER modelingEER modeling
EER modeling
 
Sql subquery
Sql  subquerySql  subquery
Sql subquery
 
DBMS: Types of keys
DBMS:  Types of keysDBMS:  Types of keys
DBMS: Types of keys
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraints
 
Relational algebra ppt
Relational algebra pptRelational algebra ppt
Relational algebra ppt
 
Basic SQL and History
 Basic SQL and History Basic SQL and History
Basic SQL and History
 
Functional dependency
Functional dependencyFunctional dependency
Functional dependency
 
Databases: Normalisation
Databases: NormalisationDatabases: Normalisation
Databases: Normalisation
 
Relational model
Relational modelRelational model
Relational model
 
Relational Data Model Introduction
Relational Data Model IntroductionRelational Data Model Introduction
Relational Data Model Introduction
 

Similar to Unit I Database concepts - RDBMS & ORACLE

Relational Database.pptx
Relational Database.pptxRelational Database.pptx
Relational Database.pptx
SubhamSarkar64
 
demo2.ppt
demo2.pptdemo2.ppt
demo2.ppt
crazyvirtue
 
Data Base Management System.pdf
Data Base Management System.pdfData Base Management System.pdf
Data Base Management System.pdf
TENZING LHADON
 
DB2 on Mainframe
DB2 on MainframeDB2 on Mainframe
DB2 on Mainframe
Skillwise Group
 
DATABASE MANAGEMENT SYSTEM
DATABASE MANAGEMENT SYSTEMDATABASE MANAGEMENT SYSTEM
DATABASE MANAGEMENT SYSTEM
Mahmud Hasan Tanvir
 
SQL
SQLSQL
Sql server ___________session_1-intro
Sql server  ___________session_1-introSql server  ___________session_1-intro
Sql server ___________session_1-intro
Ehtisham Ali
 
Relational Database Management System
Relational Database Management SystemRelational Database Management System
Relational Database Management System
Mian Abdul Raheem
 
DBMS
DBMS DBMS
relational database
relational databaserelational database
relational database
Surya Swaroop
 
Introduction to ms access database
Introduction to ms access databaseIntroduction to ms access database
Introduction to ms access database
Obuasi Senior High Technical School
 
Ch-11 Relational Databases.pptx
Ch-11 Relational Databases.pptxCh-11 Relational Databases.pptx
Ch-11 Relational Databases.pptx
ShadowDawg
 
Database system concepts
Database system conceptsDatabase system concepts
Database system conceptsKumar
 
DISE - Database Concepts
DISE - Database ConceptsDISE - Database Concepts
DISE - Database Concepts
Rasan Samarasinghe
 
Week 2 - Database System Development Lifecycle-old.pptx
Week 2 - Database System Development Lifecycle-old.pptxWeek 2 - Database System Development Lifecycle-old.pptx
Week 2 - Database System Development Lifecycle-old.pptx
NurulIzrin
 
The relational database model
The relational database modelThe relational database model
The relational database model
Dhani Ahmad
 
Dbms unit 1
Dbms unit 1Dbms unit 1
Dbms unit 1
SaiGupta18
 

Similar to Unit I Database concepts - RDBMS & ORACLE (20)

Relational Database.pptx
Relational Database.pptxRelational Database.pptx
Relational Database.pptx
 
demo2.ppt
demo2.pptdemo2.ppt
demo2.ppt
 
Data Base Management System.pdf
Data Base Management System.pdfData Base Management System.pdf
Data Base Management System.pdf
 
DB2 on Mainframe
DB2 on MainframeDB2 on Mainframe
DB2 on Mainframe
 
DATABASE MANAGEMENT SYSTEM
DATABASE MANAGEMENT SYSTEMDATABASE MANAGEMENT SYSTEM
DATABASE MANAGEMENT SYSTEM
 
People soft basics
People soft basicsPeople soft basics
People soft basics
 
SQL
SQLSQL
SQL
 
Sql server ___________session_1-intro
Sql server  ___________session_1-introSql server  ___________session_1-intro
Sql server ___________session_1-intro
 
Relational Database Management System
Relational Database Management SystemRelational Database Management System
Relational Database Management System
 
Db sys concept
Db sys conceptDb sys concept
Db sys concept
 
DBMS
DBMS DBMS
DBMS
 
relational database
relational databaserelational database
relational database
 
Introduction to ms access database
Introduction to ms access databaseIntroduction to ms access database
Introduction to ms access database
 
Ch-11 Relational Databases.pptx
Ch-11 Relational Databases.pptxCh-11 Relational Databases.pptx
Ch-11 Relational Databases.pptx
 
Database system concepts
Database system conceptsDatabase system concepts
Database system concepts
 
DISE - Database Concepts
DISE - Database ConceptsDISE - Database Concepts
DISE - Database Concepts
 
Week 2 - Database System Development Lifecycle-old.pptx
Week 2 - Database System Development Lifecycle-old.pptxWeek 2 - Database System Development Lifecycle-old.pptx
Week 2 - Database System Development Lifecycle-old.pptx
 
The relational database model
The relational database modelThe relational database model
The relational database model
 
Software Database and Testing
Software Database and TestingSoftware Database and Testing
Software Database and Testing
 
Dbms unit 1
Dbms unit 1Dbms unit 1
Dbms unit 1
 

More from DrkhanchanaR

Unit I-Data Structures_Intoduction.pptx
Unit I-Data Structures_Intoduction.pptxUnit I-Data Structures_Intoduction.pptx
Unit I-Data Structures_Intoduction.pptx
DrkhanchanaR
 
Unit 5 internal sorting &amp; files
Unit 5  internal sorting &amp; filesUnit 5  internal sorting &amp; files
Unit 5 internal sorting &amp; files
DrkhanchanaR
 
Unit 4 external sorting
Unit 4   external sortingUnit 4   external sorting
Unit 4 external sorting
DrkhanchanaR
 
Unit 3 graph chapter6
Unit 3  graph chapter6Unit 3  graph chapter6
Unit 3 graph chapter6
DrkhanchanaR
 
Unit 3 Tree chapter 5
Unit 3  Tree chapter 5Unit 3  Tree chapter 5
Unit 3 Tree chapter 5
DrkhanchanaR
 
Unit 2 linked list
Unit 2   linked listUnit 2   linked list
Unit 2 linked list
DrkhanchanaR
 
Unit I-Data structures stack & Queue
Unit I-Data structures stack & QueueUnit I-Data structures stack & Queue
Unit I-Data structures stack & Queue
DrkhanchanaR
 
Unit I - Evaluation of expression
Unit I - Evaluation of expressionUnit I - Evaluation of expression
Unit I - Evaluation of expression
DrkhanchanaR
 
Unit I- Data structures Introduction, Evaluation of Algorithms, Arrays, Spars...
Unit I- Data structures Introduction, Evaluation of Algorithms, Arrays, Spars...Unit I- Data structures Introduction, Evaluation of Algorithms, Arrays, Spars...
Unit I- Data structures Introduction, Evaluation of Algorithms, Arrays, Spars...
DrkhanchanaR
 

More from DrkhanchanaR (9)

Unit I-Data Structures_Intoduction.pptx
Unit I-Data Structures_Intoduction.pptxUnit I-Data Structures_Intoduction.pptx
Unit I-Data Structures_Intoduction.pptx
 
Unit 5 internal sorting &amp; files
Unit 5  internal sorting &amp; filesUnit 5  internal sorting &amp; files
Unit 5 internal sorting &amp; files
 
Unit 4 external sorting
Unit 4   external sortingUnit 4   external sorting
Unit 4 external sorting
 
Unit 3 graph chapter6
Unit 3  graph chapter6Unit 3  graph chapter6
Unit 3 graph chapter6
 
Unit 3 Tree chapter 5
Unit 3  Tree chapter 5Unit 3  Tree chapter 5
Unit 3 Tree chapter 5
 
Unit 2 linked list
Unit 2   linked listUnit 2   linked list
Unit 2 linked list
 
Unit I-Data structures stack & Queue
Unit I-Data structures stack & QueueUnit I-Data structures stack & Queue
Unit I-Data structures stack & Queue
 
Unit I - Evaluation of expression
Unit I - Evaluation of expressionUnit I - Evaluation of expression
Unit I - Evaluation of expression
 
Unit I- Data structures Introduction, Evaluation of Algorithms, Arrays, Spars...
Unit I- Data structures Introduction, Evaluation of Algorithms, Arrays, Spars...Unit I- Data structures Introduction, Evaluation of Algorithms, Arrays, Spars...
Unit I- Data structures Introduction, Evaluation of Algorithms, Arrays, Spars...
 

Recently uploaded

Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
deeptiverma2406
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
gb193092
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
Wasim Ak
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 

Recently uploaded (20)

Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 

Unit I Database concepts - RDBMS & ORACLE

  • 1. RDBMS & ORACLE Database concept A relational approach Dr. R. Khanchana Assistant Professor Department of Computer Science Sri Ramakrishna College of Arts and Science for Women
  • 2. CORE 8: RDBMS AND ORACLE UNIT I: Database Concepts: A Relational approach: Database – Relationships – DBMS – Relational Data Model – Integrity Rules – Theoretical Relational Languages. Database Design: Data Modeling and Normalization: Data Modeling – Dependency – Database Design – Normal forms – Dependency Diagrams – De -normalization – Another Example of Normalization. UNIT II: Oracle9i: Overview: Personal Databases – Client/Server Databases – Oracle9i an introduction – SQL *Plus Environment – SQL – Logging into SQL *Plus - SQL *Plus Commands – Errors & Help – Alternate Text Editors - SQL *Plus Worksheet - iSQL *Plus. Oracle Tables: DDL: Naming Rules and conventions – Data Types – Constraints – Creating Oracle Table – Displaying Table Information – Altering an Existing Table – Dropping, Renaming, Truncating Table – Table Types – Spooling – Error codes. UNIT III: Working with Table: Data Management and Retrieval: DML – adding a new Row/Record – Customized Prompts – Updating and Deleting an Existing Rows/Records – retrieving Data from Table – Arithmetic Operations – restricting Data with WHERE clause – Sorting – Revisiting Substitution Variables – DEFINE command – CASE structure. Functions and Grouping: Built-in functions – Grouping Data. Multiple Tables: Joins and Set operations: Join – Set operations. UNIT IV: PL/SQL: A Programming Language: History – Fundamentals – Block Structure – Comments – Data Types – Other Data Types – Declaration – Assignment operation – Bind variables – Substitution Variables – Printing – Arithmetic Operators. Control Structures and Embedded SQL: Control Structures – Nested Blocks – SQ L in PL/SQL – Data Manipulation – Transaction Control statements. PL/SQL Cursors and Exceptions: Cursors – Implicit & Explicit Cursors and Attributes – Cursor FOR loops – SELECT…FOR UPDATE – WHERE CURRENT OF clause – Cursor with Parameters – Cursor Variables – Exceptions – Types of Exceptions. UNIT V: PL/SQL Composite Data Types: Records – Tables – arrays. Named Blocks: Procedures – Functions – Packages –Triggers –Data Dictionary Views.
  • 3. Books TEXT BOOK: 1. Database Systems using Oracle, Nilesh Shah, 2nd edition, PHI. REFERENCE BOOKS: 1. Database Management Systems, Majumdar & Bhattacharya, 2007, TMH. 2. Database Management Systems, Gerald V. Post, 3rd edition, TMH.
  • 4. Data base • Electronic store of Data. • Repository that stores information about “things”. • It also contains relationships among those different “Things”.
  • 5. Basic Terms • A person, place, event or item is called on entity. • The facts describing an entity are known as data. • Each entity can be described by its characteristics, which are known as attributes. For Ex: gender, first name last name, etc… • All the related entities are collected together to form an entity set . • A database is collection of entity set • The interactions between entity sets are called relationships
  • 6. Relationships • The database design requires to create an entity set each describing a set of related entities. • Establishes all the relationship between the entity sets with in the database. • Depending on the type of interaction the relationship are classified into three categories One - to - one relationship One - to - many relationship Many - to - many relationship
  • 10. Database management system Components • DBMS software package such as micro soft access, visual fox pro, micro soft SQL server or oracle. • A user developed and implemented database or databases that includes tables , a data dictionary and other database objects. • Custom applications such as data entry form , reports, queries, blocks, and programs. • Hardware: personal computer, • Software: operating system, network operating system • Personnel: database administrator, database designer/analyst
  • 11. User Applications DBMS Database OS Software Hardware • DBMS based on the relational model is also known as RDBMS.
  • 12. Important Functions managed by Database • Meta data • All day to day transactions. • Book keeping • Transforms logical data requests to match physical data structure. • Data Validation • Access Security • Data Security • Data Sharing • Import and export utilities
  • 13. Types of Database Models Relational Model Hierarchical Model Network Model Object Model
  • 20. The Relational Database Model • The relational is represented by two dimensional flat Structure know as a table. • Data base system that manages a relational database environment is know as a relational database management system. • A table is a matrix of rows and columns where – each row represents an Record and each column represents an Attribute.
  • 21. The Relational Database Model • Tuple / Record - Row • Attribute / Field - Column • Degree - number of column in an table • Domain - Set of all possible values that a column may have • Key - Minimal set of columns use to uniquely define any row in a table.
  • 22. Table
  • 24. Types of Keys Need for indentifying uniquely any row of data in a table. • Super Key – A key with super set of all possibilities. • Candidate key- Minimal set of super key • Primary key - A single column is used as a unique identifier • Composite key- A combination of a column is used as a unique identifier (Composite Primary key) • Secondary key - A more human approach is used to identify or retrieve a row from a table • Surrogate key - An extra column as a primary key instead of using a composite key • Foreign key - A column in a table that references a column in another table
  • 25. Keys -Example • Candidate keys • SID • REGID • EMAILID • Foreign Key • BRANCHID • Super keys • Not Candidate key • SID +REGID • REGID +EMAILID • EMAILID +SID • SID+REGID+EMAILID SID REGID NAME BRANCHCOD E EMAILID 1 12_CS Adam CS adamcs@yahoo.com 2 13_CA Adam CA adamca@yahoo.co.in 3 11_IT John IT johnit@gmail.com 4 14_CS Esitha CS esithacs@yahoo.com • Primary Keys • REGID BRANCH CODE BRANCH NAME CS Compuer Science IT Information Technology CA Computer Application
  • 28. Assignment • July 7 /2020 – Draw an E – R Diagram for Customer and Products Outcome
  • 31. Integrity Rules • Entity –integrity: No column in a primary key may be null. The primary key provides the means of uniquely identifying a row or an entity. • A Null value means a value that is not known , not entered, not defined, or not applicable. • A zero is not considered to be a null value. • Referential-integrity: A foreign key value may be a null value, or it must exist as a value of a primary key in referenced table.
  • 32. Theoretical Relational languages • Relational algebra, a procedural language. • Relational calculus, a nonprocedural language. • Third- generations high level complier languages can be used to manipulate data in a table, but they can only work with one row at a time. • The database systems non procedural structured query language is used as a data manipulation sub language
  • 33. Relational algebra • The relational algebra is a procedural language • Set of operations –Union –Intersection –Difference –Projection –Selection –Product –Assignment –Join –Division
  • 34. Union • Union of two tables results in retrieval of all rows that are in one or both tables. • The duplicate rows are eliminated from the resulting table. • Basic requirement • Both tables must have the same degree. • The domains of the corresponding columns in two tables must be same .
  • 35. Union –Example 1 Result = Table1 Union Table 2
  • 36. Union –Example 2 EMP_TESTDEISGN = EMP_TEST UNION EMP_DESIGN
  • 37. Intersection • Intersection of two tables produces a table with rows that are in both tables. • The two tables must be union compatible to perform an intersection on them.
  • 39. Intersection –Example 2 STUD_INS = STUDENT INTERSECTION INSTRUCTOR STUD_INS
  • 40. Projection • Projection operation allows us to create a table based on desirable columns from all existing column in a table. • The projection operation returns the “Vertical Slices” of a table.
  • 41. Difference • The intersection of two tables produces a table with rows that are present in the first table but not in the second table. • The difference can be performed on union compatible tables only.
  • 42. Difference -Example RES_TABLE = R - S RESULT_TABLE = S - R RES_TABLE RESULT_TABLE
  • 43. Selection • Selection operation selects the rows from a table based on condition or conditions. • The conditional (=,< >,>,>=,<,<=)and the logical operators(AND, OR,NOT) are used along with columns and value to create conditions. • The selection operation returns “Horizontal Slices” .
  • 44. Selection -Example EMPLOYEE E_SAL E_SAL = Sel (EMPLOYEE : sal > 500)
  • 45. Product Example• The product of two tables is a combination every thing in both tables. • It is also known as a Cartesian product. C= A *B A B C
  • 46. Assignment • The operation creates a new table from existing table • Table_New = E_SAL Table_New Old Table Name New Table Name
  • 47. Division - Example Proj No 1 2 3 Proj No PartNo 1 11 2 33 3 11 1 22 2 11 PROJECT PROJPARTS PartNo 11 PARTS PARTS = PROJPARTS / PROJECT
  • 48. Join • The join is one of the most important operations because of ability to get related data from a number of tables. • The join is based on common set of values. • Other types of joins: – Natural join – Equijoin – Outer join – Non equijoin – Self join
  • 49. Join – Example COM_PRO = Join(PRODUCT,COMPANY: COMPANY_ID = COMPANY_ID) PRODUCT COMPANY COM_PRO
  • 50. Division • Division operation is most difficult operation to comprehend • It is not as simple as division in mathematics. • In relational algebra it identifies rows in one table that have a certain relationship to all rows in another table.
  • 52. Assignment • Create Student and Department table and perform all Algebra operations