Database Concepts
Database Concepts
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
Advantages:
( 1 ) It is easy to understand.
( 2 ) In this model the relationship between databases is established by data values.
e.g.
Components of a Table
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.
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.