SlideShare a Scribd company logo
1 of 47
WEL COME
PRAVEEN M JIGAJINNI
PGT (Computer Science)
MTech[IT],MPhil (Comp.Sci), MCA, MSc[IT], PGDCA, ADCA,
Dc. Sc. & Engg.
email: praveenkumarjigajinni@yahoo.co.in
Chapter 11
Database Concepts
Database Concepts
INTRODUCTION
Database is collection of interrelated data and database
system is basically a computer based record keeping
system.
It contains the information about one particular enterprise.
It maintains any information that may be necessary to the
decision making process involved in the management of
that organisation.
Database Concepts
WHY DATABASE?
A typical file processing system suffers from some major
limitations like,
Data Redundancy
Data Inconsistency
Un-sharable Data
Un-standardized Data
Insecure Data
Incorrect Data
On the other hand, a database system overcomes all
these limitations and ensures continues efficiency.
Database Concepts
ADVANTAGES OF DATABASE
The advantages provided by a database system are :
1. Reduced redundancy
2. Controlled data inconsistency
3. Shared Data
4. Standardized Data
5. Secured Data
6. Integrated Data
Database Concepts
ADVANTAGES OF DATABASE
1. Reduced redundancy:
Database redundancy means duplication of data. Non-
database systems maintain separate copy of data for each
application.
For example:
In college, student records are maintained and hostel also
maintains the student records for those students who live
in hostel. Though the records of hosteller students are
already being maintained by the college, the hostel keeps
separate copy of it. But this duplication of data leads to
inconstancy or incorrect data.
Database Concepts
ADVANTAGES OF DATABASE
2. Controlled Data Inconsistency:
When the redundancy is not controlled, there may be
occasions on which two entries about the same data do
not agree(that is one of them stores updated information
and the other does not.) at such times, database is said to
be inconsistence.
By controlling redundancy, the inconsistency is also
controlled. The database ensures any change is made to
either of the two entries is automatically made to the other.
This process is known as propagating update.
Database Concepts
ADVANTAGES OF DATABASE
3. Shared Data
Sharing of data mean that individual piece of data in the
database may be shared among several different users, in
the sense that each of those users may have access to the
same piece of data and each of them may use it for
different purposes.
Database Concepts
ADVANTAGES OF DATABASE
4. Standardized Data
The database management systems can ensure that all
the data (that is stored centrally) follow the applicable
standards. There may be certain standards laid by the
company or organization using the database.
Similarly, there may be national and or international
standards. Standardizing stored data formats is particularly
desirable as an aid to data interchange or migration
between systems.
Database Concepts
ADVANTAGES OF DATABASE
5. Secured Data
A database management system ensures data security
and privacy by ensuring that the only means of access is
through proper channel and also by carrying out
authorization checks whenever access to sensitive data is
attempted.
Data Security: Data security refers to protection of data against
accidental or intentional disclosure to unauthorized persons, or
unauthorized modification or destructions.
Privacy of Data: it refers to the rights of individuals and
organizations to determine for themselves when, how and what
extent information about them is to be transmitted to others
Database Concepts
ADVANTAGES OF DATABASE
6. Integrated Data
When database contains data employed by many different
users it is important that association between data items
not to be destroyed. Hardware failures and various types
of accidents will occur occasionally. The storage of data
and its updation, and insertion procedures defined by the
database, are such that the system can easily recover
from these circumstances without harm to the data.
The database management system designs certain
integrity checks to ensure that data values confirm to some
specified rules. For example date cant be like 25/25/12; it
is invalid date.
Database Concepts
DATABASE ABSTRACTION
Data abstraction simplifies database design. The major
purpose of a database system is to provide users with
an abstract view of the system. The system hides certain
details of how data is stored and created and maintained
Complexity should be hidden from database users.
Three Levels of Abstractions are,
1.Physical Level (Internal Level)
2.Conceptual Level
3.External Level (View Level)
Database Concepts
THREE LEVELS OF ABSTRACTION
VIEW 1 VIEW 2 VIEW n
CONCEPTUAL LEVEL
PHYSICAL LEVEL
…….
Database Concepts
1. PHYSICAL LEVEL (INTERNAL OR LOW LEVEL)
It defines how data is stored. It is very complex and used
by developers. & it deals with,
How the data are stored.
E.g. index, B-tree, hashing.
Interface between OS and record structure.
Lowest level of abstraction.
Complex low-level structures described in detail.
Database Concepts
1. CONCEPTUAL LEVEL
It defines data in terms of a data model. It tells what
data is stored and described in small numbers. This
level is usually used by DBA (Database administrator)
& it deals with,
Next highest level of abstraction.
Describes what data are stored.
Describes the relationships among data.
Database administrator level.
Database Concepts
1. EXTERNAL LEVEL OR VIEW LEVEL
It defines a number of simplified domain-specific views.
It describes only part of databases. This level is used
by users.
Highest level.
Describes part of the database for a particular group
of users.
Can be many different views of a database.
E.g. In a School get a view of Student details, but not
of payroll data of employees or teachers of the school.
Database Concepts
EXAMPLE OF THREE LEVELS OF ABSTRACTION
VIEW 1
Student Name,
Marks
VIEW 2
Roll No,
Marks
VIEW 3
Student
Name,Address
CONCEPTUAL LEVEL
Student Name char(25)
RollNo int
Address char(50)
Marks float
PHYSICAL LEVEL
Student name type=byte(25) offset =3
Rollno type=byte(2) offset = 28
….
Database Concepts
DATA INDEPENDENCE
The ability to modify a scheme definition in one level
without affecting a scheme definition in the next higher
level is called DATA INDEPENDENCE
A major objective for three-level architecture is to
provide data independence, which means that upper
levels are unaffected by changes in lower levels.
There are two kinds of data independence:
 Logical data independence
 Physical data independence
