Presentation is loading. Please wait.

Presentation is loading. Please wait.

DATABASE CONCEPT Class XI Presented by : Dinesh Patel PGT [Comp. Sc.]

Similar presentations


Presentation on theme: "DATABASE CONCEPT Class XI Presented by : Dinesh Patel PGT [Comp. Sc.]"— Presentation transcript:

1 DATABASE CONCEPT Class XI Presented by : Dinesh Patel PGT [Comp. Sc.]
KV IIT Powai

2 Introduction Database is the collection of interrelated data / tables . Database Tables Fields Data Character Database Management System : S/w that manage data on computer for proper utilization on Computer .

3 Role of Database To reduce Data Redundancy
To Control Data Inconsistency To Share Data among different applications. To enforce Standards [ date format, number formats] To Secure Data [ Password protection, required facility] To maintain Integrity [ check validity of data]

4 Database Abstraction Providing only required data to the user.
Student_Info Admn. No. Name Class DOB Father’s Name Mother’s Name Address Father’s Occupation Category Last School Student_Info Name Class DOB Father’s Name Category Abstraction

5 Various Level of Database Implimantation
External / View Level Admn_No Name Fee Conceptual Level int Admn_No char Name [30] float Fee Internal / Physical Level Admn_No [ 02 bytes, Location : FF00101F ] Name [30] [30 bytes, Location : F0101F01 ] Fee [04 bytes, Location : F001F01F ]

6 Concept of Data Independance
Changing the Data definition at any one level will not affect to another level called Data Independance. It is of Two Types Physical Data Independence [ Changing on Physical Level not effect to Conceptual Level.] Logical Data Independence [ Changing on Conceptual Level not effect to Physical Level.]

7 Data Models External and Conceptual Level use certain Data Structure to use database efficiently with its all support. To manage the database some structures are described called Database Model. It is of Three types : Relational Data Model Network Data Model Hierarchical Data Model

8 Relation Data Model In this model Data is being stored in form of Rows and Columns. The collection of Row & Columns called Table / Relation. Fields Admn_no Name Class DOB Sex 1212 Kapil XII 12/05/1980 M 1587 Seema 19/12/1982 F 2145 Kiran XI 25/09/1990 1385 Chaman 14/02/1992 1141 Anubhav VI 02/11/1999 Record

9 Network Data Model The collection of Records connected to one other with the Links. The structure known as Arbitrary Graph. 1254 Seema Singh 12/05/1990 F Link XII Science Father_Name Mother_Mane

10 Hierarchial Data Model
The collection of Records connected to one other with the Links. The structure known as Tree. 1254 Seema Singh 12/05/1990 F Link XII Science Father_Name Mother_Mane

11 Comparision of Data Models
Comparison Key Relational Data Model Network Data Model Hierarchical Data Model Relationship of Data Rows and Columns By Links Structure Table Arbitrary Graph Tree

12 Database Terminoogies
Relation or Tuple : It is the collection of data in form of Rows & Columns. Domain : It is the Database server. Attribute : The columns /Field of table. Degree : Number of Columns in a table. Cardinality : Number of records in a table. Views : (i) Virtual table that does not really exist. (ii) Created from more than one table (iii) Does not occupies any memory.

13 Keys Primary Key : Key or the combination of Keys that can identify a record uniquely. Candidate Key : The Key or the Combination of Keys that can serve as primary key for a Table is called Candidate Key. Alternate Key : In case of More than one candidate key which is not selected as Primary key, is called Alternate Key. Foreign Key : The primary key of a parent table which is derived in to child table [One to Many ] called Foreign table.

14 Both can be Primary Key Candidate Key Admn_no Name Roll_no Class DOB
Sex 1212 Kapil 1 XII 12/05/1980 M 1587 Seema 2 19/12/1982 F 2145 Kiran 3 XI 25/09/1990 1385 Chaman 4 14/02/1992 1141 Anubhav 5 VI 02/11/1999

15 Primary Key Alternate Key Admn_no Name Roll_no Class DOB Sex 1212 Kapil 1 XII 12/05/1980 M 1587 Seema 2 19/12/1982 F 2145 Kiran 3 XI 25/09/1990 1385 Chaman 4 14/02/1992 1141 Anubhav 5 VI 02/11/1999

16 Primary Key Admn_no Name Roll_no Class DOB Sex 1212 Kapil 1 XII 12/05/1980 M 1587 Seema 2 19/12/1982 F 2145 Kiran 3 XI 25/09/1990 1385 Chaman 4 14/02/1992 1141 Anubhav 5 VI 02/11/1999 Foreign Key Parent Table OR Master Table Admn no Subject Marks 1212 Physics 80 Chemistry 85 1385 95 CS 99 90 Maths Child Table OR Detail Table

