0% found this document useful (0 votes)
78 views18 pages

Database Concepts Final

class 12 database ppt

Uploaded by

impaler
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
78 views18 pages

Database Concepts Final

class 12 database ppt

Uploaded by

impaler
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

New

syllabus
2024-25

Database
Concepts

Computer Science
Class XII ( As per CBSE Board)
DATABASE CONCEPTS

A Database is an organised collection of logically and inter related


data that serves many applications.It is a repository of
information about something or some entity.

It is a place where related pieces of information are stored and


various operations can be performed on them.

It allows the users to enter,access and analyse their data quickly


and easily.It supports various activities and decision making for
any organisation.

The databases are generally managed by a special software called


Database Management System (DBMS).
DATABASE CONCEPTS

Database Management System(DBMS) is a general purpose


software that facilitates creation,updation and maintenance of a
database. It is a computerized/electronic record keeping system.
For Ex:Oracle,MS-Access,DBase,MySQL,Foxpro,SAP

Data in a DBMS is organized into rows, columns and tables, and it is


indexed to make it easier to find relevant information. It works like a
container which contains the various object like Tables, Queries,
Reports etc. in organized manner.
DATABASE CONCEPTS
DATABASE CONCEPTS

NEED FOR A DBMS


❑ To manage huge chunks of data: if size of data increases into
thousands of records, it will be tedious and cumbersome to
manage.A Database can easily manage enormous amount of
data.
❑ Accuracy: Through validation rules in a database ,data accuracy
can be maintained.
❑ Ease of updating data: With the database, we can flexibly update
the data according to our convenience. Moreover, multiple
people can also edit data at the same time.
❑ Security n Privacy of data: With databases we have security
groups and privileges to restrict access.
❑ Data integrity: In databases, we can be assured of accuracy and
consistency of data due to the built in integrity checks and access
controls.
DATABASE CONCEPTS

Advantages of a DBMS
❖ Database reduces Redundancy
It removes duplication of data because all data is kept at one place and all the
applications refer to the centrally maintained database.
❖ Database controls Inconsistency
When two copies of the same data do not match with each other, then it is called
Inconsistency. By controlling redundancy, the inconsistency is also controlled.
❖ Database facilitates Sharing of Data
Data stored in the database can be shared amongst several users.
❖ Database ensures Security
Data is protected against accidental or intentional disclosure to unauthorized
person or unauthorized modification.
❖ Database maintains Integrity
It enforces certain integrity rules to insure the validity or correctness of data. For
ex. A date can’t be like 31/31/2000.
DATABASE CONCEPTS

Components of a Database System


1.Users-can be of varied types- DB Administrator,System or Application developer or end user.

2.Database Application: it may be Personal,Departmental or Enterprise .It may be general purpose or


customised as per the needs of a user.

3.DBMS: Software that allows the user to define,create,access and manage the database.

4.Database: Integrated Collection of Logically related data


DATABASE CONCEPTS
Data Model- Way of data Representation
Data model is a model or re
presentation which shows How data is organized or stored
in the database. It represents graphically the relationship amongst various data
elements of a data base.It is also referred to as DFD(data Flow Diagram)as it shows
the flow of data in a database. Data can be modelled by one of the following
techniques:-
❖ Hierarchical Data Model
In this model, Records are organized as Trees. Record at top level is called Root record
and this may contain multiple directly linked children records.

❖ Network Data Model


In this model, data is represented by collection of records and relationship amongst
data is shown by Links.

❖ Relational Data Model


In this model data is organized into Relations or Tables (i.e. Rows and Columns). A row
in a table represents a relationship of data to each other and also
DATABASE CONCEPTS

Hierarchical Data Model


In this model, Records are organized as Trees. Record at top level is called Root record and this may
contain multiple directly linked children records.
ADVANTAGES:
It’s simple in operation n concepts
Its efficient and can be naturally mapped for 1:M(one to many) relationships
DISADVANTAGES:
Its inflexible for non hierarchical relationships
Dependency on parent node which is the root node and its deletion can cause deletion of all child nodes
and subsequently the entire model
DATABASE CONCEPTS

Network Data Model


In this model, data is represented by collection of records and relationship amongst
data is shown by Links.This model represents Many- to Many relationships.

Advantages of Network Model

Many to many relationships can be easily implemented

Easier access compared to hierarchical model

Disadvantages of Network Model

New queries cannot be implanted

Extra storage is required for pointers

A high level language is needed to program the database


DATABASE CONCEPTS
Relational Data Model
This model was described by Dr. E.F. Codd in 1970. This model uses the
concept of tables, a rectangular structure of rows and columns, to represent data and relationship amongst
data. Each table is a relation so we can interchange table with relation.A row in a table represents a
relationship of data to each other and also called a Tuple or a Record. A column is called an Attribute or
Field.
Advantages of Relational Model

