0% found this document useful (0 votes)
16 views2 pages

Wa0007.

The document discusses various data models used in database design, focusing on the Relational Database Model proposed by E. F. Codd in 1970. It explains the structure of relational databases, including tables, records, fields, and key terminologies such as primary keys and foreign keys. Additionally, it briefly describes hierarchical and network data models, highlighting their organization and relationships between data elements.

Uploaded by

ddzone1130
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views2 pages

Wa0007.

The document discusses various data models used in database design, focusing on the Relational Database Model proposed by E. F. Codd in 1970. It explains the structure of relational databases, including tables, records, fields, and key terminologies such as primary keys and foreign keys. Additionally, it briefly describes hierarchical and network data models, highlighting their organization and relationships between data elements.

Uploaded by

ddzone1130
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Data Models

Relational Database Model NoTES


A database can be designed in different ways depending
on the data being stored. This structure of database The Relational Database Model was proposed in 1970
by E. F. Codd. Relational database model is the most
is known as data model that describes the manner in
common type of database model.The data elements are
which data will be stored and retrieved.
stored in different tables made up of rows and columns.
A data model consists of components for describing The data in different tables are related through the use
of common fields. So relations are set between tables
the data, relationships among them and the constraints
based on common fields. That is why this model is
that hold data. There are different data models such
termed as relational database model.
as hierarchical data model, network data model and
relational data model. Relational Database Terminology
Let us get familiar with some of the commonterms used
Hierarchical Data Model in RDBMS.
In this model the data is organized into a tree like • Entity - It is a real which
world object about
information is to be storedFor in a database.
structure. The data is stored in the formn of records.
example, if we want to about an
store information
A record is a collection of fields and its data values. entity Student in a school, then we need to have his
admission number, roll number, name, father's
DATABASE MANAGEMENT SYSTEM USING LIBREOFFICE WRrTER
name, date of birth, etc. These details associated
with the entity are called attributes.
is a collection
Each entity
of these attributes associated with
Slished
2023-24 it. So roll number, name, admission number,
etc., are at associated with the entity
atmbutes
student. These attributes are represented in the
form of columns.
Table - A table is a collection of logically related
records. It is organised as a set of columns, and
can have any number of rows. For example, the
Employee table can have columns, namely name,
designation, department and have records or
NoTES All these records are linked to each other at various rows having data of 100 employees.

levels, thereby forming a hierarchy. For example, in


Field or Columns or attributes - A field is the
smallest entity in the database. A collection of
Fig. 8.1 the data of a company is stored using a fields make a record, a collection of records make
hierarchicaldata model. a table and a database.
on or tables make
Fields are record characteristics and
Likes Ltd. are presentedas columns within a table. Data
values are stored in a database as fields. A field
holds the data values of one type of data for
several persons. For example, in the Employee
Personal Information Project Information table the field "Emp Name" will hold the names of
employees of an organisation.
• Data Values- Data values are the raw
Emp Name Project Number
data represented in numeric, character or

DATABASE MANAGEMENT SYSTEM USING LIBRKOrFICE WRrrER


Salary Project Deadline

2023-24
Designation Employee Incharge HaH

Fig. 8.1: Hierarchical Data Mocdel

Network Data Model


In this model, multiple records are linked to same
master also considered as an inverted tree
file. It is alphanumeric form. Examples of data values are
where master ispresent in the bottom of the tree and 'Abhinav Bindra', 26''shooting', "Chandigarh",
"10-12-2018", etc.
the branches contain information linked to the master.
Record or Row -The data values for all the fields
In Fig. 8.2, the data of the company is represented using
related or object is called a record. It is
to a person
the network data model. presented as rows within a table. A record holds
the data values of all the fields for a single person
LUkes Ltd.
or object in a table. For example, in the Employee
table with the field names as Name, Designation,
Department,the datavalues of all the fields for an
Personal Project
employee may be (Abhinav', Manager', Finance)
Information Information and this forms one record.
Primary Key - A primary key or simply a key is
a field that uniquely identifies a row in a table.
The key identifier can be the value of a single
Emp Salary Designation
Project Project column or of multiple columns. The primary key
Name Number Deadline
is a unique identifier for the table. The column or

Fig. 8.2: Network model


comtmbinations of columns that form the primary
key have unique value .At any time, no two rows
in the table can neither have samne values for the
Relational Data Model
primary key nor can data value for such field be
This data model is based on the principle of setting left blank. For example, in a student table, each
student has a unique roll no., which forms the
relationships between two or more tables of the same
primary key. If, in a table we use more than one

not database. It is the most commonly used database


Let us study about this model in detail.
model.
to identify a record, it is known as a composite
key. For example, we may form a composite key
consisting of fields roll no. and name.
Relational Database -A relational database is

a collection of related tables. For example, in


Fig. 8.3, the database contains two related tables.

RelationalDatabase
Fields

Roll Number Student Name Class Date of Birth Date of Admission


913 Dipak Kumar 10 06/04/2004 25/06/2018
914 Ram tat Kumar 01/03/2004 24/06/2018

Roll Number Book Number Date of Barrow Date of Admission


913 555 10/12/2018 25/12/20 18
Tables
914 333 11/11/2018 24/11/2018 Records
915 444 12/11/2018 30/12/20 18

Fig. 8.3: Relational database

150 DOMESTIc DATA ENTRY OERATOR – CLASS X

2023-24
(B=B)

Foreign Key -If a field or a combination of fields


of one table can be used to uniquely identify
records of another table, then that particular field
is known as the foreign key. This foreign key helps
to build a relation between two tables. Consider
the example givenbelow.

Student Registration Table


Enrolment Number Student Name Class Date of Birth Date of Admission

XX1234567890 DipakKumar 10 06/04/2004 25/06/2018


XX1234567891 Ram Kumar 10 01/03/2004 24/06/2018
Primary key: Enrollment Number
Student Marks Table
Roll Number Maths Science Vocational Enrolment Number
44983 87 75 80 XX1234567890
44990 74 45 75 XX1234567891
Primary key - Roll Number, Foreign key - Enrollment Number

In Student Registration Table, Enrolment_Number'


is the primary key and in the Student Marks Table,
Roll_Number' is the primary key, whereas 'Enrollment_
Number' is the foreign key. This foreign key can be used
to set a relation between two tables.

Candidate Key - All the field values that are


eligible to be the primary key are the candidate
keys for that table. Such fields can neither be left
blank nor can have duplicate values. So in the
table Student Marks, Enrollment Number and
Roll Number both are candidatekeys.
Alternate Key -
Out of the candidatekeys, one
or two are made as primary keys. The others are
the alternate keys. Hence, if Roll Number is made
as the primary key, Admission Number is the
Alternate key.

You might also like