DATABASE CONCEPTS
Revision Notes
Database Concepts
Database Concepts and Needs:
• A database is tabular organization of data. Each table comprises of rows (records) and columns
(attributes). Each record contains values for the corresponding attributes. The values of the attributes for a
record are interrelated. For example, different cases have different values for the same specifications
(length, color, engine capacity, etc).
• The database oriented approach supports multiple views of the same data. For example, a clerk may only
be able to see his details, whereas the manager can view the details of all the clerks working under him.
• In database oriented approach, we store the common data in one table and access it from the required
tables. Thus, the redundancy of data decreases.
• Multiple views of the same database may exist for different users. This is defined in the view level of
abstraction.
Abstraction: Data Abstraction in DBMS refers to the process of hiding irrelevant details from the user.
There are mainly three levels of data abstraction: Internal Level, Conceptual or Logical Level or External or
View level ·
• The logical level of abstraction defines the type of data that is stored in the database and the relationship
between them.
• The design of the database is known as the database schema.
• The instance of the database is the data contained by it at that particular moment.
• The database administrator has the total control of the database and is responsible for setting up and
updating the database.
Need for a Database
Data is stored in the form of files. A number of application programs are written by programmers to insert,
delete, modify and retrieve data from these files. New application programs will be added to the system as
the need arises.
• A data model is the methodology used by a particular DBMS to organize and access the data.
• Hierarchical, Network and Relational model are the three popular data models. However, the relational
model is more widely used.
Ø Hierarchical Model
• The hierarchical model was developed by IBM in 1968.
• The data is organized in a tree structure where the nodes represent the records and the branches of the
tree represent the fields.
• Since the data is organized in a tree structure, the parent node has the links to its child nodes. This is
called (PCR) parent child relation.
• If we want to search a record, we have to traverse the tree from the root through all its parent node to
reach the specific record. Thus, searching for a record is very time consuming.
• The hashing function is used to locate the root.
• SYSTEM 2000 is an example of hierarchical database.
Ø Network Model
• Data is represented by collection of records and relationships among data are represented by links.
• Recording of relationship in the network model is implemented by using pointers.
• Recording of relationship implementation is very complex since pointers are used. It supports many-to-
many relationship and simplified searching of record, since a record has many access paths.
• DBTG CODASYL was the first network database.
Ø Relational Model
• The Relational model, organizes data in the form of independent tables (consisting of rows and columns)
that are related to each other.
• A relation is a two-dimensional table. It contains number of rows(tuples) and columns(attributes).
• A table consists of a number of rows (records/tuples) and columns (attributes). Each record contains
values for the attributes.
• A single entry in a table is called a Tuple or Record or Row.
• A database attribute is a column or field in a database table.
• The degree of the table denotes the number of columns.
• Cardinality is defined as the number of rows in a table.
• In a database, a domain is a column that contains a data type. A domain in the relational model is said to
be atomic, if it consists of indivisible units. For example, name is not atomic since it can be divided into first
name and last name.
• E.F. Codd laid down 12 rules (known as Codd’s 12 rules), that outline the minimum functionality of a
RDBMS. A RDBMS must comply with at least 6 rules.
• A super key is a type of attribute that collectively identifies an entity in an entire set. For example, the
bank account number is a super key in the bank accounts table.
• A candidate key (also known as primary key) is the smallest subset of the super key for which there does
not exist a proper subset that is a super key.
• Out of the multiple candidate keys, only one is selected to be the primary key and the remaining are
alternate keys.
• A foreign key is the primary key of a table that is placed into a related table to represent one-to-many
relationship among these tables.
• A primary key is a set of one or more attributes that can uniquely identify the relation.
• Primary key uniquely identifies the records in the table.
Key Words
DBMS: It stands for Database Management System that enables users to define, create and maintain the
database and provides controlled access to this database.
DBA: DBA is Database Administrator that has the central control over the system.
RDBMS: RDBMS stands for Relational Database Management System. Meta Data: It means data about data
i.e., a logical description of the structure of a data.
File Processing System: It is a collection of new data files stored in the hard drive of a system.