Page 139 - Informatics_Practices_Fliipbook_Class12
P. 139
Each row in Table 4.1 has data about one student's preference for a game. Column headings describe the information
stored in the columns. Thus, for each student, RollNo, Name, and Game are stored in the first, second, and third
columns, respectively. In addition to the user data, DBMS also keeps a description of the stored data, called metadata
Unit II: Database Query using SQL
(also called data about data). For example, in the above example, DBMS may store the table's name, names of columns,
and the type of data that columns contain.
Metadata: Description of data like names of tables, names and types of attributes.
Database Management System (DBMS) is a collection of programs that help define, construct, and manipulate the
database. Database definition includes specifying the structure of the database, type of data, and restrictions imposed
on data. Database construction deals with storing the actual data in the database. Finally, database manipulation deals
with the modification or retrieval of data. DBMS acts as an interface between end-users and the database. As every
access to data in a DBMS must go through DBMS, it can control access to data by checking against unauthorised access
to data. Since several end-users may access the same database, DBMS facilitates sharing of data.
4.2 Relational Data Model
The relational data model founded by E.F. Codd of IBM is prevalent. It defines a database as a collection of
relations. Each relation is a table comprising of rows and columns. A relational data model comprises the following
components:
1. Entity: An entity is a real-world object about which data is stored in the database. For example, a company's
database may have employee and department entities.
2. Attribute: An attribute defines the characteristics of an entity. For example, employee id, date of birth, address,
and salary form attributes of an employee.
3. Relationship: A relationship specifies how two entities are linked (or related) to each other. For example, in a
database that deals with employees of a company who work in different departments, the employee entity is
related to the department entity since an employee works in a department.
4. Constraint: Constraint specifies the restrictions imposed on the data stored. For example, each employee should
have a unique id.
We will use the terms, relation and table interchangeably.
4.2.1 Relational Data Model Concepts
Let us recall the database COMPANY constructed in class XI. We organised information about the company into four
tables, EMPLOYEE, DEPARTMENT, PROJECT and WORKS_ON, as shown.
Relation Employee
ID FName LName Gender Address City Pin_Code DOB Salary Dept_No
West Andhra
E0001 Raj Reddy M 534197 1980-06-13 100000 2
Godavari Pradesh
Dispur,
E0002 Dhiraj Bora M Kamrup, Guwahati 781005 1975-09-30 85000 1
Assam
8/33, Geeta
E0003 Muskan Taneja F Delhi 110031 1990-01-25 100000 2
Colony
Database Query using SQL 125

