SlideShare a Scribd company logo
1 of 46
Download to read offline
SQL Fundamentals
Oracle 11g
M U H A M M A D WA H E E D
O R A C L E D ATA B A S E D E VE L O P E R
E M A I L : m.w a h e e d 3 6 6 8 @ g ma i l . c om
.
1
Lecture#1
Introduction
2
How to achieve certificate?
•Attendance
•Quizzes
•Assignments
•Final( if possible)
3
Course Policies
•All deadlines will be hard.
•Reading assignments are expected to be read before next lecture.
•Anyone may be asked to describe the summary or a particular
discussion from the same.
4
Course Policies(cont’d)
Exams/Quizzes can be from the following:
• Current lecture
• Material covered in any previous lecture
• Reading assignments
• From any assigned homework.
5
Course Policies(cont’d)
•Quizzes will be unannounced some time.
•They will be taken either in the first ten minutes of the class (so come to
the class on time & be prepared!) or in the last ten minutes of the class
(so listen to the lecture carefully).
6
Course Includes
•20 % theory
•80% Practical
•You are required to have laptop in each class to complete practical work
7
How Much this course
Valuable?
After the SUCCESSFUL completion of this course
you can appear for the following oracle exams
•1Z0-051:OracleDatabase 11g: SQL Fundamentals I
•1Z0-061:OracleDatabase 12c: SQL Fundamentals
•1Z0-071:OracleDatabase SQL Fundamentals
8
Database
•What is Database?
Databaseis an organizedcollection of logically relateddata that is
stored in an efficientand compact manner.
•Organized means data stored in a way that is easy to use.
•Logically related term refers to the topic of interest.
•Efficient means data can be accessed quickly.
•Compact is used for the storage optimization.
•Example :
Campus ManagementSystem(CMS), UAAR.
9
Data vs Information
1. Data should be arranged/structured in such a way that one can effectively process it
when necessary.
Example : Data about student
Unorganized Data:
Muhammadwaheeduiit12-arid-197124
Muhammad,waheeduiit12-arid-197124
 difficult to distinguish between L name and dept then between arid no and age.
