DBMS Short Notes

Data:
It is a collection of information.

The facts that can be recorded and which have implicit meaning known as 'data'.

Example:

Customer ----- 1.cname.

                           2.cno.

                           3.ccity.

Database:

  • It is a collection of interrelated data.
  • These can be stored in the form of tables.
  • A database can be of any size and varying complexity.
  • A database may be generated and manipulated manually or it may be computerized.
Example:
Customer database consists the fields as cname, cno, and ccity



Database System:
It is computerized system, whose overall purpose is to maintain the information and to make that the
information is available on demand.

Advantages:

1.Redundency can be reduced.

2.Inconsistency can be avoided.

3.Data can be shared.

4.Standards can be enforced.
5.Security restrictions can be applied.

6.Integrity can be maintained.

7.Data gathering can be possible.

8.Requirements can be balanced.

Database Management System (DBMS):

  • software that provides the users with the processes of defining, constructing and manipulating the database for
  • It is a collection of programs that enables user to create and maintain a database. In other words it is general-purpose
  • Disadvantages in File Processing
  • Data redundancy and inconsistency.
  • Difficult in accessing data.
  • various applications.
  • Data isolation.
  • Data integrity.
  • Concurrent access is not possible.
  • Security Problems.
.
Advantages of DBMS:

1.Data Independence.

2.Efficient Data Access.

3.Data Integrity and security.

4.Data administration.

5.Concurrent access and Crash recovery.

6.Reduced Application Development Time.

ENTITIES
1. It is a collection of objects.

2. An entity is an object that is distinguishable from other objects by a set of attributes.

3. This is the basic object of E-R Model, which is a 'thing' in the real world with an independent existence.

4. An entity may be an 'object' with a physical existence.

5. Entities can be represented by 'Ellipses'.


Example:

 Customer, account etc.



 ATTRIBUTES

Characteristics of an entity are called as an attribute.

The properties of a particular entity are called as attributes of that specified entity.

Example:

Name, street_address, city --- customer database.

Acc-no, balance --- account database.

Types:

These can be classified into following types.

1.Simple Attributes.

2.Composite Attributes.

3.Single Valued Attributes.

4.Mutivalued Attributes.

5.Stored Attributes.

6.Derived Attributes.


Explanation is as below.


1.Simple Attributes:

The attributes that are not divisible are called as 'simple or atomic attributes'.

Example:

cust_name, acc_no etc..


2.Composite Attributes:

The attributes that can be divided into smaller subparts, which represent more basic attributes with
independent meaning.

These are useful to model situations in which a user sometimes refers to the composite attribute as unit but at
other times refers specifically to its components.

Example:

Street_address can be divided into 3 simple attributes as Number, Street and Apartment_no.

 
3.Single Valued Attribute:
The attributes having a single value for a particular entity are called as 'Single Valued Attributes'.

Example:

'Age' is a single valued attribute of 'Person'.

4.Muti Valued Attribute:
The attributes, which are having a set of values for the same entity, are called as 'Multi Valued Attributes'.

Example:

A 'College Degree' attribute for a person.i.e, one person may not have a college degree, another
person may have one and a third person may have 2 or more degrees.

A multi-valued attribute may have lower and upper bounds on the number of values allowed for each
individual entity.


5.Derived Attributes:

An attribute which is derived from another attribute is called as a ‘derived attribute.

Example:

‘Age’ attribute is derived from another attribute ‘Date’.

6.Stored Attribute:

An attribute which is not derived from another attribute is called as a ‘stored attribute.

Example:

In the above example,’ Date’ is a stored attribute.

4. ENTITY SETS
Entity Type:

A collection entities that have the same attributes is called as an 'entity type'.

Each entity type is described by its name and attributes.

Entity Set:

Collection of all entities of a particular entity type in the database at any point of time is called as an entity
set.

The entity set is usually referred to using the same name as the entity type.

An entity type is represented in ER diagrams as a rectangular box enclosing the entity type name.

Example:

Collection of customers.

5. Relationships

It is an association among entities.



RELATIONAL MODEL
A database is a collection of 1 or more ‘relations’, where each relation is a table with rows and columns.

This is the primary data model for commercial data processing applications.

The major advantages of the relational model over the older data models are,

1.It is simple and elegant.

2.simple data representation.

3.The ease with which even complex queries can be expressed.


Introduction:

The main construct for representing data in the relational model is a ‘relation’.

A relation consists of

1.Relation Schema.

2.Relation Instance.

Explanation is as below.

1.Relation Schema:

The relation schema describes the column heads for the table.

The schema specifies the relation’s name, the name of each field (column, attribute) and the ‘domain’ of
each field.

A domain is referred to in a relation schema by the domain name and has a set of associated values.


Example:
Student information in a university database to illustrate the parts of a relation schema.

Students (Sid: string, name: string, login: string, age: integer, gross: real)

This says that the field named ‘sid’ has a domain named ‘string’.

The set of values associated with domain ‘string’ is the set of all character strings.


2.Relation Instance:
This is a table specifying the information.

An instance of a relation is a set of ‘tuples’, also called ‘records’, in which each tuple has the same number
of fields as the relation schemas.

A relation instance can be thought of as a table in which each tuple is a row and all rows have the same
number of fields.

The relation instance is also called as ‘relation’.

Each relation is defined to be a set of unique tuples or rows.



Degree:

The number of fields is called as ‘degree’.

This is also called as ‘arity’.

Cardinality:

The cardinality of a relation instance is the number of tuples in it.

Example:

In the above example, the degree of the relation is 5 and the cardinality is 4.

Relational database:

It is a collection of relations with distinct relation names.

Relational database schema:

It is the collection of schemas for the relations in the database.

Instance:

An instance of a relational database is a collection of relation instances, one per relation schema in the
database schema.

Each relation instance must satisfy the domain constraints in its schema.



Post a Comment

Previous Post Next Post