Showing posts with label Shivaji University. Show all posts
Showing posts with label Shivaji University. Show all posts

Friday, February 22, 2019

Object Oriented Data Model

Object Oriented Data Model:
This data model is method of representing real world objects. It considers each object in the world as objects and isolates it from each other. It groups its related functionalities together and allows inheriting its functionality to other related sub-groups.
It enables us to create classes, organize objects, structure an inheritance hierarchy and call methods of other classes. Besides these, it also provides the facilities associated with standard database systems. The user will create classes, objects, inheritance and so on and the database system will store and manage these objects and classes.
          Let us consider an Employee database to understand this model better. In this database we have different types of employees – Engineer, Accountant, Manager, Clark. But all these employees belong to Person group. Person can have different attributes like name, address, age and phone.


Advantages and Disadvantages:

Advantages:

1.      Enriched modeling capabilities:

The object-oriented data model allows the 'real world' to be modeled more closely. The object, which encapsulates both state and behavior, is a more natural and realistic representation of real-world objects.

2.      Extensibility:

OODBMSs allow new data types to be built from existing types. The ability to factor out common properties of several classes and form them into a superclass that can be shared with subclasses can greatly reduce redundancy within system is regarded as one of the main advantages of object orientation.

3.      Capable of handling a large variety of data types:

Unlike traditional databases (such as hierarchical, network or relational), the object oriented database are capable of storing different types of data, for example, pictures, voice video, including text, numbers and so on.

4.      More expressive query language:

Navigational access from the object is the most common form of data access in an OODBMS. This is in contrast to the associative access of SQL (that is, declarative statements with selection based on one or more predicates). Navigational access is more suitable for handling parts explosion, recursive queries, and so on.

5.      Support for schema evolution:

The tight coupling between data and applications in an OODBMS makes schema evolution more feasible.

6.      Support for long-duration, transactions:

Current relational DBMSs enforce serializability on concurrent transactions to maintain database consistency.

7.      Applicability to advanced database applications:

There are many areas where traditional DBMSs have not been particularly successful, such as, Computer-Aided Design (CAD), Computer-Aided Software Engineering (CASE), Office Information System(OIS), and Multimedia Systems. The enriched modeling capabilities of OODBMSs have made them suitable for these applications.

8.      Improved performance:

There have been a number of benchmarks that have suggested OODBMSs provide significant performance improvements over relational DBMSs. The results showed an average 30-fold performance improvement for the OODBMS over the RDBMS.

Disadvantages of OODBMSs

1. Lack of universal data model: There is no universally agreed data model for an OODBMS, and most models lack a theoretical foundation.
2.  Lack of experience: In comparison to RDBMSs the use of OODBMS is still relatively limited. This means that we do not yet have the level of experience that we have with traditional systems.
3.  Lack of standards: There is a general lack of standards of OODBMSs. We have already mentioned that there is not universally agreed data model.
4.   Competition: Perhaps one of the most significant issues that face OODBMS vendors is the competition posed by the RDBMS and the emerging ORDBMS products.
     5.     Locking at object level may impact performance: Many OODBMSs use locking as               the basis for concurrency control protocol. However, if locking is applied at the object           level, locking of an inheritance hierarchy may be problematic, as well as impacting                 performance.

-profshardulp.patil@gmail.com

Data Model

Data Model:
Data models define how the logical structure of a database is modeled. Data Models are fundamental entities to introduce abstraction in a DBMS. Data models define how data is connected to each other and how they are processed and stored inside the system. A database model is a type of data model that determines the logical structure of a database and fundamentally determines in which manner data can be stored, organized and manipulated. It describes the design of database to reflect entities, attributes, relationship among data, constrains etc.
It involves planning about tables, their columns, mapping between the tables, how they are structured in the physical memory etc. A data model helps to put the real world requirement into a design. This makes the developer to understand the relationship between various objects in the database. It helps to highlight any drawbacks of the plan and correct it at the design stage itself.
The very first data model could be flat data-models, where all the data used are to be kept in the same plane. Earlier data models were not so scientific, hence they were prone to introduce lots of duplication and update anomalies.
Features / Benefits of Data Model:
1.      It provides a means to represent a real world object in to computer – usable form.
2.      It captures and represents associations and relationships among the real world objects.
3.      It defines how the objects in the application interact in logical terms.
4.      It allows the database designer to capture static and dynamic organization and flow of information within a modeled enterprise. 
Depending on the levels of data, data models are divided into 3 categories:
·        Object Based Data Models:
o   Object Oriented Model
o   Entity Relational Model
·        Record based Data models:
o   Relational Data Model
o   Network Data Model
o   Hierarchical Model
       ·        Physical Data Model