Organized Data:
Muhammad#waheed#uiit#12-arid-1971#24
OR
Muhammad
Waheed
Uiit
12-arid-1971
24
10
Data vs Information (cont’d)
Simple difference between data and information is that information is
data that have been processed in such a way that the knowledge of
the person who uses the data is increased. Example
Muhammad
waheed
uiit
12-arid-1971
24
11
Cont’d
From above data we can obtain some knowledge on the base of guess.
This data can be converted into information by doing some process as
follow. Student
adding a few additional data items and providing some structure. After
that we recognize that it’s a data of some student; f name, l name ,dept,
age and reg no.
12
F Name L name Dept Age Reg no
Muhammad Waheed Uiit 24 12-arid-1971
Metadata
•Dataabout data is called metadata.
•Just like in above examplef_name, l_name ,dept, age, and reg no is a
data that is used to describe actual data. So this additional data is called
metadata.
13
Some Database Terminologies
•Table/Relation/File/Entity/object
•Tuple/row/record
•Attribute/Column/Field
•Metadata/Data about Data/Domain/Data
Dictionary
14
Database
Terminologies(cont’d)
F Name L name Dept Age Reg no
Muhamma
d
Waheed Uiit 20 12-arid-xyz
Danyal Khan Uiit 20 12-arid-xyz
Shabano Malik Uiit 20 12-arid-xyz
Humza Hamid Uiit 24 12-arid-xyz
15
Student TableAttribute
Metadata
Records
Data
Entity-Relationship Daigrams
16
•Entity
•Attribute
•Relationship
•Cardinality
ERD(cont’d)
Entities
17
ERD(cont’d)
Attribute
18
ERD(cont’d)
Relationship
19
ERD(cont’d)
Cardinality
20
DatabaseKeys
Databasesupports the following types of keys.
•Super Key
•Candidate Key
•Primary Key
•Unique Key
•Composite Key
21
Cont’d
•Foreign Key
•Natural Key
•Surrogate Key
22
Example
23
Super key
Super key is a set of one or more than one keys that can be used to
uniquely identify the record in Table.
•Branch_Id
•Branch_Name
•Branch_Code
•{ Branch_Id, Branch_Code }
•{ Branch_Name , Branch_Code }
24
Super keys
Student_Information Table:
•Student_Id
•College_Id
•Rtu_Roll_No
•{ Student_Id, Student_Name}
•{ College_Id, Branch_Id }
•{ Rtu_Roll_No, Session }
25
Candidate key
•A Candidate key is an attribute or set of attributes that uniquely
identifies a record.
• Among the set of candidate, one candidate key is chosen as Primary
Key.
• table can have multiple candidate key but each table can have
maximum one primary key.
26
Example
Possible Candidate Keys in Branch_Info table.
•Branch_Id
•Branch_Name
•Branch_Code
27
Primary key
•Selected from Candidate keys
•Unique and not null
•Can be more than one Attributes
•Example:
Branch_Id, College_Id
28
Alternate key/Secondary key
•Alternate keys are candidate keys that are not selected as primary key.
•Alternate key can also work as a primary key.
•Alternate key is also called “Secondary Key”.
•Example:
Branch_Name, Branch_Code, Student_Id, Rtu_Roll_No
29
Unique Key
•Unique key is similar to primary key but unique key field can contain a
“Null” value but primary key doesn’t allow “Null” value.
•Example:
Branch_Name, Rtu_Roll_No
30
Composite key/Compound key
•Composite key is a combination of more than one attributes.
•It is also known as “Compound” key.
•A composite key may be a candidate or primary key.
•Example:
{ Branch_Name, Branch_Code}
{ Student_Id, Student_Name }
31
Natural Key/Business
key/Domain Key
•A natural key is a key composed of columns that actually have a logical
relationship to other columns within a table.
• Example:
if we use Student_Id, Student_Name and Father_Name columns to
form a key then it would be “Natural Key”
32
Surrogate key
•It is an artificial key that is used to uniquely identify the record in table.
It can either be used just for simple sequential number.
•Example:
Sql server “is identity”, Ms access “auto number”
33
Foreign key
•Foreign key is used to generate the relationship between the tables.
•Foreign Key is a field in database table that is Primary key in another
table.
•Example:
Branch_Id is a Foreign Key in Student_Information table and related
primary key existin Branch_Info(Branch_Id) table.
34
Keys confusion?
35
Ok Only Remember Two
i.e. Primary, Foriegn
Conclusion
Databasegenerally only contain Primary Key, Foreign Key, Unique Key
and Surrogate key (some time) and other remaining keys are just
concept.
36
Short Quiz
•Why we Using Keys?
•What is P.K?
•What is F.k?
•F.K can be null?
•F.K Can be Duplicate?
•What is parent Table ?
•What is child Table?
37

What is DBMS
An application software/tool that is used to create , maintain and
provide control access/security to database is called DBMS.
•Oracle RDBMS
•MS SQL server
•IBM DB2
•Mysql
•Postgre sql
•Mongo DB
38
DBMS?
•Is MS Access a DBMS?
•Is MS Excel a DBMS?
•Real world databaseapplication examples?
39
Popularity & Demand of the Tool
Oracle on which we will work?
40
Architecture of Oracle DB Apps
Oracle 6i
41
3- tier
42
What is Oracle GUI Tier?
Oracle Forms
43
Oracle Reports
44
Home Work (Ans with Example)
•What is data, entity, domain ,referential and User-Defined Integrity.
•Datatypes in oracle 11g.
•How to select Candidate keys from super keys?
•How to select P.K from candidate keys?
45
Your Suggestions?
“Connecting with Student is not hard. I like the interaction and the
feedback after Lecture”
46

More Related Content

Similar to SQL Fundamentals (Oracle 11g) - Lecture 1

Instant search - A hands-on tutorial
Instant search  - A hands-on tutorialInstant search  - A hands-on tutorial
Instant search - A hands-on tutorialGanesh Venkataraman
 
Types Of Keys in DBMS
Types Of Keys in DBMSTypes Of Keys in DBMS
Types Of Keys in DBMSPadamNepal1
 
Chapter-5 The Relational Data Model
Chapter-5 The Relational Data ModelChapter-5 The Relational Data Model
Chapter-5 The Relational Data ModelKunal Anand
 
unit01-Activity-SQL-Query-Review-1.pptx
unit01-Activity-SQL-Query-Review-1.pptxunit01-Activity-SQL-Query-Review-1.pptx
unit01-Activity-SQL-Query-Review-1.pptxAnesElmouaddeb
 
