Data Models: –
They are a collection of tools for describing the…….
* Data Relationship
* Data Semantics
* Data Constrants
There are many types of data models: –
1- Relational Model
2- Entity Relationship Data Model
3- Object Based Data Model
4- Semi Structured Data Model
5- Other older Models
(i) Network Model
(ii) Hierarchical Model
1- Relational Model: –
→ It is used by relational databases.
→It uses a collection of tables to represent the data and the relationships among the data.
→It is a record-based model.
Example:
Customer | |||
cust_id | Cust_fname | Cust_lname | Cust_city |
1 | Sanjay | Yadav | Prayagraj |
2 | Rakesh | Sharma | Lucknow |
3 | Rajeev | Gupta | Kanpur |
4 | Manoj | Kumar | Mirzapur |
Depositer | |
Cust_id | Account_no |
1 | 1002 |
2 | 1007 |
3 | 1012 |
4 | 1014 |
Account | |
Account_no | Balance |
1002 | 500 |
1007 | 10123 |
1012 | 47896 |
1014 | 12112 |
The relational model consists of tables each having a unique name each table consist of rows and columns.
2- Entity Relationship Data Model: –
It is based on the persuption of the real word that consist of a collection of basic objects called entities and relationships among this object.
Entity: –
An entity is a thing or an object that can be perused.
Ex: Customers, Bank A/c are entities.
A relationship is an association among several entities.
Attributes: –
An Entity can have a set of attributes.
Ex: Customer, Customer Name, Street, City, Phone No. etc. are all attributes of entity customers.
Entity Set: –
An entity set is a set of all entities of the same type that share the same properties or attributes.
Relationship Set: –
A relationship set is the set of all the relationship of the same type.
This model uses ER-Diagram to express the logical scheme of the database.
3-Object Based Data Model: –
It is two kinds: –
- (i) Object Oriented Data Model: – Key concept include Inherent, object identity, encapsulation which are applied to data modelling.
- (ii) Object Relational Data Model: – It extends the traditional relational data model which verity of features
• like – Structured and collection types.
4-Semi-Structured Data Model: –
It allows the specification & data where individual date items of the same type may have different set of attributes.
Example: – XML
XML is a Data Transportation Language.
XML allows new tags to be define and create nested type structured.
Example: –
<student1>
<firstrome> Rajeev </firstname>
</student1>
<student 2>
<firstname> Rakesh </ firstname>
<lastname> Malik </last name>
</ student 2>