-profshardulp.patil@gmail.com

Thursday, February 7, 2019

Data Dictionary / Metadata


Data Dictionary / Metadata:
A metadata (also called the data dictionary) is the data about the data. It is the self-describing nature of the database that provides program-data independence. It is also called as the System Catalog. It contains all the information about the data objects.  It is like storing all up-to-date information about the objects like tables, columns, index, constraints, functions etc.
Data Dictionary consists of the following information:
·        Name of the tables in the database
·        Constraints of a table i.e. keys, relationships, etc.
·        Columns of the tables that related to each other
·        Owner of the table
·        Last accessed information of the object
·        Last updated information of the object
Data dictionary is used to actually control the database operation, data integrity and accuracy. Metadata is used by developers to develop the programs, queries, controls and procedures to manage and manipulate the data. Metadata is available to database administrators (DBAs), designers and authorized user as on-line system documentation. This improves the control of database administrators (DBAs) over the information system and the user's understanding and use of the system.
Data dictionary may be either active or passive. An active data dictionary (also called integrated data dictionary) is managed automatically by the database management software. It is consistent with the current structure and definition of the database. Most of the relational database management systems contain active data dictionaries that can be derived from their system catalog.
The passive data dictionary (also called non-integrated data dictionary) is the one used only for documentation purposes. Data about fields, files, people and so on, in the data processing environment are.
Functions of the data dictionary:
•   It defines the data objects of each user in the database. As we know, we cannot remember all the tables, views, constraints, etc., so the user can easily search them when any Data Definition Language (DDL) fired, then the database searches for the data dictionary. The DBMS software updates the object.
   It gives us the report about the data and the resources which the objects are using.
  It allows seeing the tables and views to those users who have the proper rights to access the database. Thus, it controls the access of the database.
Advantages of the data dictionary
   The data dictionary used so that we can remove the duplicity in the data definition.
   As it provides documentation. So it is a valuable reference for any organization.
   It helps the analysts in simplifying the structure so that it can meet the requirement of the data of the system.
     It helps in improving the communication between the user and the system analyst.
   Maximum of the database management system contains the data dictionary as a standard feature.
   Through this, new database administrators can easily understand the database of the system.
   The database administrator can easily track any problem in the database.


-profshardulp.patil@gmail.com

Tuesday, January 29, 2019

Users of DBMS

Users of DBMS:
Database users are the one who really use and take the benefits of database. There will be different types of users depending on their need and way of accessing the database.
1.      Database Administrator (DBA)
2.      Application programmers
3.      System Analyst
4.      End users
1.      Database Administrator (DBA):
Database Administrator (DBA) is the person or a group of persons who makes the strategic and policy decisions regarding the data of the enterprise, and who provide the necessary technical support for implementing these decisions. Therefore, DBA is responsible for overall control of the system at a technical level. In database environment, the primary resource is the database itself and the secondary resource is the DBMS and related software administering these resources is the responsibility of the Database Administrator (DBA).
2.      Application programmers:
As its name shows, application programmers are the one who writes application programs that uses the database. These users write application programs to interact with the database. Application programs can be written in some programming language such a C++,VB, ASP, .Net, JAVA or some higher level fourth generation language. Such programs access the database by issuing the appropriate request, typically a SQL statement to DBMS. These programs meet the user requirement and made according to user requirements. Retrieving information, creating new information and changing existing information is done by these application programs.
They interact with DBMS through DML (Data manipulation language) calls. And all these functions are performed by generating a request to the DBMS. If application programmers are not there then there will be no creativity in the whole team of Database.
3.      System Analyst:
System Analyst determines the requirement of end users, especially naive and parametric end users and develops specifications for transactions that meet these requirements. System Analyst gathers information according to user requirements needed to develop a solution on it. System Analyst plays a major role in database design, its properties; the structure prepares the system requirement statement, which involves the feasibility aspect, economic aspect, technical aspect etc. of the system.
4.      End users:
End users are those who access the database from the terminal end. End users are the users, who use the applications developed. End users need not know about the working, database design, the access mechanism etc. They just use the system to get their task done. There are basically two types of end users:
A.    Casual User:
These users have great knowledge of query language. Casual users access data by entering different queries from the terminal end. They do not write programs but they can interact with the system by writing queries.
      B.     Naive User:
