0% found this document useful (0 votes)
11 views

Database Concepts

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Database Concepts

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Computer Science with Python Class 12

Database Concepts
Data: It is defined as collection of facts in raw form.
Information: Organized and processed data is termed as information.
Database : It is collection of data files in which logically related information is stored in
such a way that an application program can select desired piece of data to maintain and
update it.
Data Integrity : It refers to the rules and regulations which can be used to consistently
navigate and manipulate the database.
Data Base Management System(DBMS) : It is a software which is used to store ,
maintain , modify and retrieve data from a database in a well organized manner. Its
common examples are dBASE , FoxPro , MS Access , MySQL , MS SQL Server , Sybase ,
Oracle etc.

Advantages of DBMS

1.Data Redundancy ( Duplication of Data ) : It removes duplication of data as data is


stored at one place and all the applications refer to the centrally maintained database.
2.Data Inconsistency : When two copies of same data do not agree with each other , it
is called data inconsistency . By removing data redundancy, data consistency can be
controlled.
3.Sharing of Data : Data stored in the databases can be shared among several users.
4.Security of Data : Data is protected from accidental or intentional disclosure to an
unauthorized user or unauthorized modification.
5.Integrity Rules : It enforces certain integrity rules to ensure the validity or
correctness of data e.g. a date like 25/25/2019 cannot be accepted.

Relational Database Model

This model was proposed by E.F.Codd in 1969. Here database is represented as a


collection of related tables and data is organized in the form of tables called relations. A
relation is collection of horizontal rows and vertical columns. The data stored in these
relations is logically related.

Advantages:

( 1 ) It is easy to understand.
( 2 ) In this model the relationship between databases is established by data values.

e.g.

Computer Science Dept. Mount Carmel School AN


Computer Science with Python Class 12

Components of a Table

1. Byte : A byte is a group of 8 bits and is used to store a character.


2.Data Item or Field : It is the smallest unit of named data. It is a column which
represents one type of information.
3.Record : It is a collection of data items which are logically related to each other and it
represents information as a single unit.
4.Table : It is a collection of logically related records.

Basic Terminology

1. Relation : A relation is a table in which data is organized in the form of rows and
columns.
2. Domain : It refers to a set of all possible acceptable values of a particular column. It is
a set of values from which the actual values are derived for a column.
3. Tuple : Horizontal rows of a relation are called tuples(Records).
4. Attribute: The vertical columns of a relation are called attributes.
5. Degree of a relation: Total number of vertical columns or attributes of a relation is
termed as degree of a relation.
6. Cardinality of a relation: Total number of horizontal rows (tuples) in a relation is
known as cardinality of a relation.

Computer Science Dept. Mount Carmel School AN


Computer Science with Python Class 12

7. View: A view is a virtual table whose contents are taken from a existing table(base
table) depending upon some conditions. A view does not have data of its own.
8. Key : It is an attribute in a relation which can be used to distinguish the rows of a
relation.
9. Primary Key: An attribute or a set of attributes which can be used to uniquely
identify the rows (tuples) within a relation. There can be only one primary key in a
relation.
10.Candidate Key: An attribute or a set of attributes with unique values which can be
selected as a primary key of the relation.
11. Alternate Key: An attribute or a set of attributes which can not be selected as a
primary key to identify the row (tuples) within a relation.
12.Foreign Key: An attribute or a set of attributes in a relation which can be used to
uniquely identify a row of an another table. It is used to make a relationship of a table
with some other table on the basis of a key and that key generally appears as a primary
key in that relation .

Properties of a Relation

1. All items in a column are homogeneous. It means in a given column of a relation all
data items are of same data type.
2. For a row each column must have individual (atomic) value.
3. All rows of a relation must be distinct.
4. Order of rows in a relation is immaterial.
5. All columns of a relation are assigned unique names and their order is immaterial.

Disadvantages of a Database System


1.Extra hardware may be required.
2.System is likely to be very complex.

Computer Science Dept. Mount Carmel School AN

You might also like