17 Relational Algebra Relation algebra is a collection of operation on relation that works on relation and produce result as relation. Operations are of following Types Select Project Cartesian Product Union Difference Intersections etc.

18 'Select' Operation σ price > 20.00 (item)
Horizontal subset of table selection Where Condition Table Name Select All σ price > (item) Select all from item table where price > ITEM Item no Name Qty Price 1212 Pencil 12 10.50 1587 Note Book 25 25.00 2145 Pen 35 12.00 1385 Ink 4 18.50 1141 Book 15 50.55 Item no Name Qty Price 1587 Note Book 25 25.00 1141 Book 15 50.55

19 'Project' Operation π Name, Price (item)
Vertical subset of table selection Where Condition Table Name Select All π Name, Price (item) Select Name and Price from item table. ITEM Item no Name Qty Price 1212 Pencil 12 10.50 1587 Note Book 25 25.00 2145 Pen 35 12.00 1385 Ink 4 18.50 1141 Book 15 50.55 Name Price Note Book 25.00 Book 50.55

20 'Cartesian Product' Operation
Table Table Item x Shop Item no I_Name Qty Price 1212 Pencil 12 10.50 1587 Note Book 25 25.00 2145 Pen 35 12.00 Shop no S_Name Address 101 R.K. Stationary 5A/12 M.G. 502 Maya Books 125, Uran Result No. of rows x No. of rows Item no I_Name Qty Price Shop no S_Name Address 1212 Pencil 12 10.50 101 R.K. Stationary 5A/12 M.G. Pincil 502 Maya Books 125, Uran 1587 Note Book 25 25.00 2145 Pen 35 12.00

21 'Union' Operation A B A U B Result : 11, 15, 20, 25, 30, 35, 40 20 25
11, 15, 20, 25, 30, 35, 40 A U B

22 'Union' Operation Shop1 U Shop2 Shop1 U Shop2 Shop1 Shop2 Result Table
Item no I_Name Price 1212 Pencil 10.50 1587 Note Book 25.00 2145 Pen 12.00 Item no I_Name Price 101 Books 65.00 1212 Pencil 10.50 Result Common will display once only. Item no I_Name Price 101 Books 65.00 1212 Pencil 10.50 1587 Note Book 25.00 2145 Pen 12.00 Shop1 U Shop2

23 'Intersection' Operation
20 25 15 11 35 25 30 40 A B 20 25 15 11 35 30 40 Result : 25 A П B

24 'Intersection' Operation
Table Table Shop1 П Shop2 Shop1 Shop2 Item no I_Name Price 1212 Pencil 10.50 1587 Note Book 25.00 2145 Pen 12.00 Item no I_Name Price 101 Books 65.00 1212 Pencil 10.50 Result Common will display only. Item no I_Name Price 1212 Pencil 10.50 Shop1 П Shop2

25 'Difference' Operation A B A B B - A A - B Result : 30, 35, 40
20 25 15 11 35 25 30 40 20 25 15 11 35 25 30 40 A B A B 20 25 15 11 35 30 40 20 25 15 11 35 30 40 B - A A - B Result : 30, 35, 40 Result : 11, 15, 20

26 'Difference' Operation Shop1 - Shop2 Shop1 - Shop2 Shop1 Shop2 Result
Table Table Shop1 - Shop2 Shop1 Shop2 Item no I_Name Price 1212 Pencil 10.50 1587 Note Book 25.00 2145 Pen 12.00 Item no I_Name Price 101 Books 65.00 1212 Pencil 10.50 Result Item no I_Name Price 1587 Note Book 25.00 2145 Pen 12.00 Shop1 - Shop2

27 'Difference' Operation Shop2 - Shop1 Shop2 - Shop1 Shop1 Shop2 Result
Table Table Shop2 - Shop1 Shop1 Shop2 Item no I_Name Price 1212 Pencil 10.50 1587 Note Book 25.00 2145 Pen 12.00 Item no I_Name Price 101 Books 65.00 1212 Pencil 10.50 Result Item no I_Name Price 101 Books 65.00 Shop2 - Shop1

28 Normalization Process to : Reduce data redundancies
Eliminate data anomalies Produce controlled redundancies to linked table

29 Types of Normalization
First Normal Form (1NF) All attributes should have atomic values No repeating group in a table All attributes dependent on primary key 2. Second Normal Form (2NF) In 1NF No partial dependencies Transitive in nature 3. Third Normal Form (3NF) In 2NF No Transitive in nature

30 Working of DBMS Front End 2. Back End 3. Connection Front End Back End

31 Thanks…………. Prepared & Presented by : Dinesh Patel PGT [CS] KV Karanja


Download ppt "DATABASE CONCEPT Class XI Presented by : Dinesh Patel PGT [Comp. Sc.]"

Similar presentations


Ads by Google