DBMS Unit-2
DBMS Unit-2
DBMS Unit-2
Gives and idea of how the final system or software will look after and the development is completed This concept is exactly like real world modeling in which before constructing any project (Buildings, Bridges, Towers) engineers create a model for it and gives the idea of how a project will look like after construction A data model is an overview of a software system which describes how data can be represented and accessed from software system after its complete implementation Data models define data elements and relationships among various data elements for a specified system A data model is a way of finding tool for both business and IT professionals which uses a set of symbols and text to precisely explain a subset of real information to improve communication within the organisation and thereby lead to more flexible and stable application environment Data model is a simple abstraction of complex real world data gathering environment
RELATIONSHIPS
It is an association among several entities for e. g. Employee works for Department. The degree of the relationship is the number of participating entity types in a particular relation Data model uses three types of relationships
Types Of Relationships
One is to one One entity is associated with at most one other entity. E.g. One department can have only one manager One is to Many One entity is associated with any number of entities in other entity. E.g. One teacher may teach to many students Many is to Many One entity is associated with any number of entities in other entity. E.g. Books in library issued by students
Business Rules
Database designer needs to take help from concepts such as entity, attributes and relationships to build a data model, but the above things are not sufficient to describe a system completely Business rules may define actors and prescribe how they should behave by setting constraints and help to manage business change in the system Business rules are statements of a discrete operational business policy or practice within specific organisations that constrains the business. It is intended to control or influence the behavior of the business
Hierarchical Model
First DBMS model Data sorted hierarchically in top down or bottom up approach Uses pointers to navigate between stored data Represents data as a hierarchical tree One parent node can have many child nodes but one child cannot have more than one parent. EXAMPLE Information Management System (IMS) from IBM
PM
PM
PrM
PrM
PrM
PL
PL
PL
PL
TL
TL
TL
TL
Developer
Developer
Developer
Developer
Database Security
Security is given by DBMS itself it does not depends on programmer has given security or not
Database Integrity
There is always parent child relation between different levels and hence child records are attached with parent records which maintains data integrity
Data Independence
Itself maintains data independence thus reducing program efforts and its maintenance that is id one part of the code is changed no need to change the other part
Efficiency
Good performance when database contains large amount of data in which one record has many related records
Difficult to manage
Any change in location of data needs change in all application programs that accesses changed data. Data access is restricted by pointer path
Limitations in implementation
1:N relationship can be implemented but implementing M:N relationship is difficult
Network Model
Uses pointers but without the need of parent child relationships Used in network databases Relationship between any two record types is called as SET A relationship can be 1:N or M:N EXAMPLE IDS(Integrated Data Store) one of the products based on network models developed by IBM and North American Rockwell
Data Independence
Application programs work independently of the data. Any changes made in data do not effect the application program
Conformance to standards
Facilitates the administrators portability by offering data creation by DDL and DML
Relational Model
Proposed by E. F. Codd An attempt to simplify database structure by making use of tables and columns Collection of 2-dimensional tables which consists of rows and columns Tables are known as relations columns are known as attributes and rows are known as tuples Uses collection of tables to represent relationships amongst data Each database item is viewed as a record with attributes. A record with similar attributes is called as table. Each table contains a record of particular type The database uses relational model called as RDBMS (Relational Database Management System)
ROWS
VALUE
TABLE
Dynamic View
View is not a part of physical schema, hence changing data in he table also changes the data present in the view
SQL
English like language which can be used to access data form RDBMS. Most vendors support SQL
Performance
Performance and support to new hardware technologies and flexible for all types of data needs
Scalability
Scalable and provide good support for the implementation of distributed systems and other advanced database systems
DEPARTMENT
CONTAINS
EMPLOYEES
EMPAGE
Advantages Of ER Model
Very Simple Design
Simple and easy to design logical view of data
Ease Of Representation
Designer, programmer, developer can understand system very easily by looking at an ER model constructed
Disadvantages Of ER Model
Limited Constraint Representation
Model can display those constraint that are directly tied by relationships but not possible to represent some constraints like average marks etc.
No DML
Do not have any language by which we can insert data in database
Object Model
Data is stored in the form of objects which are structures called classes that display the data within it Fields are instances of these classes called objects Used in File Management System DBMS developed is called OODBMS (Object Oriented Database Management System) OOD can handle complex applications such as scientific experiments, geographical information system etc Draws its concept from real world objects which deals with data at higher level that is with the objects surrounding the data Represents database in terms of objects, attributes and their behaviors
Disadvantages
Often provided through object oriented languages such as C++ and Java Practically very complex and inapplicable many times