Database Systems - Lecture Week 1
Database Systems - Lecture Week 1Database Systems - Lecture Week 1
Database Systems - Lecture Week 1Dios Kurniawan
 
Data Quality: Are Your Data Suitable For Answering Your Questions? - Experfy ...
Data Quality: Are Your Data Suitable For Answering Your Questions? - Experfy ...Data Quality: Are Your Data Suitable For Answering Your Questions? - Experfy ...
Data Quality: Are Your Data Suitable For Answering Your Questions? - Experfy ...Experfy
 
week1-thursday-2id50-q2-2021-2022-intro-and-basic-fd.ppt
week1-thursday-2id50-q2-2021-2022-intro-and-basic-fd.pptweek1-thursday-2id50-q2-2021-2022-intro-and-basic-fd.ppt
week1-thursday-2id50-q2-2021-2022-intro-and-basic-fd.pptRidoVercascade
 
c++ computer programming language datatypes ,operators,Lecture 03 04
c++ computer programming language datatypes ,operators,Lecture 03 04c++ computer programming language datatypes ,operators,Lecture 03 04
c++ computer programming language datatypes ,operators,Lecture 03 04jabirMemon
 
Big Data LDN 2018: TIPS AND TRICKS TO WRANGLE BIG, DIRTY DATA
Big Data LDN 2018: TIPS AND TRICKS TO WRANGLE BIG, DIRTY DATABig Data LDN 2018: TIPS AND TRICKS TO WRANGLE BIG, DIRTY DATA
Big Data LDN 2018: TIPS AND TRICKS TO WRANGLE BIG, DIRTY DATAMatt Stubbs
 
introduction to database
 introduction to database introduction to database
introduction to databaseAkif shexi
 
Requirements analysis.pptx
Requirements analysis.pptxRequirements analysis.pptx
Requirements analysis.pptxazida3
 
Requirments Elicitation.pptx
Requirments Elicitation.pptxRequirments Elicitation.pptx
Requirments Elicitation.pptxazida3
 
Tools and Methodology for Research: Article Reading
Tools and Methodology for Research: Article ReadingTools and Methodology for Research: Article Reading
Tools and Methodology for Research: Article ReadingYannick Prié (Enseignement)
 

Similar to SQL Fundamentals (Oracle 11g) - Lecture 1 (20)

RelationalDBs3.ppt
RelationalDBs3.pptRelationalDBs3.ppt
RelationalDBs3.ppt
 
Instant search - A hands-on tutorial
Instant search  - A hands-on tutorialInstant search  - A hands-on tutorial
Instant search - A hands-on tutorial
 
Types Of Keys in DBMS
Types Of Keys in DBMSTypes Of Keys in DBMS
Types Of Keys in DBMS
 
computer-210809080138.pdf
computer-210809080138.pdfcomputer-210809080138.pdf
computer-210809080138.pdf
 
Chapter-5 The Relational Data Model
Chapter-5 The Relational Data ModelChapter-5 The Relational Data Model
Chapter-5 The Relational Data Model
 
Types of keys in database management system by Dr. Kamal Gulati
Types of keys in database management system by Dr. Kamal GulatiTypes of keys in database management system by Dr. Kamal Gulati
Types of keys in database management system by Dr. Kamal Gulati
 
unit01-Activity-SQL-Query-Review-1.pptx
unit01-Activity-SQL-Query-Review-1.pptxunit01-Activity-SQL-Query-Review-1.pptx
unit01-Activity-SQL-Query-Review-1.pptx
 
DBMS:Relational Modal
DBMS:Relational ModalDBMS:Relational Modal
DBMS:Relational Modal
 
DBMS
DBMSDBMS
DBMS
 
Database Systems - Lecture Week 1
Database Systems - Lecture Week 1Database Systems - Lecture Week 1
Database Systems - Lecture Week 1
 
Data Quality: Are Your Data Suitable For Answering Your Questions? - Experfy ...
Data Quality: Are Your Data Suitable For Answering Your Questions? - Experfy ...Data Quality: Are Your Data Suitable For Answering Your Questions? - Experfy ...
Data Quality: Are Your Data Suitable For Answering Your Questions? - Experfy ...
 