Database Concepts
DATA INDEPENDENCE
LOGICAL SCHEMA
PHYSICAL SCHEMA
………………………………………..
Database Concepts
DATA INDEPENDENCE
SCHEMA
schema is nothing but definition of objects/tables
in a database.
A schema is the set of metadata (data dictionary) used
by the database, typically generated using DDL. It
defines attributes of the database, such as tables,
columns, and properties. A database schema is a
description of the data in a database.
One or more schemas can reside on the same
database.
Database Concepts
DATA INDEPENDENCE
SCHEMA
A logical schema won't exist in your database. A logical
schema is a design-centric database structure built to meet
your business requirements. It is a model that exists on a
white board or in a diagramming tool. It is like the architect's
drawings of your database.
Logical schema is made out of actually what you plan(your
initial data model) and it's objects are:
 Tablespaces
 Tables
 Views
 procedures
Database Concepts
DATA INDEPENDENCE
SCHEMA
A Physical schema is a term used in data management to
describe how data is to be represented and stored (files,
indices, et al.) in secondary storage using a particular
database management system (DBMS) (e.g., Oracle
RDBMS, Sybase SQL Server, etc.).
A Physical schema is one where you have your data files,
redo logs, control files etc, physical objects that reside on a
O.S. and are in row state. These objects are used by logical
structures to make our data make sense and readable.
Database Concepts
DATA INDEPENDENCE
LOGICAL DATA INDEPENDENCE
Logical data independence indicates that the conceptual
schema can be changed without affecting the existing
external schemas.
Logical data is data about database, that is, it stores
information about how data is managed inside. For example,
a table (relation) stored in the database and all constraints,
which are applied on that relation.
Logical data independence is a kind of mechanism, which
liberalizes itself from actual data stored on the disk. If we do
some changes on table format it should not change the data
residing on disk.
Database Concepts
DATA INDEPENDENCE
PHYSICAL DATA INDEPENDENCE
Physical data independence indicates that the physical
storage structures or devices could be changed without
affecting conceptual schema.
All schemas are logical and actual data is stored in bit
format on the disk. Physical data independence is the power
to change the physical data without impacting the schema or
logical data.
For example, in case we want to change or upgrade the
storage system itself, that is, using SSD instead of Hard-
disks should not have any impact on logical data or
schemas.
Database Concepts
DATA MODELS
A database model is a specification describing how a
database is structured and used.
A data model organizes data elements and
standardizes how the data elements relate to one
another.
Data model tells how the logical structure of a database
is modelled. Data Models are fundamental entities to
introduce abstraction in DBMS. Data models define
how data is connected to each other and how it will be
processed and stored inside the system.
Database Concepts
DATA MODELS
There are three types of Data Models,
 Relational Model
 Network Model
 Hierarchical Model
Database Concepts
DATA MODELS
RELATIONAL MODEL
Relational data model is the primary data model, which is used
widely around the world for data storage and processing. This
model is simple and have all the properties and capabilities
required to process data with storage efficiency.
In the relational model, all data must be stored in relations (tables),
and each relation consists of rows and columns. Each relation
must have a header and body. The header is simply the list of
columns in the relation. The body is the set of data that actually
populates the relation, organized into rows. You can extrapolate
(extend) that the junction of one column and one row will result in a
unique value - this value is called a tuple.
Database Concepts
DATA MODELS
RELATIONAL MODEL
The second major characteristic of the relational model is the
usage of keys. These are specially designated columns within a
relation, used to order data or relate data to other relations. One of
the most important keys is the primary key, which is used to
uniquely identify each row of data. To make querying for data
easier, most relational databases go further and physically order
the data by the primary key. Foreign keys relate data in one
relation to the primary key of another relation.
Database Concepts
DATA MODELS
RELATIONAL MODEL – AN EXAMPLE
Database Concepts
DATA MODELS
RELATIONAL MODEL - CONCEPT
Tables: In relation data model, relations are saved in the format of
Tables. This format stores the relation among entities. A table has
rows and columns, where rows represent records and columns
represents the attributes.
Tuple: A single row of a table, which contains a single record for that
relation is called a tuple.
Attribute : columns are referred as attributes.
Domain: A pool of values from which the actual values appearing in a
given column are drawn.
Database Concepts
DATA MODELS
RELATIONAL MODEL - CONCEPT
What does Primary Key mean?
A primary key is a special relational database table column (or
combination of columns) designated to uniquely identify all table
records.
A primary key’s main features are:
 It must contain a unique value for each row of data.
 It cannot contain null values.
A primary key is either an existing table column or a column that is
specifically generated by the database according to a defined
sequence.
Database Concepts
DATA MODELS
RELATIONAL MODEL - CONCEPT
primary key field
PRMARY KEY - TABLE - CUSTOMERS
Primary key is a unique identifier of records in a table.
Primary key values may be generated manually or automatically.
Database Concepts
DATA MODELS
RELATIONAL MODEL - CONCEPT
What does Foreign Key mean?
A foreign key (REFERENTIAL INTEGRITY) is a column or group of
columns in a relational database table that provides a link between
data in two tables. It acts as a cross-reference between tables
because it references the primary key of another table, thereby
establishing a link between them.
The majority of tables in a relational database system adhere to the
foreign key concept. In complex databases and data warehouses,
data in a domain must be added across multiple tables, thus
maintaining a relationship between them. The concept of referential
integrity is derived from foreign key theory. Foreign keys and their
implementation are more complex than primary keys.
FOREIGN KEY
Foreign key field
Primary key field
Parent table
Directors
Movies
Child table
Relationship
Database Concepts
DATA MODELS
RELATIONAL MODEL - CONCEPT
What does Candidate Key mean?
All the attribute combinations inside a relation that can serve
primary key are candidate keys as they are candidates for
the primary key position.
What does Alternate Key mean?
A candidate key that is not the primary key is called alternate
key.
Database Concepts
DATA MODELS
NETWORK MODEL – CONCEPT
Developed in mid 1960s as part of work of CODASYL
(Conference on Data Systems Languages) which proposed
programming language COBOL (1966) and then network
model (1971). Objective of network model is to separate data
structure from physical storage, eliminate unnecessary
duplication of data with associated errors and costs.
 uses concept of a data definition language, data