Any user who does not have any knowledge about database can be in this category. Their task is to just use the developed application and get the desired results.     

-profshardulp.patil@gmail.com

Schema, Subschema and Instance

Schema:
Design of a database is called the schema. A database schema is the skeleton structure that represents the logical view of the entire database. It defines how the data is organized and how the relations among them are associated. It is the collection of named objects. The schema contains names of tables, columns of each table, datatype, triggers, functions, views, stored procedures and other objects are included in the schema. A database schema can be represented by using the visual diagram. That diagram shows the database objects and relationship with each other. A database schema is designed by the database designers to help programmers whose software will interact with the database. The process of database creation is called data modeling. The changes in a schema are not applied so frequently, but occasionally changes need to be applied as the requirements of application changes.
         For Example: In the following diagram, we have a schema that shows the relationship between three tables: Course, Student and Section. The diagram only shows the design of the database, it doesn’t show the data present in those tables. Schema is only a structural view (design) of a database as shown in the diagram below.
Schema is of three types: Physical schema, logical schema and view schema.
              The design of a database at physical level is called physical schema. It describes how the data stored on the disk or the physical storage.
           Design of database at logical level is called logical schema, programmers and database administrator work at this level. At this level data can be described as certain types of data records gets stored in data structures.
               Design of database at view level is called view schema. This generally describes end user interaction with database systems.
Subschema:
            A subschema provides a view of the database as seen by an application program. This view is often a subset of the complete schema definition. A subschema is used at run time to provide the DBMS with a description of those portions of the database that are accessible to the application program. The subschema allows the user to view only that part of the database that is of interest to him. The subschema defines the portion of the database as seen by the application programs and the application programs can have different view of data stored in the database.
              The subschema identifies the areas, records, elements, and sets which are accessible. The subschema identifies the Data Manipulation Language (DML) functions which can be performed. The different application programs can change their respective subschema without affecting other's subschema or view.
Instance:
         The data stored in database at a particular moment of time is called instance of database. It is a snapshot where the current state or occurrence of a database is framed at that moment. Database schema defines the variable declarations in tables that belong to a particular database; the value of these variables at a moment of time is called the instance of that database. Instance changes very frequently, whenever data is removed or added in the database.
              For example: We have a table student in the database, today the table has 10 records, so today the instance of the database has 10 records. We are going to add another 10 records in this table by tomorrow so the instance of database tomorrow will have 20 records in table. In short, at a particular moment the data stored in database is called the instance, that changes over time when we add or delete data from the database.
Difference between Schema and Instance:
  • A schema is the design representation of a database whereas instance is the snapshot of a database at a particular moment.
  • Instance changes very frequently, whenever data is removed or added in the database. As against, the changes in schema occurs rarely.
-profshardulp.patil@gmail.com

Sunday, January 27, 2019

Data Independence