week1-thursday-2id50-q2-2021-2022-intro-and-basic-fd.ppt
week1-thursday-2id50-q2-2021-2022-intro-and-basic-fd.pptweek1-thursday-2id50-q2-2021-2022-intro-and-basic-fd.ppt
week1-thursday-2id50-q2-2021-2022-intro-and-basic-fd.ppt
 
c++ computer programming language datatypes ,operators,Lecture 03 04
c++ computer programming language datatypes ,operators,Lecture 03 04c++ computer programming language datatypes ,operators,Lecture 03 04
c++ computer programming language datatypes ,operators,Lecture 03 04
 
MS ACCESS
MS ACCESSMS ACCESS
MS ACCESS
 
Big Data LDN 2018: TIPS AND TRICKS TO WRANGLE BIG, DIRTY DATA
Big Data LDN 2018: TIPS AND TRICKS TO WRANGLE BIG, DIRTY DATABig Data LDN 2018: TIPS AND TRICKS TO WRANGLE BIG, DIRTY DATA
Big Data LDN 2018: TIPS AND TRICKS TO WRANGLE BIG, DIRTY DATA
 
introduction to database
 introduction to database introduction to database
introduction to database
 
Requirements analysis.pptx
Requirements analysis.pptxRequirements analysis.pptx
Requirements analysis.pptx
 
Requirments Elicitation.pptx
Requirments Elicitation.pptxRequirments Elicitation.pptx
Requirments Elicitation.pptx
 
Data Retrival
Data RetrivalData Retrival
Data Retrival
 
Tools and Methodology for Research: Article Reading
Tools and Methodology for Research: Article ReadingTools and Methodology for Research: Article Reading
Tools and Methodology for Research: Article Reading
 

More from MuhammadWaheed44

SQL Readable Outputs - Oracle SQL Fundamentals
SQL Readable Outputs - Oracle SQL FundamentalsSQL Readable Outputs - Oracle SQL Fundamentals
SQL Readable Outputs - Oracle SQL FundamentalsMuhammadWaheed44
 
SQL Subqueries - Oracle SQL Fundamentals
SQL Subqueries - Oracle SQL FundamentalsSQL Subqueries - Oracle SQL Fundamentals
SQL Subqueries - Oracle SQL FundamentalsMuhammadWaheed44
 
SQL Joins - Oracle SQL Fundamentals
SQL Joins - Oracle SQL FundamentalsSQL Joins - Oracle SQL Fundamentals
SQL Joins - Oracle SQL FundamentalsMuhammadWaheed44
 
SQL Functions - Oracle SQL Fundamentals
SQL Functions - Oracle SQL FundamentalsSQL Functions - Oracle SQL Fundamentals
SQL Functions - Oracle SQL FundamentalsMuhammadWaheed44
 
SQL Functions - Oracle SQL Fundamentals
SQL Functions - Oracle SQL FundamentalsSQL Functions - Oracle SQL Fundamentals
SQL Functions - Oracle SQL FundamentalsMuhammadWaheed44
 
Basics of SELECT Statement - Oracle SQL
Basics of SELECT Statement - Oracle SQL Basics of SELECT Statement - Oracle SQL
Basics of SELECT Statement - Oracle SQL MuhammadWaheed44
 
Data Manipulation(DML) and Transaction Control (TCL)
Data Manipulation(DML) and Transaction Control (TCL)  Data Manipulation(DML) and Transaction Control (TCL)
Data Manipulation(DML) and Transaction Control (TCL) MuhammadWaheed44
 
Oracle SQL Fundamentals - Lecture 3
Oracle SQL Fundamentals - Lecture 3Oracle SQL Fundamentals - Lecture 3
Oracle SQL Fundamentals - Lecture 3MuhammadWaheed44
 
SQL Fundamentals - Lecture 2
SQL Fundamentals - Lecture 2SQL Fundamentals - Lecture 2
SQL Fundamentals - Lecture 2MuhammadWaheed44
 

More from MuhammadWaheed44 (9)

SQL Readable Outputs - Oracle SQL Fundamentals
SQL Readable Outputs - Oracle SQL FundamentalsSQL Readable Outputs - Oracle SQL Fundamentals
SQL Readable Outputs - Oracle SQL Fundamentals
 
SQL Subqueries - Oracle SQL Fundamentals
SQL Subqueries - Oracle SQL FundamentalsSQL Subqueries - Oracle SQL Fundamentals
SQL Subqueries - Oracle SQL Fundamentals
 
