Database Concept
Database Concept
syllabus
ComputerScience 2024-25
ClassXII(Asper
CBSE Board)
Chapter9
Database Concepts
DATABASECONCEPTS
A Database is a collection of DATA/INFORMATION that is
organized so that it can be easily accessed, managed and
updated.
In Database, Data is organized in to 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 objects like Tables, Queries, Reports etc. in
organized way.
Visit:python.mykvs.inforregularupdates
DATABASECONCEPTS
Visit:python.mykvs.inforregularupdates
DATABASECONCEPTS
Visit:python.mykvs.inforregularupdates
DATABASECONCEPTS
Data Model-Way of data representation
Data model is a model or presentation which shows How data is organized? Or stored
in the database. A data is modeled by one of
the following given-
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 called a Tuple or
Record. A column is called Attribute or Field.
Network Data Model
In this model, data is represented by collection of records and relationship among data
is shown by Links.
Hierarchical Data Model
In this model, Records are organized as Trees. Records at top level is called Root record
And this may contains multiple directly linked
children records.
Object Oriented Data Model
In this model, records are represented as a objects. The collection of similar types of
Object is called class.
Visit:python.mykvs.inforregularupdates
DATABASECONCEPTS
RELATIONALDATABASE
A relational database is a collective set of multiple data sets
organized by tables, records and columns. Relational
database establish a well-defined relationship between
database tables. Tables communicate and share information,
which facilitates data searcheability, organization and
reporting.
A Relational database use Structured Query Language (SQL),
which is a standard user application that provides an easy
programming interface for database interaction.
Visit:python.mykvs.inforregularupdates
DATABASECONCEPTS
RELATIONALDATABASETERMS
DATABASECONCEPTS
RELATIONALDATABASETERMS
Relation(Table)
A Relation or Table is Matrix like structure arranged in Rows and
Columns. It has the following properties-
Atomicity: Each column assigned a unique name and must have
Atomic (indivisible) value i.e. a value that cannot 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.
Ordering of rows and column is immaterial.
Domain: It is collection of values from which the value is derived for
a column.
Tuple/Entity/Record-Rows of a table are called Tuple or Record.
Attribute/Field-Column of a table is called Attribute or Field.
Degree-Number of columns (attributes) in a table.
Cardinality-Number of rows (Records) in a table.
Visit:python.mykvs.inforregularupdates
DATABASECONCEPTS
KEYS IN A DATABASE
Key plays an important role in relational database; it is used for
identifying unique rows from table & establishes relationship
among tables on need.
Types of keys in DBMS
Primary Key – A primary key is a column or set of columns in a
table that uniquely identifies tuples (rows) in that table.
Candidate Key –It is an attribute or a set of attributes or keys
participating for Primary Key, to uniquely identify each record in
that table.
Alternate Key – Out of all candidate keys, only one gets selected
as primary key, remaining keys are known as alternate or
secondary keys.
Foreign Key – Foreign keys are the columns of a table that points
to the primary key of another table. They act as a cross-reference
betweentables.
Visit:python.mykvs.inforregularupdates
DATABASECONCEPTS
KEYS IN A DATABASE