manipulation language.
 uses concept of m:n linkages or relationships.
an owner record can have many member records.
a member record can have several owners.
Database Concepts
DATA MODELS
NETWORK MODEL – CONCEPT
Example of a Network Database
a hospital database has three record types:
patient: name, date of admission, etc.
doctor: name, etc.
ward: number of beds, name of staff nurse, etc.
Need to link patients to doctor, also to ward
Doctor record can own many patient records
Patient record can be owned by both doctor and ward
records.
 Network DBMSs include methods for building and redefining
linkages, e.g. when patient is assigned to ward.
Database Concepts
DATA MODELS
NETWORK MODEL – CONCEPT
Restrictions
Links between records of the same type are not allowed while a
record can be owned by several records of different types, it
cannot be owned by more than one record of the same type
(patient can have only one doctor, only one ward).
Summary
 The network model has greater flexibility than the
hierarchical model for handling complex spatial relationships.
 it has not had widespread use as a basis for GIS because of
the greater flexibility of the relational model.
Database Concepts
DATA MODELS
NETWORK MODEL – CONCEPT
Database Concepts
DATA MODELS
HIERARCHICAL MODEL – CONCEPT
Early 1960s, IBM saw business world organizing data in the form
of a hierarchy.
Rather than one record type (flat file), a business has to deal
with several types which are hierarchically related to each
other
e.g. Company has several departments, each with attributes:
name of director, number of staff, address
each department requires several parts to make its
product, with attributes: part number, number in stock
each part may have several suppliers, with attributes:
address, price.
Database Concepts
DATA MODELS
HIERARCHICAL MODEL – CONCEPT
certain types of geographical data may fit the hierarchical model
well.
e.g. Census data organized by state, within state by city, within
city by census.
The database keeps track of the different record types, their
attributes, and the hierarchical relationships between them
the attribute which assigns records to levels in the database
structure is called the key.
Database Concepts
DATA MODELS
HIERARCHICAL MODEL – CONCEPT
Summary of features
 a set of record "types"
e.g. supplier record type, department record type, part record
type
 a set of links connecting all record types in one data structure
diagram (tree).
 at most one link between two record types, hence links need
not be named.
 for every record, there is only one parent record at the next
level up in the tree.
e.g. every county has exactly one state, every part has
exactly one department.
Database Concepts
DATA MODELS
HIERARCHICAL MODEL – CONCEPT
Summary of features
 no connections between occurrences of the same record
type cannot go between records at the same level unless
they share the same parent.
Advantages and disadvantages (Next Slide)
Database Concepts
DATA MODELS
HIERARCHICAL MODEL – CONCEPT
Advantages and disadvantages
 data must possess a tree structure
tree structure is natural for geographical data
 data access is easy via the key attribute, but difficult for other
attributes.
in the business case, easy to find record given its type
(department, part or supplier).
in the geographical case, easy to find record given its
geographical level (state, county, city, census tract), but
difficult to find it given any other attribute
e.g. find the records with population 5,000 or less
Database Concepts
DATA MODELS
HIERARCHICAL MODEL – CONCEPT
Advantages and disadvantages
 tree structure is inflexible
cannot define new linkages between records once the tree
is established.
e.g. in the geographical case, new relationships between objects
cannot define linkages laterally or diagonally in the tree, only
vertically.
 the only geographical relationships which can be coded
easily are "is contained in" or "belongs to“.
?Any Questions Please
Thank You
Very Much

More Related Content

What's hot

Database design process
Database design processDatabase design process
Database design processTayyab Hameed
 
Relational database
Relational database Relational database
Relational database Megha Sharma
 
1. Introduction to DBMS
1. Introduction to DBMS1. Introduction to DBMS
1. Introduction to DBMSkoolkampus
 
Dbms Introduction and Basics
Dbms Introduction and BasicsDbms Introduction and Basics
Dbms Introduction and BasicsSHIKHA GAUTAM
 
Database Design
Database DesignDatabase Design
Database Designlearnt
 
Database Management System Introduction
Database Management System IntroductionDatabase Management System Introduction
Database Management System IntroductionSmriti Jain
 
Database administrator
Database administratorDatabase administrator
Database administratorTech_MX
 
Database Presentation
Database PresentationDatabase Presentation
Database Presentationa9oolq8
 
Database system environment ppt.
Database system environment ppt.Database system environment ppt.
Database system environment ppt.yhen06
 
Introduction to database
Introduction to databaseIntroduction to database
Introduction to databasePradnya Saval
 
Chapter-1 Introduction to Database Management Systems
Chapter-1 Introduction to Database Management SystemsChapter-1 Introduction to Database Management Systems
Chapter-1 Introduction to Database Management SystemsKunal Anand
 
Introduction to databases
Introduction to databasesIntroduction to databases
Introduction to databasesBryan Corpuz
 

What's hot (20)

Basic DBMS ppt
Basic DBMS pptBasic DBMS ppt
Basic DBMS ppt
 
Rdbms
RdbmsRdbms
Rdbms
 
Database and types of database
Database and types of databaseDatabase and types of database
Database and types of database
 
Dbms architecture
Dbms architectureDbms architecture
Dbms architecture
 
Database design process
Database design processDatabase design process
Database design process
 
Relational database
Relational database Relational database
Relational database
 
1. Introduction to DBMS
1. Introduction to DBMS1. Introduction to DBMS
1. Introduction to DBMS
 
