Sunteți pe pagina 1din 24

Introduction To Oracle

By

Lalit Jain
What Is Data?
• Data Is A Collection Of Facts, Figures And Statistics
Related To An Object.
• Data Can Be Processed To Create Useful
Information.
• Data Is A Valuable Asset For An Organization.
• Data Can Be Used By The Managers To Perform
Effective And Successful Operations Of
Management.
• It Also Enables The User To Make Better Decision
For Future.
• Data Is Very Useful For Generating Reports, Graphs
And Statistics.
Lalit Jain
Example
• Students Fill An Admission Form When
They Get Admission In College.
• The Form Consists Of Raw Facts About
The Students.
• These Raw Facts Are Student's Name,
Father Name, Address Etc.
• The Purpose Of Collecting This Data Is To
Maintain The Records Of The Students
During Their Study Period In The College.
Lalit Jain
What is Information?

• The Manipulated And Processed Form Of


Data Is Called Information.
• It Is More Meaningful Than Data.
• It Is Used For Making Decisions.
• Data Is Used As Input For Processing And
Information I Output Of This Processing.

Lalit Jain
Example

• Data collected from census is used to generate


different type of information.
• The government can use it to determine the
literacy rate in the country.
• Government can use the information in
important decision to improve literacy rate.

Lalit Jain
What Is Database?

• Databases Are Designed To Offer An Organized Mechanism For


Storing, Managing And Retrieving Information.
• They Do So Through The Use Of Tables.(Example Excel Sheets).
• Database Tables:
– Database Tables Consist Of Columns And Rows.
– For Example, Imagine That We Were Building A
Database Table That Contained Names And
Telephone Numbers. We’d Probably Set Up
Columns Named “First Name”, “Last Name” And
“Telephone Number.”

Lalit Jain
Database Management System?

• A Database Management System


(DBMS) Is A Set Of Computer
Programs That Controls The
Creation, Maintenance, And The Use
Of A Database.

Lalit Jain
Concepts Of RDMS
• Relational Database Management System.
• It Is Used To Established Relationships Between The
Data In A Database To Ensure The Integrity Of The
Data.
• These Relationships Enable You To Prevent Users
From Entering Incorrect Data.
• The Data In RDBMS Is Stored In Database Objects
Called Tables.
• A Table Is A Collections Of Related Data Entries And
It Consists Of Columns And Rows.

Lalit Jain
DBMS v/s RDBMS

• NOTE: Though both deal with handling data(which


includes storing,deleting,retrieving,inserting and updating
data).
• The difference is that in DBMS, the data however large ,
is stored in a single table.
• Whereas in Rdbms the data that is to be stored is split
appropriately into many tables.
• A common database name and these different tables
dealing with the same type of data are related to each
other by defining certain relations(so the name 'R'dbms
i.e. relational).

Lalit Jain
EXAMPLE

• Consider The Database To Store Student Records.


• In DBMS,all details like name,roll,marks,street,city,state,
phone will be stored in a single table.
• But in Rdbms ,the database is splitted something like the
name,marks,roll under the 'student details' table.
• And the street,city,state,phone under the 'Contacts'
table.
• Any information to be obtained is done by the properly
relating the 'student details‘ and 'contacts' tables.
• DBMS offers a very limited scope for data retrieval using
queries when compared to Rdbms.

Lalit Jain
EXAMPLE

• DBMS Example:
• Oracle
• DB2
• SQL Server
• Access

• RDMS EXAMPLE:
• Oracle
• DB2
• SQL Server
• Access

Lalit Jain
Define Normalization

• Normalization Is The Process Of Designing A


Data Model To Efficiently Store Data In A
Database.

• The End Result Is That Redundant Data Is


Eliminated, And Only Data Related To The
Attribute Is Stored Within The Table.

Lalit Jain
Advantages Of Normalization

