What is Database - Supercoders | Web Development and Design | Tutorial for Java, PHP, HTML, Javascript What is Database - Supercoders | Web Development and Design | Tutorial for Java, PHP, HTML, Javascript

Breaking

Post Top Ad

Post Top Ad

Sunday, November 25, 2018

What is Database

DATABASE

 

A database (DB), in the most general sense, is an organized collection of data. More specifically, a database is an electronic system that allows data to be easily accessed, manipulated and updated.  

A database is an organized collection of data. Database handlers create database in such a way that only one set of software program provide access of data to all the users.

A database, often abbreviated as DB, is a collection of information organized in such a way that a computer program can quickly select desired pieces of data.The main purpose of database is to operate large amount of information by storing, retrieving and managing

Software programmers are well acquainted with database concepts through relational databases like Oracle, SQL SERVER and MySQL, etc. Typically, a database structure stores data in a tabular format. 

Database architecture may be external, internal or conceptual. The external level specifies the way in which every end-user type comprehends the organization of its corresponding relevant data in the database. .

The internal level deals with the performance, scalability, cost and other operational matters. The conceptual level perfectly unifies the different external views into a defined and wholly global view. It consists of every end-user required generic data. 

DATA MODELS

 

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.


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. 

GENERALIZATION & SPECIALIZATION

 

The ER Model has the power of expressing database entities in a conceptual hierarchical manner. As the hierarchy goes up, it generalizes the view of entities,
and as we go deep in the hierarchy, it gives us the detail of every entity Included.
Going up in this structure is called generalization, where entities are clubbed
together to represent a more generalized view. For example, a particular student
named Mira can be generalized along with all the students. The entity shall be a
student, and further, the student is a person. The reverse is called specialization where a person is a student, and that student is Mira




Generalization- As mentioned above, the process of generalizing entities, where the generalize Gentities contain the properties of all the generalized entities, is called
generalization. In generalization, a number of entities are brought together into one generalized entity based on their similar characteristics.

Specialization- Specialization is the opposite of generalization. In specialization, a group of
entities is divided into sub-groups based on their characteristics. Take a group
‘Person’ for example. A person has name, date of birth, gender, etc.

Inheritance- 

We use all the above features of ER-Model in order to create classes of objects in
object-oriented programming. The details of entities are generally hidden from
the user; this process known as abstraction.

Inheritance is an important feature of Generalization and Specialization. It allows
lower-level entities to inherit the attributes of higher-level entities.

Serializability

When multiple transactions are being executed by the operating system in a
multiprogramming environment, there are possibilities that instructions of one
transaction are interleaved with some other transaction.

Schedule: A chronological execution sequence of a transaction is called a
schedule. A schedule can have many transactions in it, each comprising of
a number of instructions/tasks.

Serial Schedule: It is a schedule in which transactions are aligned in
such a way that one transaction is executed first. When the first
transaction completes its cycle, then the next transaction is executed.
Transactions are ordered one after the other.

 This type of schedule is called a serial schedule, as transactions are executed in a serial manner. In a multi-transaction environment, serial schedules are considered as a
benchmark. The execution sequence of an instruction in a transaction cannot be
changed, but two transactions can have their instructions executed in a random
fashion


. This execution does no harm if two transactions are mutually independent and working on different segments of data; but in case these two transactions are working on the same data, then the results may vary. This ever-varying result may bring the database to an inconsistent state. 

To resolve this problem, we allow parallel execution of a transaction schedule, if its transactions are either serializable or have some equivalence relation among
them.


No comments:

Post a Comment

Post Top Ad