SQL Joins - Oracle SQL Fundamentals
SQL Joins - Oracle SQL FundamentalsSQL Joins - Oracle SQL Fundamentals
SQL Joins - Oracle SQL Fundamentals
 
SQL Functions - Oracle SQL Fundamentals
SQL Functions - Oracle SQL FundamentalsSQL Functions - Oracle SQL Fundamentals
SQL Functions - Oracle SQL Fundamentals
 
SQL Functions - Oracle SQL Fundamentals
SQL Functions - Oracle SQL FundamentalsSQL Functions - Oracle SQL Fundamentals
SQL Functions - Oracle SQL Fundamentals
 
Basics of SELECT Statement - Oracle SQL
Basics of SELECT Statement - Oracle SQL Basics of SELECT Statement - Oracle SQL
Basics of SELECT Statement - Oracle SQL
 
Data Manipulation(DML) and Transaction Control (TCL)
Data Manipulation(DML) and Transaction Control (TCL)  Data Manipulation(DML) and Transaction Control (TCL)
Data Manipulation(DML) and Transaction Control (TCL)
 
Oracle SQL Fundamentals - Lecture 3
Oracle SQL Fundamentals - Lecture 3Oracle SQL Fundamentals - Lecture 3
Oracle SQL Fundamentals - Lecture 3
 
SQL Fundamentals - Lecture 2
SQL Fundamentals - Lecture 2SQL Fundamentals - Lecture 2
SQL Fundamentals - Lecture 2
 

Recently uploaded

Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 

Recently uploaded (20)

Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 