Dbms and rdbms ppt
Dbms and rdbms pptDbms and rdbms ppt
Dbms and rdbms ppt
 
Dbms Introduction and Basics
Dbms Introduction and BasicsDbms Introduction and Basics
Dbms Introduction and Basics
 
Dbms
DbmsDbms
Dbms
 
Database Design
Database DesignDatabase Design
Database Design
 
Data dictionary
Data dictionaryData dictionary
Data dictionary
 
Database Management System Introduction
Database Management System IntroductionDatabase Management System Introduction
Database Management System Introduction
 
Database administrator
Database administratorDatabase administrator
Database administrator
 
Database Presentation
Database PresentationDatabase Presentation
Database Presentation
 
Database system environment ppt.
Database system environment ppt.Database system environment ppt.
Database system environment ppt.
 
Introduction to database
Introduction to databaseIntroduction to database
Introduction to database
 
Chapter-1 Introduction to Database Management Systems
Chapter-1 Introduction to Database Management SystemsChapter-1 Introduction to Database Management Systems
Chapter-1 Introduction to Database Management Systems
 
Data warehousing
Data warehousingData warehousing
Data warehousing
 
Introduction to databases
Introduction to databasesIntroduction to databases
Introduction to databases
 

Viewers also liked

Database management system chapter12
Database management system chapter12Database management system chapter12
Database management system chapter12Md. Mahedi Mahfuj
 
Database System Concepts and Architecture
Database System Concepts and ArchitectureDatabase System Concepts and Architecture
Database System Concepts and Architecturesontumax
 
Dimensional data model
Dimensional data modelDimensional data model
Dimensional data modelVnktp1
 
Datawarehousing
DatawarehousingDatawarehousing
Datawarehousingwork
 
Database , 1 Introduction
 Database , 1 Introduction Database , 1 Introduction
Database , 1 IntroductionAli Usman
 
14 e commerce,water pollution,positive and negative effect of technology
14 e commerce,water pollution,positive and negative effect of technology14 e commerce,water pollution,positive and negative effect of technology
14 e commerce,water pollution,positive and negative effect of technologyIrfan Hussain
 
Internet threats and its effect on E-commerce
Internet threats and its effect on E-commerceInternet threats and its effect on E-commerce
Internet threats and its effect on E-commerceVipin Subhash
 
Chapter 1 Fundamentals of Database Management System
Chapter 1 Fundamentals of Database Management SystemChapter 1 Fundamentals of Database Management System
Chapter 1 Fundamentals of Database Management SystemEddyzulham Mahluzydde
 

Viewers also liked (14)

Database management system chapter12
Database management system chapter12Database management system chapter12
Database management system chapter12
 
Database System Concepts and Architecture
Database System Concepts and ArchitectureDatabase System Concepts and Architecture
Database System Concepts and Architecture
 
Dimensional data model
Dimensional data modelDimensional data model
Dimensional data model
 
Datawarehousing
DatawarehousingDatawarehousing
Datawarehousing
 
Database , 1 Introduction
 Database , 1 Introduction Database , 1 Introduction
Database , 1 Introduction
 
14 e commerce,water pollution,positive and negative effect of technology
14 e commerce,water pollution,positive and negative effect of technology14 e commerce,water pollution,positive and negative effect of technology
14 e commerce,water pollution,positive and negative effect of technology
 
Internet threats and its effect on E-commerce
Internet threats and its effect on E-commerceInternet threats and its effect on E-commerce
Internet threats and its effect on E-commerce
 
Internet & Its Impact in E-Commerce
Internet & Its Impact in E-CommerceInternet & Its Impact in E-Commerce
Internet & Its Impact in E-Commerce
 
8 E-Commerce
8 E-Commerce8 E-Commerce
8 E-Commerce
 
Types dbms
Types dbmsTypes dbms
Types dbms
 
Chapter 1 Fundamentals of Database Management System
Chapter 1 Fundamentals of Database Management SystemChapter 1 Fundamentals of Database Management System
Chapter 1 Fundamentals of Database Management System
 
Introduction to database
Introduction to databaseIntroduction to database
Introduction to database
 
Database - Design & Implementation - 1
Database - Design & Implementation - 1Database - Design & Implementation - 1
Database - Design & Implementation - 1
 
E-COMMERCE
E-COMMERCEE-COMMERCE
E-COMMERCE
 

Similar to Database Concepts Chapter Summary

Database Systems - introduction
Database Systems - introductionDatabase Systems - introduction
Database Systems - introductionJananath Banuka
 
Ch-1-Introduction-to-Database.pdf
Ch-1-Introduction-to-Database.pdfCh-1-Introduction-to-Database.pdf
Ch-1-Introduction-to-Database.pdfMrjJoker1
 
Complete book Database management systems Handbook 3rd edition by Muhammad Sh...
Complete book Database management systems Handbook 3rd edition by Muhammad Sh...Complete book Database management systems Handbook 3rd edition by Muhammad Sh...
Complete book Database management systems Handbook 3rd edition by Muhammad Sh...Bahria University Islamabad, Pakistan
 
Complete book Database management systems Handbook 3rd edition by Muhammad Sh...
Complete book Database management systems Handbook 3rd edition by Muhammad Sh...Complete book Database management systems Handbook 3rd edition by Muhammad Sh...
Complete book Database management systems Handbook 3rd edition by Muhammad Sh...Bahria University Islamabad, Pakistan
 
Full book Database system Handbook 3rd edition by Muhammad Sharif.pdf
Full book Database system Handbook 3rd edition by Muhammad Sharif.pdfFull book Database system Handbook 3rd edition by Muhammad Sharif.pdf
Full book Database system Handbook 3rd edition by Muhammad Sharif.pdfBahria University Islamabad, Pakistan
 
