0% found this document useful (0 votes)
22 views14 pages

Database Models Presentation

The document presents an overview of database models, specifically focusing on relational models which organize data into tables with defined relationships and constraints. It explains key components such as entities, attributes, and integrity constraints, highlighting the advantages and disadvantages of relational databases. The relational model emphasizes simplicity, ease of use, and data independence, while also noting potential complexities as data grows.

Uploaded by

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

Database Models Presentation

The document presents an overview of database models, specifically focusing on relational models which organize data into tables with defined relationships and constraints. It explains key components such as entities, attributes, and integrity constraints, highlighting the advantages and disadvantages of relational databases. The relational model emphasizes simplicity, ease of use, and data independence, while also noting potential complexities as data grows.

Uploaded by

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

DATABASE MODELS

Presentation by Alison Mudadisi.


DATA MODELS

It is an underlying structure of a
DATABASE
WHICH IS a conceptual tool that
describes the data, the relationship
between the data semantics and
constrains
WHAT IS A DATABASE ???

A DATABASE is a
systematic collection of data
which support electronic
storage and manipulation of
data. Or a collection of
interrelated DATA e.g. in
hospitals patient information
WHAT IS A DATABASE
MODEL
A DATABASE MODEL
shows the logical structure
of a database, including
the relationships and
constrains that determine
how data can be stored
and accessed.
RELATIONAL MODELS
• THIS MODEL represents data as relations or as a
collection of Tables
• A relation is nothing but a table of value, these
rows in the table represents a collection of related
values

• These models are commonly used to create


database for storing and retrieving information
quickly

• The idea behind the relational database is to store


all types of data in one table as long as each
column represents a unique piece of information,
1.1 TABLE SHOWING A STUDENTS INFORMATION IN A MIXED
CLASS

NAME SURNAME STUDENT COURSE


# NAME
ALISON MUDADISI W111 DATABASE
THANDIE MAGWAZA W117 GENDER
STUDIES
MIKEILAH KUSEMA W112 PROGRAMIN
G
LANGUAGES
KUDZAI MAILOS W232 INFORMATIO
N SYSTEMS
MAIN COMPONENTS OF THE RELATIONAL MODEL

• TABLE which is called RELATION (RECORD BASED MODEL) a table has


two properties rows and columns. Rows represents records and
columns represents attributes

• ENTITY defines what the table is about (either place of thing or date)

• Each column lists an attribute of the entity in question such as birth


date, name, price etc. together the attributes in a relation are called a
DOMAIN ,,they describe the particular characteristics of the entities
for example a student entity can be described by a students first
name last name date of birth etc.

1. EACH row also called a tuple, includes data about a specific


instance of the entity in question such as a particular student

2. A Domain is a set ofvalues allowed for an attribute

3. The model also accounts for the types of relationships between those
tables including, ONE-TO-ONE and ONE-TO-MANY relationships
For example
Domain for the attribute

Employee_ ages (would be set of attomic values


with ) possible ages of employee of a company
allowed to be between the ages (20 & 70)

A domain not only does it give a set of values that


are allowed for an attribute it also specifies the data
type allowed for example the age has to be a
positive integer
The purpose of a relational model is to provide a DECLARATIVE
METHOD (it focuses on the computational logic of the programming that
is focusing on getting the job done rather than hoe the job is getting
done)for specifying queries

Users only need to specify their needs and leave the rest up to the

RDBMS

To decide how to maintain the structure of the database while


data storage update and retrieval

The RDBMS hides the complexities of the model from the user, the user
needs to specify what Data they need to either retrieve or update from
the database and then RDBMS WILL make sure how to maintain the
structure of the database while performing all these operations
Constraints
Every relation has some conditions that must hold for it to be a valid
relation. These conditions are called Relational integrity
constrains

• There are three main integrity constrains:

1. Key constraints

2. Domain constraints

3. Referential constraints
Key constraints
There must be at least one minimal subset of attributes in the relation
which can identify a tuple uniquely .

This minimal subset is called a key for that relation.

If there are more than 1 such minimal subsets, these are called
candidate keys

Key constrains force that:

• in a relation with a key attribute, no two tuples can have identical


values for key attributes
• A key attribute cannot have NULL values

Key constrains are also referred to as Entity constraints


DOMAIN CONSTRAINTS
Attributes have specific values in real world scenario, for example age can
only be a positive integer.

Every attribute is bound to have a specific range of values for example age
cannot be less than 0 and telephone numbers can not contain a digit
outside 0-9

REFERENTIAL INTEGRITY CONSTRAINTS


These work on the concept of Foreign keys
A foreign key is a key attribute of a relation that can be referred in other
relations.

Referential integrity constraints states that if a relation refers to a key


attribute of a different of same relation, then that key element must exist
Advantages of a relational
model
1. SIMPLICITY OF THE MODEL

2. EASE OF USE, users can easily access/ retrieve required


information within seconds as the rows and columns are
simple to understand

3. Structural independence as it is only concerned with data and


not with a structure. This can improve the performance of the
model.

4. Scalable regarding a number of records, or rows and the


number of fields a database should be enlarged to enhance
its usability.

5. Data independence , the structure of a relational database


can be changed without having to change any application
Disadvantages of a relational
model

• Few relational database models have limits on field lengths which


cant be exceeded .

• Can sometimes become complex as the aunt of data grows, and


the relations between pieces of data become more complicated

• Complex systems may lead to isolated databases where the


information cannot be shared from one system to another

You might also like