Data Independence:
A major objective for three-level architecture is to provide data independence. Data independence refers characteristic of being able to modify the schema at one level of the database system without affecting the schema at the next higher level. It saves time and cost required when the database is modified or altered.
Types of Data independence
The data independence is classified as two types and they are as below:
· Logical Data Independence:
Logical data independence indicates that the conceptual schema can be changed without affecting the existing external schema. Logical data independence is used to separate the external level from the conceptual view. The user view of the data would not be affected by any changes to the conceptual view of the data. These changes may include insertion or deletion of attributes, altering table structures entities or relationships to the logical schema etc. The change would be absorbed by the mapping between the external and conceptual levels. Logical data independence also insulates application programs from operations such as combining two records into one or splitting an existing record into two or more records.
· Physical Data Independence:
Physical data independence can be defined as the capacity to change the internal schema without having to change the conceptual schema. Modifications at the internal levels are occasionally necessary to improve performance. If we do any changes in the storage size of the database system server, then the Conceptual structure of the database will not be affected. Physical data independence is used to separate conceptual levels from the internal levels. The change would be absorbed by the mapping between the conceptual and internal levels.

x

Advantages of Data independence
1.      Ability of improving performance
2.      Alterations in data structure does not requires alterations in application programs
3.      Implementation details can be hidden from the users
4.      Reduction of incongruity
5.      Tractability in improvement of system
6.      Affordable prices of maintaining system
7.      Providing the best services to the users
8.      Permit users to focus on general structure
9.      Enforcement of standards
10.   Improvement of security
1    11.  The state of being undamaged or undivided can be improved

-profshardulp.patil@gmail.com

Architecture of DBMS

Architecture of DBMS:
The Architecture of most of commercial dbms are available today is mostly based on this ANSI-SPARC database architecture. In this architecture the database schemas can be defined at three levels. The 3-tier architecture separates its tiers from each other based on the complexity of the users and how they use the data present in the database. The 3-tier provides data abstraction; which hides the low level complexities from end users.
There are following three levels or layers of DBMS architecture:
·        External Level
·        Conceptual Level
·        Internal Level
The above diagram describes three-tier architecture. Mapping is the process of transforming request response between various database levels of architecture. In External / Conceptual mapping, DBMS transforms a request on an external schema against the conceptual schema. In Conceptual / Internal mapping, it is necessary to transform the request from the conceptual to internal levels. The objective of three-level architecture is to separate each user's view of the database from the way the database is physically represented.
·        External Level or View level:
At the external level, a database contains several schemas that sometimes called as subschema. The subschema is used to describe the different user’s view of the database. External level is the one which is closest to the end users. This level deals with the way in which individual users view data. Individual users are given different views according to the user's requirement. Each view describes the database part that a particular user group is interested and hides the remaining database from that user group.
For Example, FACULTY of a college is interested in looking course details of students, STUDENTS are interested in looking all details related to academics, accounts, courses and hostel details as well.
·        Conceptual Level or Logical level:
This level describes what data is stored in the database and the relationships among the data. The middle level in the three level architecture is the conceptual level. This level contains the logical structure of the entire database as seen by the DBA. It is a complete view of the data requirements of the organization that is independent of any storage considerations. The conceptual level represents: All entities, their attributes, and their relationships.
For example, in student database the entity is student. An attribute is a characteristic of interest about an entity. For example, in case of student database Roll No, Name, Class, Address etc. are attributes of entity student.
·        Internal level or Storage level:
It is the physical representation of the database on the computer. This level describes how the data is stored in the database. The internal level is the one that concerns the way the data are physically stored on the hardware. It covers the data structures and file organizations used to store data on storage devices. It interfaces with the operating system access methods to place the data on the storage devices, build the indexes, retrieve the data, and so· on.
The internal level is concerned with storage space allocation for data and indexes, record descriptions for storage (with stored sizes for data items), record placement, data compression and data encryption techniques.
Advantages of Three-tier Architecture:
· The main objective of it is to provide data abstraction.
·  Same data can be accessed by different users with different customized views.
· The user is not concerned about the physical data storage details.
· Physical storage structure can be changed without requiring changes in internal structure of the database as well as users view.
· Conceptual structure of the database can be changed without affecting end users.
-profshardulp.patil@gmail.com
x

Data Abstraction