Full book Database system Handbook 3rd edition by Muhammad Sharif.pdf
Full book Database system Handbook 3rd edition by Muhammad Sharif.pdfFull book Database system Handbook 3rd edition by Muhammad Sharif.pdf
Full book Database system Handbook 3rd edition by Muhammad Sharif.pdfBahria University Islamabad, Pakistan
 
Complete book Database management systems Handbook 3rd edition by Muhammad Sh...
Complete book Database management systems Handbook 3rd edition by Muhammad Sh...Complete book Database management systems Handbook 3rd edition by Muhammad Sh...
Complete book Database management systems Handbook 3rd edition by Muhammad Sh...Bahria University Islamabad, Pakistan
 

Similar to Database Concepts Chapter Summary (20)

Dbms unit i
Dbms unit iDbms unit i
Dbms unit i
 
Dbms notes
Dbms notesDbms notes
Dbms notes
 
Database Systems - introduction
Database Systems - introductionDatabase Systems - introduction
Database Systems - introduction
 
Ch-1-Introduction-to-Database.pdf
Ch-1-Introduction-to-Database.pdfCh-1-Introduction-to-Database.pdf
Ch-1-Introduction-to-Database.pdf
 
Complete book Database management systems Handbook 3rd edition by Muhammad Sh...
Complete book Database management systems Handbook 3rd edition by Muhammad Sh...Complete book Database management systems Handbook 3rd edition by Muhammad Sh...
Complete book Database management systems Handbook 3rd edition by Muhammad Sh...
 
Complete book Database management systems Handbook 3rd edition by Muhammad Sh...
Complete book Database management systems Handbook 3rd edition by Muhammad Sh...Complete book Database management systems Handbook 3rd edition by Muhammad Sh...
Complete book Database management systems Handbook 3rd edition by Muhammad Sh...
 
Full book Database system Handbook 3rd edition by Muhammad Sharif.pdf
Full book Database system Handbook 3rd edition by Muhammad Sharif.pdfFull book Database system Handbook 3rd edition by Muhammad Sharif.pdf
Full book Database system Handbook 3rd edition by Muhammad Sharif.pdf
 
Full book Database system Handbook 3rd edition by Muhammad Sharif.pdf
Full book Database system Handbook 3rd edition by Muhammad Sharif.pdfFull book Database system Handbook 3rd edition by Muhammad Sharif.pdf
Full book Database system Handbook 3rd edition by Muhammad Sharif.pdf
 
Complete book Database management systems Handbook 3rd edition by Muhammad Sh...
Complete book Database management systems Handbook 3rd edition by Muhammad Sh...Complete book Database management systems Handbook 3rd edition by Muhammad Sh...
Complete book Database management systems Handbook 3rd edition by Muhammad Sh...
 
Database systems Handbook 2V.pdf
Database systems Handbook 2V.pdfDatabase systems Handbook 2V.pdf
Database systems Handbook 2V.pdf
 
Database systems Handbook.pdf
Database systems Handbook.pdfDatabase systems Handbook.pdf
Database systems Handbook.pdf
 
Muhammad Sharif Database systems Handbook.pdf
Muhammad Sharif  Database systems Handbook.pdfMuhammad Sharif  Database systems Handbook.pdf
Muhammad Sharif Database systems Handbook.pdf
 
Database systems Handbook.pdf
Database systems Handbook.pdfDatabase systems Handbook.pdf
Database systems Handbook.pdf
 
Muhammad Sharif Database systems Handbook.pdf
Muhammad Sharif  Database systems Handbook.pdfMuhammad Sharif  Database systems Handbook.pdf
Muhammad Sharif Database systems Handbook.pdf
 
Database systems Handbook database systems muhammad sharif.pdf
Database systems Handbook database systems muhammad sharif.pdfDatabase systems Handbook database systems muhammad sharif.pdf
Database systems Handbook database systems muhammad sharif.pdf
 
Database system Handbook.pdf
Database system Handbook.pdfDatabase system Handbook.pdf
Database system Handbook.pdf
 
Database systems Handbook by Muhammad Sharif dba.pdf
Database systems Handbook by Muhammad Sharif dba.pdfDatabase systems Handbook by Muhammad Sharif dba.pdf
Database systems Handbook by Muhammad Sharif dba.pdf
 
Database system Handbook.pdf
Database system Handbook.pdfDatabase system Handbook.pdf
Database system Handbook.pdf
 
Database system Handbook.pdf
Database system Handbook.pdfDatabase system Handbook.pdf
Database system Handbook.pdf
 
Database systems Handbook.pdf
Database systems Handbook.pdfDatabase systems Handbook.pdf
Database systems Handbook.pdf
 

More from Praveen M Jigajinni

Chapter 09 design and analysis of algorithms
Chapter 09  design and analysis of algorithmsChapter 09  design and analysis of algorithms
Chapter 09 design and analysis of algorithmsPraveen M Jigajinni
 
Chapter 06 constructors and destructors
Chapter 06 constructors and destructorsChapter 06 constructors and destructors
Chapter 06 constructors and destructorsPraveen M Jigajinni
 
Chapter 04 object oriented programming
Chapter 04 object oriented programmingChapter 04 object oriented programming
Chapter 04 object oriented programmingPraveen M Jigajinni
 
Chapter 8 getting started with python
Chapter 8 getting started with pythonChapter 8 getting started with python
Chapter 8 getting started with pythonPraveen M Jigajinni
 
Chapter 7 basics of computational thinking
Chapter 7 basics of computational thinkingChapter 7 basics of computational thinking
Chapter 7 basics of computational thinkingPraveen M Jigajinni
 
Chapter 6 algorithms and flow charts
Chapter 6  algorithms and flow chartsChapter 6  algorithms and flow charts
Chapter 6 algorithms and flow chartsPraveen M Jigajinni
 

More from Praveen M Jigajinni (20)

