0% found this document useful (0 votes)
3 views6 pages

Chapter 7 - Relational Database and SQL

The document outlines various data models used to organize and structure data in databases, including Object-Based, Physical, Hierarchical, Network, and Relational models. Each model is described with examples, highlighting how data is stored, managed, and retrieved, such as the use of objects with attributes and methods in the Object-Based model, or tables in the Relational model. The document emphasizes the importance of these models for efficient data management in systems like school databases.

Uploaded by

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

Chapter 7 - Relational Database and SQL

The document outlines various data models used to organize and structure data in databases, including Object-Based, Physical, Hierarchical, Network, and Relational models. Each model is described with examples, highlighting how data is stored, managed, and retrieved, such as the use of objects with attributes and methods in the Object-Based model, or tables in the Relational model. The document emphasizes the importance of these models for efficient data management in systems like school databases.

Uploaded by

bekaarbachha3
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Data Model:

Data Model is a way to organize and structure data in a database so it can be


stored, managed, and retrieved easily.

Example

In a school database, a data model shows:

 What data will be stored (Student name, roll number, marks)

Object-based data model:

An Object-Based Data Model is a way of organizing data in a database using


objects, similar to how things are represented in real life.

It stores data as objects that have:

 Attributes – properties of the object


 Methods – actions the object can perform

Example

Think about a Student object.

Object: Student

Attributes (information about the student):

 Name
 Age
 Roll number
 Marks

Methods (actions related to the student):

 Calculate grade
 Display result

Physical Data Model:

The Physical Data Model describes how the data is actually stored in the
database system.

It focuses on the physical storage of data in the computer.

It includes things like:

 Files
 Indexes

Example

In a student database, the physical data model shows:

 Where the student data is stored


 How it is stored in files
 How the system retrieves the data quickly
Hierarchical model (Tree Structure):

The Hierarchical Data Model is a database model where data is organized in a


tree-like structure.

Data is arranged in parent–child relationships.

 One parent can have many children


 But one child has only one parent

Example

Think of a School database:

School (Parent)
→ Class (Child)
→ Student (Child)

So the structure looks like a tree.

 Data is stored in levels


 Each record is connected through parent–child links
Network model(Directed graph):

The Network Data Model is a database model where data is organized in a


network structure.

In this model, a child can have multiple parents.

Records are connected through links, forming a network instead of a tree.

Example

A Student can study many subjects, and a Subject can have many students.

Student ↔ Subject

So the relationships form a network of connections.


Relational Model (Files/Tables/Relational):

The Relational Data Model is a database model where data is stored in tables
(called relations).

Information is organized in rows and columns.

 Rows → Records (each entry)


 Columns → Attributes (types of information)

Example

Student Table

Roll No Name Class


1 Rahul 8
2 Anya 8

Here:

 Each row is a student record


 Each column is an attribute

Different tables can be connected using keys (like primary key and foreign key).

You might also like