DATABASE CONCEPTS
1
NAVODAYA VIDYALAYA SAMITI, NOIDA
E-CONTENT PREPARATION FOR
CLASS XI
CHAPTER- 7
PREPARED BY:
ASHOK KUMAR SHARMA, PGT CS
JNV SHIMOGA, KARNATAKA
DATABASE
2
FILE SYSTEM
3
DBMS
4
NEED OF DBMS
File system becomes difficult to handle when number of files increases and volume of data also grows. Following are some of the advantages of database:
Redundancy means same data are duplicated in different places (files). It removes redundancy as the data are stored at one place and all the application refers to the centrally maintained database.
Data inconsistency occurs when same data maintained in different places do not match. By controlling redundancy, the inconsistency is also controlled.
Data stored in the database can be shared among several users.
5
NEED OF DBMS
Data are protected against accidental or intentional disclosure to unauthorized person or unauthorized modification.
It enforces certain integrity rules to ensure the validity or correctness of data.
Database is maintained in a standard format which helps data interchange or migration of data between two systems.
6
KEY CONCEPTS IN DBMS
7
KEY CONCEPTS IN DBMS
The state or snapshot of the database at any given time is the database instance
A query is a request to a database for obtaining information in a desired way.
8
RELATIONAL DATA MODEL
9
COMPONENTS COMPRISING A TABLE
10
�commonly used terminologies in relational data model
The Relational Model was developed by E. F. Codd of the IBM in 1970 and is the most widely used Database Model.
A Relation/Table is a tabular structure arranged in rows and columns. It has the following properties:
11
commonly used terminologies in relational data model
12
commonly used terminologies in relational data model
It is a set of values from which an attribute can take a value in each row. Usually, a data type is used to specify domain for an attribute.
Each row of data in a relation (table) is called a tuple.
The columns of a relation are the attributes which are also referred as fields.
The number of attributes in a relation is called the Degree of the relation
The number of tuples in a relation is called the Degree of the relation
13
DATABASE TABLE/RELATION
14
ROLL | NAME | CLASS |
01 | VIJETHA | 12 |
02 | SINDHU | 11 |
03 | GAUTHAMI | 12 |
STUDENT
Rows / Tuples
Table / Relation
Data Item
Records
Table/Relation Name
Columns / Attributes
�Keys in a Relational Database
The tuples within a relation must be distinct. It means no two tuples in a table should have same value for all attributes. That is, there should be at least one attribute in which data are distinct (unique) and not NULL. That way, we can uniquely distinguish each tuple of a relation. So, relational data model imposes some restrictions or constraints on the values of the attributes and how the contents of one relation be referred through another relation. These restrictions are specified through different types of keys.
15
Keys in a Relational Database
16
Keys in a Relational Database
17
Keys in a Relational Database
STUDENT
18
Stud_ID | Roll_No | Name | Stream | Email_ID |
200601 | 01 | Nikitha | Science | nk@gmail.com |
200607 | 03 | Srinidhi | Commerce | ss@gmail.com |
200647 | 18 | Sahana | Science | sk@gmail.com |
Candidate Keys
Keys in a Relational Database
19
CLASS | SECTION | TOT_STRENGTH |
X | A | 32 |
XII | A | 30 |
XII | B | 28 |
Keys in a Relational Database
20
Keys in a Relational Database
21
Keys in a Relational Database
22
Keys in a Relational Database
ORDERS
CUSTOMER
23
ORDER_ID | ORDER_NO | CUST_ID |
1 | 1255 | 3 |
2 | 1690 | 3 |
3 | 1810 | 2 |
4 | 2210 | 1 |
CUST_ID | NAME | ADDRESS |
1 | HECTOR | MADRID |
2 | MITCHELLE | LONDON |
3 | AUGUSTA | COLARADO |
Child Table
Parent Table
REFERENTIAL INTEGRITY
24
REFERENTIAL INTEGRITY
25
THANK YOU
26