Dbms Unit 1
Dbms Unit 1
Database Concepts: Database Systems - Data vs Information – Introducing the database -File
system - Problems with file system – Database systems .Data models - Importance - Basic
Building Blocks - Business rules - Evolution of Data models - Degrees of Data Abstraction.
The database is a collection of inter-related data which is used to retrieve, insert and delete the data
efficiently. It is also used to organize the data in the form of a table, schema, views, and reports, etc.
For example: The college Database organizes the data about the admin, staff, students and faculty
etc. Using the database, you can easily retrieve, insert, and delete the information.
A Database Management System (DBMS) is a software system that is designed to manage and
organize data in a structured manner. It allows users to create, modify, and query a database, as
well as manage the security and access controls for that database
Data VS Information
Data Information
facts can be recorded collection of data
data can be something simple and when data are processed ,structured Or organized
seemingly random and useful until it is as to make them meaningful, useful, they are called
organized. information .
Difficult to reproduce if it is lost Easy to reproduce if it is lost
low level knowledge it is the second level knowledge
data is not meaningful It is meaningful
Ex:25,18 Ex:$25,age 25
The file system is basically a way of arranging the files in a storage medium like a hard disk.
The file system organizes the files and helps in the retrieval of files when they are required. File
systems consist of different files which are grouped into directories. The directories further
contain other folders and files. The file system performs basic operations like management, file
naming, giving access rules, etc.
Example: NTFS(New Technology File System), EXT(Extended File System).
Database model
A Database model defines the logical design and structure of a database. It defines how data
will be stored, accessed, and updated in a database management system.
Data model will give a complete idea about how the final system will look likes .Before
implement the database first we have to design the database.
The conceptual data model describes the database at a very high level and is useful to understand
the needs or requirements of the database.They provide a summary-level perspective.
Conceptual data modeling is most relevant at the conceptual stage, when an organization drafts a
rough plan with the intention to work out the finer details later.
The main use of a conceptual data model is to define the scope of a business solution without
going into any details.
Conceptual data models are represented using a data structure diagram (DSD), a predecessor of
the well-known entity-relationship diagrams (ERD). Below we can see a very simple conceptual
data model that represents authors, books, and publishers.
Logical Data Model
A logical data model is probably the most-used data model. It goes beyond the conceptual
model; it includes entities, relationships, details on entities’ different attributes.
A logical data model should contain all the details to define an information domain. However, it
does not consider the technologies (i.e. the database and platform) that will be used to implement
the model. It should use business names for entities and attributes, since its purpose is to describe
the data structures required, not to create the actual database.
A physical data model is usually derived from a logical data model for a particular relational
database management system (RDBMS). One big difference between logical and physical data
models is that we now need to use table and column names rather than specifying entity and
attribute names.
This type of model designs the data in the form of rows and columns within a tableTables are
also called relations. This model was initially described by Edgar F. Codd, in 1969.Hierarchical
Model.
It has one to many relationship.(Each record has one parent and many children)
An Entity–relationship model (ER model) describes the structure of a database with the help of a
diagram, which is known as Entity Relationship Diagram (ER Diagram). An ER model is a
design or blueprint of a database that can later be implemented as a database.
Organizes Data: Data modeling structures data in a logical and organized manner, making it
easier to understand and manage.
Improves Data Quality: Data modeling helps identify and rectify inconsistencies and errors in
data, leading to better data quality.
Ensures Data Integrity: Data modeling enforces constraints and relationships, ensuring data
integrity and preventing data anomalies.
Supports Decision Making: Well-designed data models provide valuable insights and support
informed decision-making processes.
Facilitates Database Design: Data modeling is a crucial step in database design, helping create
efficient and optimized database structures.
A data model is a structure of the data that contains all the required details of the data like the
name of the data, size of the data, relationship with other data and constraints that are applied on
the data. It is a communication tool.
A data model is essential in order to store the database in a sorted manner. It will provide the
interaction between the system analyst, designer and application programmer. It improves the
understanding of designing of the database in which the organization is interested.
Entities
Attributes
Relationships
Constraints
Entities:
Entities are real time objects that exist.It can be a person, place, object, event, concept. Entities
are represented by a rectangle box containing the entity name in it.
Attributes:
It is the set of characteristics representing an entity.It is represented by a ellipse symbol with
attribute name on it.
Example: A student has attributes like name, roll number, age and much more.
Relationship:
It describes the association between two entities.It is represented using diamond symbol
containing relationship name with it.The data model generally uses three kinds of
relationships:one to many, many to many, one to one.
Example: The relationship between two entities Student and Class has many to many
relationship.
Constraints:
Constraints are conditions applied on the data.It provides the data integrity.
Example: A student can take a maximum of 2 books from the library is applied as a constraint on
the student database
Data abstractions in DBMS refer to the hiding of unnecessary data from the end-user.
Levels of Abstraction in DBMS
There are three levels of data abstraction in DBMS that are mentioned below.
It is the highest level in abstraction. There are different levels of views and each view defines
only a part of whole data required to user. This level defines many views of same database for
sim0lication of view to user. This is the highest level and easiest to understand for user.
Logical level:
This is the middle level of 3-level data abstraction architecture. It describes what data is stored in
database.
Physical level:
This is the lowest level of data abstraction. It describes how data is actually stored in database.
You can get the complex data structure details at this level.
Example: Let’s say we are storing customer information in a customer table. At physical level
these records can be described as blocks of storage (bytes, gigabytes, terabytes etc.) in memory.
These details are often hidden from the programmers.
At the logical level these records can be described as fields and attributes along with their data
types, their relationship among each other can be logically implemented. The programmers
generally work at this level because they are aware of such things about database systems.
At view level, user just interact with system with the help of GUI and enter the details at the
screen, they are not aware of how the data is stored and what data is stored; such details are
hidden from them