Chapter 09 design and analysis of algorithms
Chapter 09  design and analysis of algorithmsChapter 09  design and analysis of algorithms
Chapter 09 design and analysis of algorithms
 
Chapter 08 data file handling
Chapter 08 data file handlingChapter 08 data file handling
Chapter 08 data file handling
 
Chapter 07 inheritance
Chapter 07 inheritanceChapter 07 inheritance
Chapter 07 inheritance
 
Chapter 06 constructors and destructors
Chapter 06 constructors and destructorsChapter 06 constructors and destructors
Chapter 06 constructors and destructors
 
Chapter 05 classes and objects
Chapter 05 classes and objectsChapter 05 classes and objects
Chapter 05 classes and objects
 
Chapter 04 object oriented programming
Chapter 04 object oriented programmingChapter 04 object oriented programming
Chapter 04 object oriented programming
 
Chapter 03 python libraries
Chapter 03 python librariesChapter 03 python libraries
Chapter 03 python libraries
 
Chapter 02 functions -class xii
Chapter 02   functions -class xiiChapter 02   functions -class xii
Chapter 02 functions -class xii
 
Unit 3 MongDB
Unit 3 MongDBUnit 3 MongDB
Unit 3 MongDB
 
Chapter 17 Tuples
Chapter 17 TuplesChapter 17 Tuples
Chapter 17 Tuples
 
Chapter 15 Lists
Chapter 15 ListsChapter 15 Lists
Chapter 15 Lists
 
Chapter 14 strings
Chapter 14 stringsChapter 14 strings
Chapter 14 strings
 
Chapter 13 exceptional handling
Chapter 13 exceptional handlingChapter 13 exceptional handling
Chapter 13 exceptional handling
 
Chapter 10 data handling
Chapter 10 data handlingChapter 10 data handling
Chapter 10 data handling
 
Chapter 9 python fundamentals
Chapter 9 python fundamentalsChapter 9 python fundamentals
Chapter 9 python fundamentals
 
Chapter 8 getting started with python
Chapter 8 getting started with pythonChapter 8 getting started with python
Chapter 8 getting started with python
 
Chapter 7 basics of computational thinking
Chapter 7 basics of computational thinkingChapter 7 basics of computational thinking
Chapter 7 basics of computational thinking
 
Chapter 6 algorithms and flow charts
Chapter 6  algorithms and flow chartsChapter 6  algorithms and flow charts
Chapter 6 algorithms and flow charts
 
Chapter 5 boolean algebra
Chapter 5 boolean algebraChapter 5 boolean algebra
Chapter 5 boolean algebra
 
Chapter 4 number system
Chapter 4 number systemChapter 4 number system
Chapter 4 number system
 

Recently uploaded

Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxsqpmdrvczh
 
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxLigayaBacuel1
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 

Recently uploaded (20)

Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptx
 
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 

