0% found this document useful (0 votes)
2 views1 page

Data Model

The data model of a database serves as a blueprint for data storage, illustrating entities, attributes, and their relationships. It includes basic concepts such as entities (data storage units), attributes (characteristics of entities), and relationships (connections between entities), which can be one-to-one, one-to-many, or many-to-many. The document also discusses Entity Relationship Diagrams (ERD) and the relational data model, emphasizing the use of tables to represent data and the role of primary and foreign keys in relational databases.

Uploaded by

shumet dagne
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)
2 views1 page

Data Model

The data model of a database serves as a blueprint for data storage, illustrating entities, attributes, and their relationships. It includes basic concepts such as entities (data storage units), attributes (characteristics of entities), and relationships (connections between entities), which can be one-to-one, one-to-many, or many-to-many. The document also discusses Entity Relationship Diagrams (ERD) and the relational data model, emphasizing the use of tables to represent data and the role of primary and foreign keys in relational databases.

Uploaded by

shumet dagne
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

3.2.

Data Model
 The data model of a database serves as a blueprint or guide for data storage.
 It illustrates the database entities, attributes, and relationships among entities.
 The model specifies the relevant data to be stored in the database.
 For instance, a school database contains information about students and teachers,
excluding irrelevant data like patients or traffic accidents.
 Conversely, hospitals focus on storing data related to patients and physicians.
3.2.1 Basic Concepts In Data Modelling
1. Entities: Fundamental data storage units, representing people, places, or events
(e.g., customers and bank accounts in banks, books and borrowers in libraries);
equivalent to database tables.
2. Attributes: Characteristics used to distinguish entities; for instance, a customer
entity might have attributes like customer ID, name, sex, and address, while a book
entity may include author name, book title, and publication year.
3. Relationships: Connections between entities, illustrated by associations such as a
customer having an account.
 Types of Relationships:
1. One-to-One: Each instance of one entity corresponds to a single instance of
another (e.g., countries and their capital cities).
2. One-to-Many: One instance of an entity relates to multiple instances of
another (e.g., a Computer Science department with many students).
3. Many-to-Many: Instances of both entities relate to multiple instances of
each other (e.g., employees assigned to multiple projects).
3.2.2 Entity Relationship Diagram (ERD)
 Entity Relationship Diagram (ERD) is a visual tool for representing data models.
 It consists of three main components: entities, attributes, and relationships.
 Entities are depicted as rectangles, attributes as ellipses, and relationships as lines
connecting entities.
 Names of entities and attributes are written inside their respective shapes, while
relationship names are positioned above the connecting lines.
3.2.3 Relational Data Model

 The relational data model uses two-dimensional tables called relations.


 Each relation consists of rows (records/tuples) and columns
(attributes/fields).
 Rows represent unique instances of data related to real-world entities.
 Columns describe the properties associated with those entities.
 It offers conceptual tools for representing the structure of a relational
database.
 The model captures collections of relations, attributes, and their
interrelationships.

3.2.4 Relational Database


 A relational database consists of a logically related set of tables.
 Records are represented as rows, while fields or attributes are represented
as columns in these tables.
 Relational Database Management System (RDMS) software is used to
implement relational databases.
 Primary keys are unique identifiers for records within a table
 Foreign keys are attributes that establish links between related tables

You might also like