• Smaller Database:
– By Eliminating Duplicate Data, You Will Be Able
To Reduce The Overall Size Of The Database.
• Better Performance:
– Narrow Tables: Having More Fine-tuned Tables
Allows Your Tables To Have Less Columns And
Allows You To Fit More Records Per Data Page.
– Fewer Indexes Per Table Mean Faster
Maintenance Tasks Such As Index Rebuilds.
– Only Join Tables That You Need.

Lalit Jain
Disadvantages Of Normalization

• More Tables To Join:


– By Spreading Out Your Data Into More Tables,
You Increase The Need To Join Tables.
• Tables Contain Codes Instead Of Real Data:
– Repeated Data Is Stored As Codes Rather Than
Meaningful Data. Therefore, There Is Always A
Need To Go To The Lookup Table For The Value.
• Data Model Is Difficult To Query Against:
– The Data Model Is Optimized For Applications,
Not For Ad Hoc Querying.

Lalit Jain
Normalization Rules
• There Are Various Types Of Normalization
Rules Defined Which As Followed:-

– First Normal Form(1NF)

– Second Normal Form(2NF)

– Third Normal Form(3NF)

Lalit Jain
First Normal Form(1NF)
• This Is The "Basic" Level Of Normalization And
Generally Corresponds To The Definition Of Any
Database, Namely:
– It Contains Two-dimensional Tables With Rows And
Columns.

– Each Row Represents A Unique Instance (That Is, No


Duplicate Rows Are Possible).

– All Entries In Any Column Must Be Of The Same


Kind.

Lalit Jain
Example On 1NF
• Table Not In 1NF State:
• Table Name: Software_Details

COMPUTER SOFTWARE
1 Word

2 Access, Word, Excel

3 Word , Excel

• Eliminate Repeating Groups. This Table Contains


Repeating Groups Of Data In The Software Column.

Lalit Jain
Solution
• To Follow The First Normal Form, We Store One
Type Of Software For Each Record.
• Table Name: Software_Details
COMPUTER SOFTWARE
1 Word

2 Access

2 Word

2 Excel

3 Word

3 Excel

Lalit Jain
Second Normal Form(2NF)

• A Table Is Said To Be In 2NF If It Is In 1NF And There


Are No Partial Dependencies
• I.E. Every Non Primary Key Attribute Of The Table Is
Fully Functionally Dependent On The Primary Key.
COMPUTER SOFTWARE
1 Word
2 Access
2 Word

2 Excel

3 Word

3 Excel

Lalit Jain
Solution
• To Eliminate The Redundant Storage Of Data, We Create Two
Tables. The First Table Stores A Reference Softwareid To Our
New Table That Has A Unique List Of Software Titles.
• Table : Software_Details Table: SoftwareId_Details
COMPUTER SOFTWAREID SOFTWAREID SOFTWARE
1 1 1 Word
2 2 2 Access
2 1 3 Excel

2 3

3 1

3 3

Lalit Jain
Third Normal Form(3NF)

• Eliminate Columns Not Dependent On Key Plus 1NF And


2NF.

• Table: Details
Computer UserName UserHireDate Purchased

1 Lalit 4/1/2000 5/1/2003

2 Suresh 9/5/2003 6/15/2004

Lalit Jain
Solution
Table:Computer_Purchased
Computer Purchased

1 5/1/2003
2 6/15/2004

Table:User_Details Table:Computer_Details
UserHire User Computer
User UserName
Date
1 5/1/2003
1 Lalit 4/1/2000
2 6/15/2004

2 Suresh 9/5/2003

Lalit Jain
Denormalization

• Denormalization Is The Process Of Attempting To


Optimize The Performance Of A Database By
Adding Redundant Data Or By Grouping Data.

• In Some Cases, Denormalization Helps Cover Up


The Inefficiencies Inherent In Relational Database
Software.

• A Relational Normalized Database Imposes A


Heavy Access Load Over Physical Storage Of Data
Even If It Is Well Tuned For High Performance.
Lalit Jain
Thank You

Lalit Jain

S-ar putea să vă placă și