Database Concepts Chapter Summary

  • 1. WEL COME PRAVEEN M JIGAJINNI PGT (Computer Science) MTech[IT],MPhil (Comp.Sci), MCA, MSc[IT], PGDCA, ADCA, Dc. Sc. & Engg. email: praveenkumarjigajinni@yahoo.co.in
  • 3. Database Concepts INTRODUCTION Database is collection of interrelated data and database system is basically a computer based record keeping system. It contains the information about one particular enterprise. It maintains any information that may be necessary to the decision making process involved in the management of that organisation.
  • 4. Database Concepts WHY DATABASE? A typical file processing system suffers from some major limitations like, Data Redundancy Data Inconsistency Un-sharable Data Un-standardized Data Insecure Data Incorrect Data On the other hand, a database system overcomes all these limitations and ensures continues efficiency.
  • 5. Database Concepts ADVANTAGES OF DATABASE The advantages provided by a database system are : 1. Reduced redundancy 2. Controlled data inconsistency 3. Shared Data 4. Standardized Data 5. Secured Data 6. Integrated Data
  • 6. Database Concepts ADVANTAGES OF DATABASE 1. Reduced redundancy: Database redundancy means duplication of data. Non- database systems maintain separate copy of data for each application. For example: In college, student records are maintained and hostel also maintains the student records for those students who live in hostel. Though the records of hosteller students are already being maintained by the college, the hostel keeps separate copy of it. But this duplication of data leads to inconstancy or incorrect data.
  • 7. Database Concepts ADVANTAGES OF DATABASE 2. Controlled Data Inconsistency: When the redundancy is not controlled, there may be occasions on which two entries about the same data do not agree(that is one of them stores updated information and the other does not.) at such times, database is said to be inconsistence. By controlling redundancy, the inconsistency is also controlled. The database ensures any change is made to either of the two entries is automatically made to the other. This process is known as propagating update.
  • 8. Database Concepts ADVANTAGES OF DATABASE 3. Shared Data Sharing of data mean that individual piece of data in the database may be shared among several different users, in the sense that each of those users may have access to the same piece of data and each of them may use it for different purposes.
  • 9. Database Concepts ADVANTAGES OF DATABASE 4. Standardized Data The database management systems can ensure that all the data (that is stored centrally) follow the applicable standards. There may be certain standards laid by the company or organization using the database. Similarly, there may be national and or international standards. Standardizing stored data formats is particularly desirable as an aid to data interchange or migration between systems.
  • 10. Database Concepts ADVANTAGES OF DATABASE 5. Secured Data A database management system ensures data security and privacy by ensuring that the only means of access is through proper channel and also by carrying out authorization checks whenever access to sensitive data is attempted. Data Security: Data security refers to protection of data against accidental or intentional disclosure to unauthorized persons, or unauthorized modification or destructions. Privacy of Data: it refers to the rights of individuals and organizations to determine for themselves when, how and what extent information about them is to be transmitted to others
  • 11. Database Concepts ADVANTAGES OF DATABASE 6. Integrated Data When database contains data employed by many different users it is important that association between data items not to be destroyed. Hardware failures and various types of accidents will occur occasionally. The storage of data and its updation, and insertion procedures defined by the database, are such that the system can easily recover from these circumstances without harm to the data. The database management system designs certain integrity checks to ensure that data values confirm to some specified rules. For example date cant be like 25/25/12; it is invalid date.
  • 12. Database Concepts DATABASE ABSTRACTION Data abstraction simplifies database design. The major purpose of a database system is to provide users with an abstract view of the system. The system hides certain details of how data is stored and created and maintained Complexity should be hidden from database users. Three Levels of Abstractions are, 1.Physical Level (Internal Level) 2.Conceptual Level 3.External Level (View Level)
  • 13. Database Concepts THREE LEVELS OF ABSTRACTION VIEW 1 VIEW 2 VIEW n CONCEPTUAL LEVEL PHYSICAL LEVEL …….
  • 14. Database Concepts 1. PHYSICAL LEVEL (INTERNAL OR LOW LEVEL) It defines how data is stored. It is very complex and used by developers. & it deals with, How the data are stored. E.g. index, B-tree, hashing. Interface between OS and record structure. Lowest level of abstraction. Complex low-level structures described in detail.
  • 15. Database Concepts 1. CONCEPTUAL LEVEL It defines data in terms of a data model. It tells what data is stored and described in small numbers. This level is usually used by DBA (Database administrator) & it deals with, Next highest level of abstraction. Describes what data are stored. Describes the relationships among data. Database administrator level.
  • 16. Database Concepts 1. EXTERNAL LEVEL OR VIEW LEVEL It defines a number of simplified domain-specific views. It describes only part of databases. This level is used by users. Highest level. Describes part of the database for a particular group of users. Can be many different views of a database. E.g. In a School get a view of Student details, but not of payroll data of employees or teachers of the school.
  • 17. Database Concepts EXAMPLE OF THREE LEVELS OF ABSTRACTION VIEW 1 Student Name, Marks VIEW 2 Roll No, Marks VIEW 3 Student Name,Address CONCEPTUAL LEVEL Student Name char(25) RollNo int Address char(50) Marks float PHYSICAL LEVEL Student name type=byte(25) offset =3 Rollno type=byte(2) offset = 28 ….
  • 18. Database Concepts DATA INDEPENDENCE The ability to modify a scheme definition in one level without affecting a scheme definition in the next higher level is called DATA INDEPENDENCE A major objective for three-level architecture is to provide data independence, which means that upper levels are unaffected by changes in lower levels. There are two kinds of data independence:  Logical data independence  Physical data independence
  • 19. Database Concepts DATA INDEPENDENCE LOGICAL SCHEMA PHYSICAL SCHEMA ………………………………………..
  • 20. Database Concepts DATA INDEPENDENCE SCHEMA schema is nothing but definition of objects/tables in a database. A schema is the set of metadata (data dictionary) used by the database, typically generated using DDL. It defines attributes of the database, such as tables, columns, and properties. A database schema is a description of the data in a database. One or more schemas can reside on the same database.
  • 21. Database Concepts DATA INDEPENDENCE SCHEMA A logical schema won't exist in your database. A logical schema is a design-centric database structure built to meet your business requirements. It is a model that exists on a white board or in a diagramming tool. It is like the architect's drawings of your database. Logical schema is made out of actually what you plan(your initial data model) and it's objects are:  Tablespaces  Tables  Views  procedures
  • 22. Database Concepts DATA INDEPENDENCE SCHEMA A Physical schema is a term used in data management to describe how data is to be represented and stored (files, indices, et al.) in secondary storage using a particular database management system (DBMS) (e.g., Oracle RDBMS, Sybase SQL Server, etc.). A Physical schema is one where you have your data files, redo logs, control files etc, physical objects that reside on a O.S. and are in row state. These objects are used by logical structures to make our data make sense and readable.
  • 23. Database Concepts DATA INDEPENDENCE LOGICAL DATA INDEPENDENCE Logical data independence indicates that the conceptual schema can be changed without affecting the existing external schemas. Logical data is data about database, that is, it stores information about how data is managed inside. For example, a table (relation) stored in the database and all constraints, which are applied on that relation. Logical data independence is a kind of mechanism, which liberalizes itself from actual data stored on the disk. If we do some changes on table format it should not change the data residing on disk.
  • 24. Database Concepts DATA INDEPENDENCE PHYSICAL DATA INDEPENDENCE Physical data independence indicates that the physical storage structures or devices could be changed without affecting conceptual schema. All schemas are logical and actual data is stored in bit format on the disk. Physical data independence is the power to change the physical data without impacting the schema or logical data. For example, in case we want to change or upgrade the storage system itself, that is, using SSD instead of Hard- disks should not have any impact on logical data or schemas.
  • 25. Database Concepts DATA MODELS A database model is a specification describing how a database is structured and used. A data model organizes data elements and standardizes how the data elements relate to one another. Data model tells how the logical structure of a database is modelled. Data Models are fundamental entities to introduce abstraction in DBMS. Data models define how data is connected to each other and how it will be processed and stored inside the system.
  • 26. Database Concepts DATA MODELS There are three types of Data Models,  Relational Model  Network Model  Hierarchical Model
  • 27. Database Concepts DATA MODELS RELATIONAL MODEL Relational data model is the primary data model, which is used widely around the world for data storage and processing. This model is simple and have all the properties and capabilities required to process data with storage efficiency. In the relational model, all data must be stored in relations (tables), and each relation consists of rows and columns. Each relation must have a header and body. The header is simply the list of columns in the relation. The body is the set of data that actually populates the relation, organized into rows. You can extrapolate (extend) that the junction of one column and one row will result in a unique value - this value is called a tuple.
  • 28. Database Concepts DATA MODELS RELATIONAL MODEL The second major characteristic of the relational model is the usage of keys. These are specially designated columns within a relation, used to order data or relate data to other relations. One of the most important keys is the primary key, which is used to uniquely identify each row of data. To make querying for data easier, most relational databases go further and physically order the data by the primary key. Foreign keys relate data in one relation to the primary key of another relation.
  • 30. Database Concepts DATA MODELS RELATIONAL MODEL - CONCEPT Tables: In relation data model, relations are saved in the format of Tables. This format stores the relation among entities. A table has rows and columns, where rows represent records and columns represents the attributes. Tuple: A single row of a table, which contains a single record for that relation is called a tuple. Attribute : columns are referred as attributes. Domain: A pool of values from which the actual values appearing in a given column are drawn.
  • 31. Database Concepts DATA MODELS RELATIONAL MODEL - CONCEPT What does Primary Key mean? A primary key is a special relational database table column (or combination of columns) designated to uniquely identify all table records. A primary key’s main features are:  It must contain a unique value for each row of data.  It cannot contain null values. A primary key is either an existing table column or a column that is specifically generated by the database according to a defined sequence.
  • 32. Database Concepts DATA MODELS RELATIONAL MODEL - CONCEPT primary key field PRMARY KEY - TABLE - CUSTOMERS Primary key is a unique identifier of records in a table. Primary key values may be generated manually or automatically.
  • 33. Database Concepts DATA MODELS RELATIONAL MODEL - CONCEPT What does Foreign Key mean? A foreign key (REFERENTIAL INTEGRITY) is a column or group of columns in a relational database table that provides a link between data in two tables. It acts as a cross-reference between tables because it references the primary key of another table, thereby establishing a link between them. The majority of tables in a relational database system adhere to the foreign key concept. In complex databases and data warehouses, data in a domain must be added across multiple tables, thus maintaining a relationship between them. The concept of referential integrity is derived from foreign key theory. Foreign keys and their implementation are more complex than primary keys.
  • 34. FOREIGN KEY Foreign key field Primary key field Parent table Directors Movies Child table Relationship
  • 35. Database Concepts DATA MODELS RELATIONAL MODEL - CONCEPT What does Candidate Key mean? All the attribute combinations inside a relation that can serve primary key are candidate keys as they are candidates for the primary key position. What does Alternate Key mean? A candidate key that is not the primary key is called alternate key.
  • 36. Database Concepts DATA MODELS NETWORK MODEL – CONCEPT Developed in mid 1960s as part of work of CODASYL (Conference on Data Systems Languages) which proposed programming language COBOL (1966) and then network model (1971). Objective of network model is to separate data structure from physical storage, eliminate unnecessary duplication of data with associated errors and costs.  uses concept of a data definition language, data manipulation language.  uses concept of m:n linkages or relationships. an owner record can have many member records. a member record can have several owners.
  • 37. Database Concepts DATA MODELS NETWORK MODEL – CONCEPT Example of a Network Database a hospital database has three record types: patient: name, date of admission, etc. doctor: name, etc. ward: number of beds, name of staff nurse, etc. Need to link patients to doctor, also to ward Doctor record can own many patient records Patient record can be owned by both doctor and ward records.  Network DBMSs include methods for building and redefining linkages, e.g. when patient is assigned to ward.
  • 38. Database Concepts DATA MODELS NETWORK MODEL – CONCEPT Restrictions Links between records of the same type are not allowed while a record can be owned by several records of different types, it cannot be owned by more than one record of the same type (patient can have only one doctor, only one ward). Summary  The network model has greater flexibility than the hierarchical model for handling complex spatial relationships.  it has not had widespread use as a basis for GIS because of the greater flexibility of the relational model.
  • 40. Database Concepts DATA MODELS HIERARCHICAL MODEL – CONCEPT Early 1960s, IBM saw business world organizing data in the form of a hierarchy. Rather than one record type (flat file), a business has to deal with several types which are hierarchically related to each other e.g. Company has several departments, each with attributes: name of director, number of staff, address each department requires several parts to make its product, with attributes: part number, number in stock each part may have several suppliers, with attributes: address, price.
  • 41. Database Concepts DATA MODELS HIERARCHICAL MODEL – CONCEPT certain types of geographical data may fit the hierarchical model well. e.g. Census data organized by state, within state by city, within city by census. The database keeps track of the different record types, their attributes, and the hierarchical relationships between them the attribute which assigns records to levels in the database structure is called the key.
  • 42. Database Concepts DATA MODELS HIERARCHICAL MODEL – CONCEPT Summary of features  a set of record "types" e.g. supplier record type, department record type, part record type  a set of links connecting all record types in one data structure diagram (tree).  at most one link between two record types, hence links need not be named.  for every record, there is only one parent record at the next level up in the tree. e.g. every county has exactly one state, every part has exactly one department.
  • 43. Database Concepts DATA MODELS HIERARCHICAL MODEL – CONCEPT Summary of features  no connections between occurrences of the same record type cannot go between records at the same level unless they share the same parent. Advantages and disadvantages (Next Slide)
  • 44. Database Concepts DATA MODELS HIERARCHICAL MODEL – CONCEPT Advantages and disadvantages  data must possess a tree structure tree structure is natural for geographical data  data access is easy via the key attribute, but difficult for other attributes. in the business case, easy to find record given its type (department, part or supplier). in the geographical case, easy to find record given its geographical level (state, county, city, census tract), but difficult to find it given any other attribute e.g. find the records with population 5,000 or less
  • 45. Database Concepts DATA MODELS HIERARCHICAL MODEL – CONCEPT Advantages and disadvantages  tree structure is inflexible cannot define new linkages between records once the tree is established. e.g. in the geographical case, new relationships between objects cannot define linkages laterally or diagonally in the tree, only vertically.  the only geographical relationships which can be coded easily are "is contained in" or "belongs to“.