Data manipulation is easy

Simple and easy to use and flexible in data organization.

We can apply mathematical operations on tables

Built in Query language support on RDBMS is available

Increased scalability and performance.

Disadvantages of using Relational Model- Requires substantial hardware and system software
overheads

Complex relational database systems may lead to isolated databases where the information cannot be shared from one system to
another.
DATABASE CONCEPTS

RELATIONAL DATABASE
In this model data is organized into Relations or Tables comprising of Rows n
Coloumns,where columns represent fields/attributes of an entity and rows
represent records/tuples. A row in a table represents a relationship of data to
each other and also called a Tuple or Record.

A relational database is a collective set of multiple data sets organized by


tables, records and columns. Relational database establishes a
well-defined relationship between various data components in the form of
tables. Tables communicate and share information, which facilitates data
search ability, organization and reporting.

A Relational database uses Structured Query Language (SQL), which is a


standard user application that provides an easy programming interface for
database interaction.
Generally the data is organised in the form of characters- fields- records-relation(.dbf file) -
databases
Character : It is the fundamental data element that can be a single alphabet, a digit, or some other special
character such as $,& @ etc.

Field: It represents the attributes of an entity.It refers to a coloumn in a relation.For example, the various fields of
the record of a student are : ROLL, NAME, AGE, MARKS.

Record/Tuple: A set of related data items of a particular person, or place is known as a record. It refers to a row in
a relation and is a collection of fields.For example, the record of student may comprise the following data items:

ROLL NAME AGE MARKS

25 GAGAN 11 97

File: A group of related records is called file. For example, the entire information of a class of students consisting of
25 records is kept in a file ( say stud-file)

Database: It is a collection of files that acts as a single centralized databank for many data processing
applications. For example, the files of all the classes of a school stored in a centralized place such as Hard disk of
a computer can be termed as student database.
DATABASE CONCEPTS
RELATIONAL DATABASE - KEY TERMS
❖ Relation (Table)
A Relation or Table is a Matrix like structure arranged in the form of Rows and
Columns,where coloumns represent Fields and rows represent Records. It has the
following properties-
❖ Atomicity : Each column assigned a unique name and must have atomic(indivisible)
value i.e. a value that can not be further subdivided.
❖ No duplicity: No two rows of relation will be identical i.e. in any two rows
value in at least one column must be different.
All items in a column are homogeneous i.e.same data type
❖ Entity- Entity is a uniquely identifiable object.Entity is a real time object that can be distinguised
from other objects and can be represented independently. An entity comprises of attributes.For
Eg:Employee,Student etc.
❖ Domain :It is the range of values which a particular field can take OR collection of values
from which the value is derived for a column.
❖ Tuple / Record - Row in a relation is called a Tuple or Record.It is a collection of fields.
❖ Attribute/ Field- Column in a relation is called Attribute or Field.It represents an attribute of
an entity.
❖ Degree - Number of columns (attributes) in a relation/table.
❖ Cardinality - Number of rows (Records) in a relation/table.
DATABASE CONCEPTS

RELATIONAL DATABASE TERMS


DATABASE CONCEPTS

KEYS IN A DATABASE-Key plays an important role in relational


database & establishes a relationship among tables as per the
requirement.It is a field which is capable of uniquely identifying
rows in a relation.
Types of keys in a DBMS
❖ Primary Key – A primary key is a column or set of columns in a relation which uniquely
identifies the tuples (rows) in a relation.NULL values and duplicate value are not
permitted in Primary key
❖ Candidate Key –It is an attribute or a set of attributes which are capable of uniquely
identifying rows in a relation.
❖ Alternate Key – Out of all candidate keys, only one gets selected as primary key,
remaining keys are known as alternate or secondary keys.

CANDIDATE KEY =ALTERNATE KEY + PRIMARY KEY

ALTERNATE KEY= CANDIDATE KEY - PRIMARY KEY


Foreign Key – Foreign key of a table is a Primary key of
another table. Foregn key for table A will be the Primary key of table B and
Foregn key for table A will be the Primary key of table B. It acts as a
cross-reference between tables.
Keys can use a SINGLE attribute or formed using a combination of Attributes
( COMPOSITE KEY)
Super Key:Super Key is an attribute (or set of attributes) that is used to uniquely identifies all attributes in a
relation. All super keys can’t be candidate keys but its reverse is true. In a relation, number of super keys are
more than number of candidate keys.
DATABASE CONCEPTS

Thnx:)

You might also like