SQL Fundamentals (Oracle 11g) - Lecture 1

  • 1. SQL Fundamentals Oracle 11g M U H A M M A D WA H E E D O R A C L E D ATA B A S E D E VE L O P E R E M A I L : m.w a h e e d 3 6 6 8 @ g ma i l . c om . 1 Lecture#1
  • 3. How to achieve certificate? •Attendance •Quizzes •Assignments •Final( if possible) 3
  • 4. Course Policies •All deadlines will be hard. •Reading assignments are expected to be read before next lecture. •Anyone may be asked to describe the summary or a particular discussion from the same. 4
  • 5. Course Policies(cont’d) Exams/Quizzes can be from the following: • Current lecture • Material covered in any previous lecture • Reading assignments • From any assigned homework. 5
  • 6. Course Policies(cont’d) •Quizzes will be unannounced some time. •They will be taken either in the first ten minutes of the class (so come to the class on time & be prepared!) or in the last ten minutes of the class (so listen to the lecture carefully). 6
  • 7. Course Includes •20 % theory •80% Practical •You are required to have laptop in each class to complete practical work 7
  • 8. How Much this course Valuable? After the SUCCESSFUL completion of this course you can appear for the following oracle exams •1Z0-051:OracleDatabase 11g: SQL Fundamentals I •1Z0-061:OracleDatabase 12c: SQL Fundamentals •1Z0-071:OracleDatabase SQL Fundamentals 8
  • 9. Database •What is Database? Databaseis an organizedcollection of logically relateddata that is stored in an efficientand compact manner. •Organized means data stored in a way that is easy to use. •Logically related term refers to the topic of interest. •Efficient means data can be accessed quickly. •Compact is used for the storage optimization. •Example : Campus ManagementSystem(CMS), UAAR. 9
  • 10. Data vs Information 1. Data should be arranged/structured in such a way that one can effectively process it when necessary. Example : Data about student Unorganized Data: Muhammadwaheeduiit12-arid-197124 Muhammad,waheeduiit12-arid-197124  difficult to distinguish between L name and dept then between arid no and age. Organized Data: Muhammad#waheed#uiit#12-arid-1971#24 OR Muhammad Waheed Uiit 12-arid-1971 24 10
  • 11. Data vs Information (cont’d) Simple difference between data and information is that information is data that have been processed in such a way that the knowledge of the person who uses the data is increased. Example Muhammad waheed uiit 12-arid-1971 24 11
  • 12. Cont’d From above data we can obtain some knowledge on the base of guess. This data can be converted into information by doing some process as follow. Student adding a few additional data items and providing some structure. After that we recognize that it’s a data of some student; f name, l name ,dept, age and reg no. 12 F Name L name Dept Age Reg no Muhammad Waheed Uiit 24 12-arid-1971
  • 13. Metadata •Dataabout data is called metadata. •Just like in above examplef_name, l_name ,dept, age, and reg no is a data that is used to describe actual data. So this additional data is called metadata. 13
  • 15. Database Terminologies(cont’d) F Name L name Dept Age Reg no Muhamma d Waheed Uiit 20 12-arid-xyz Danyal Khan Uiit 20 12-arid-xyz Shabano Malik Uiit 20 12-arid-xyz Humza Hamid Uiit 24 12-arid-xyz 15 Student TableAttribute Metadata Records Data
  • 21. DatabaseKeys Databasesupports the following types of keys. •Super Key •Candidate Key •Primary Key •Unique Key •Composite Key 21
  • 24. Super key Super key is a set of one or more than one keys that can be used to uniquely identify the record in Table. •Branch_Id •Branch_Name •Branch_Code •{ Branch_Id, Branch_Code } •{ Branch_Name , Branch_Code } 24
  • 25. Super keys Student_Information Table: •Student_Id •College_Id •Rtu_Roll_No •{ Student_Id, Student_Name} •{ College_Id, Branch_Id } •{ Rtu_Roll_No, Session } 25
  • 26. Candidate key •A Candidate key is an attribute or set of attributes that uniquely identifies a record. • Among the set of candidate, one candidate key is chosen as Primary Key. • table can have multiple candidate key but each table can have maximum one primary key. 26
  • 27. Example Possible Candidate Keys in Branch_Info table. •Branch_Id •Branch_Name •Branch_Code 27
  • 28. Primary key •Selected from Candidate keys •Unique and not null •Can be more than one Attributes •Example: Branch_Id, College_Id 28
  • 29. Alternate key/Secondary key •Alternate keys are candidate keys that are not selected as primary key. •Alternate key can also work as a primary key. •Alternate key is also called “Secondary Key”. •Example: Branch_Name, Branch_Code, Student_Id, Rtu_Roll_No 29
  • 30. Unique Key •Unique key is similar to primary key but unique key field can contain a “Null” value but primary key doesn’t allow “Null” value. •Example: Branch_Name, Rtu_Roll_No 30
  • 31. Composite key/Compound key •Composite key is a combination of more than one attributes. •It is also known as “Compound” key. •A composite key may be a candidate or primary key. •Example: { Branch_Name, Branch_Code} { Student_Id, Student_Name } 31
  • 32. Natural Key/Business key/Domain Key •A natural key is a key composed of columns that actually have a logical relationship to other columns within a table. • Example: if we use Student_Id, Student_Name and Father_Name columns to form a key then it would be “Natural Key” 32
  • 33. Surrogate key •It is an artificial key that is used to uniquely identify the record in table. It can either be used just for simple sequential number. •Example: Sql server “is identity”, Ms access “auto number” 33
  • 34. Foreign key •Foreign key is used to generate the relationship between the tables. •Foreign Key is a field in database table that is Primary key in another table. •Example: Branch_Id is a Foreign Key in Student_Information table and related primary key existin Branch_Info(Branch_Id) table. 34
  • 35. Keys confusion? 35 Ok Only Remember Two i.e. Primary, Foriegn
  • 36. Conclusion Databasegenerally only contain Primary Key, Foreign Key, Unique Key and Surrogate key (some time) and other remaining keys are just concept. 36
  • 37. Short Quiz •Why we Using Keys? •What is P.K? •What is F.k? •F.K can be null? •F.K Can be Duplicate? •What is parent Table ? •What is child Table? 37 
  • 38. What is DBMS An application software/tool that is used to create , maintain and provide control access/security to database is called DBMS. •Oracle RDBMS •MS SQL server •IBM DB2 •Mysql •Postgre sql •Mongo DB 38
  • 39. DBMS? •Is MS Access a DBMS? •Is MS Excel a DBMS? •Real world databaseapplication examples? 39
  • 40. Popularity & Demand of the Tool Oracle on which we will work? 40
  • 41. Architecture of Oracle DB Apps Oracle 6i 41
  • 43. What is Oracle GUI Tier? Oracle Forms 43
  • 45. Home Work (Ans with Example) •What is data, entity, domain ,referential and User-Defined Integrity. •Datatypes in oracle 11g. •How to select Candidate keys from super keys? •How to select P.K from candidate keys? 45
  • 46. Your Suggestions? “Connecting with Student is not hard. I like the interaction and the feedback after Lecture” 46