DBMS - Lecture - 2
DBMS - Lecture - 2
• Elimination of Inconsistency
• Database Complexity
3. External Level
This is the highest level in the three level architecture
and closest to the user. It is also known as the view level.
The external level only shows the relevant database
content to the users in the form of views and hides the
rest of the data. So different users can see the database
as a different view as per their individual requirements.
Data Model & DB Schema
A data model is a collection of concepts
for describing data in a DB, including
Objects
Relationships among objects
Constraints on objects & relationships
Operations on objects & relationships
A data model emphasizes on what data is
needed and how it should be organized.
Data model is like architect’s building plan
which helps to build a conceptual model and
set the relationships between data items.
A schema is a description of a particular
collection of data, using a given data model.
An instance is a particular set of data in the
DB.
Database Schema
Page 30
Entity-Relationship Model
A popular conceptual model.
Concepts include entities, relationships,
constraints.
Age Credits
GPA Grade
Students m n Courses
Enrolled
Page 26
Types of Data
User data
Metadata
Indexes
Application Metadata
Page 25
User Data
A table of data called a relation
Columns are fields or attributes
Rows are entities
Relations must be structured properly
Page 26
Metadata
“A description of the structure of the database”
System tables store metadata
number of tables and table names
number of fields and field names
primary key fields
field names, data types, and length
Page 27
Indexes
Improve performance
Improve accessibility
(Overhead data)
Page 28
Application Metadata
Stores the structure and format of
forms
reports
queries
other application components
Page 29