Data Abstraction:
Database systems are made-up of complex data structures. Database is full of data and records. What we see in rows and columns is quite different when it reaches the memory. What we see is the actual data. But when they are stored in the memory like disks or tapes, they are stored in the form of bits. But any users will not understand these bits. User needs to see the actual data to understand. But all the details about the data stored in the memory are not necessary for the users. User needs only little information that he is interested or wants to work with. To ease the user interaction with database, the developers hide internal irrelevant details from users. This process of hiding irrelevant details from user is called data abstraction.
Data abstraction is a process of representing the essential features without including implementation details. Many database-systems users are not computer trained, developers hide the complexity from users through several levels of abstraction, to simplify users’ interactions with the system.
There are mainly three levels of data abstraction:
Physical Level / Internal Level:
Logical Level / Conceptual Level:
View Level / External Level:

Physical Level / Internal Level:
This is the lowest level in data abstraction. This level describes how the data is actually stored in the physical memory like magnetic tapes, hard disks etc. In this level the file organization methods like hashing, sequential, B+ tree and access methods like sequential or random access are comes into picture. Usability, size of memory, and the number of times the records are factors which we need to know while designing the database.
Logical Level / Conceptual Level:
This is the middle level of 3-level data abstraction. It describes the actual data stored in the database in the form of tables and relates them by means of mapping. This level will not have any information on what a user views at external level. This level will have all the data in the database.
View Level / External Level:
The highest level of abstraction describes only part of the entire database. The variety of information stored in a large database. Many users of the database system do not need all this information; instead, they need to access only a part of the database. The view level of abstraction exists to simplify their interaction with the system. The users will have different views here, based on their levels of access rights. For example, student will not have access to see Lecturers salary details, one employee will not have access to see other employees details, unless he is a manager.
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.

-profshardulp.patil@gmail.com

Sunday, January 20, 2019

Structure of DBMS

Structure of DBMS:
DBMS (Database Management System) acts as an interface between the user and the database. The user requests the DBMS to perform various operations (insert, delete, update and retrieval) on the database. The components of DBMS perform these requested operations on the database and provide necessary data to the users. A DBMS is partitioned into modules that deal with each of the responsibilities of the overall system. The functional components of a database system can be broadly divided into the storage manager and the query processor components.



1.      Query Processor:
Query Processor translates statements in a query language into low-level instructions the database manager understands. The Query Processor simplifies and facilitates access to data. The Query processor includes the following component.
· DML Pre-compiler: DML pre-compiler converts DML statements embedded in an application program to normal procedure calls in a host language.  It also attempts to transform user's request into an equivalent query language but more efficient form. The Pre-compiler must interact with the DML compiler to generate the appropriate code.
· DML Compiler: The DML compiler translates DML statements in a query language into an evaluation plan consisting of low-level instructions that the query evaluation engine understands. The DML compiler also performs query optimization, which is it picks the lowest cost evaluation plan from among the alternatives. Query evaluation engine executes low level instructions generated by the DML compiler.
· DDL Interpreter: It interprets the DDL statements and records them in a set of tables containing meta data or data dictionary. It interprets DDL statements and records the definitions in the data dictionary.
·       · Query Evaluation Engine: It executes low-level instructions generated by the DML compiler.
2.      Storage Manager :
Storage Manager provides the interface between the low-level data stored in the database and application programs and queries submitted to the system. The storage manager is responsible for the interaction with the file manager. The raw data are stored on the disk using the file system, which is usually provided by a conventional operating system. The storage manager is responsible for storing, retrieving, and updating data in the database.
· Authorization and Integrity Manager: It tests for the satisfaction of integrity constraints checks the authority of users to access data.
· Transaction Manager: It ensures that the database remains in a consistent state despite the system failures and that concurrent transaction execution proceeds without conflicting.
· File Manager: It manages the allocation of space on disk storage and the data structures used to represent information stored on disk.
· Buffer Manager: It is responsible for fetching data from disk storage into main memory and deciding what data to cache in memory.
3.      Data Structure / Storage :
Following data structures are required as a part of the physical system implementation.
· Data Files: It stores the database.
· Data Dictionary: It stores metadata (data about data) about the structure of the database.
· Indices: Provide fast access to data items that hold particular values.
·Statistical Data: It stores statistical information about the data in the database. This information is used by query processor to select efficient ways to execute query.

-profshardulp.patil@gmail.com