Showing posts with label RGPV DBMS PYQ. Show all posts
Showing posts with label RGPV DBMS PYQ. Show all posts

Explain the concepts of Generalization and Aggregation with appropriate examples.

Explain the concepts of Generalization and Aggregation with appropriate examples. (RGPV 2019)

Ans. Generalization:

Entities with common attributes can be merged into a generic or super type entity by generalisation. 

For example, the entity EMPLOYEE is a super type of Professor, Conductor, and Engineer.

Share:

DBMS definition and major components | RGPV PYQ

RGPV 2018
Define database management systems (DBMS). What are the major components of this system ? Explain each component.

Ans. A DBMS is used for storing, manipulating, and managing data.

Some examples of DBMSs: 
  1. MySQL, 
  2. Microsoft SQL Server, 
  3. Microsoft Access, 
  4. Oracle
Share:

Concept of primary, foreign key, integrity constraints | RGPV DBMS PYQ

RGPV 2019
Q. Explain the concepts of Primary key, Foreign key and Integrity constraints ?

Ans.

If there is relation between table than it must have a primary key.

In table Student RollNo is primary key.

 

Student

 

RollNo

Name

Department

010

Sanjay

CSE

012

Ram Prasad

ME

021

Natwarlal

CSE



In table Account RollNo is primary key for it but also a Foreign key for table Student.

Account(Student)

RollNo

A/C No.

010

0074100

031

005452010

040

14540000


Primary keys cant contain duplicate value but, foreign keys can contain duplicate values.  
Also, Primary key cant contain NULL values, Foreign keys can contain NULL values.

Primary key vs Foreign key:

Primary Key

Foreign Key

No duplicate value.

Duplicate values allowed.

Null values not allowed.

Null values allowed.

Uniquely identified.

May be uniquely

It’s indexed automatically.

No automatic index.


A foreign key is a set of one or more columns in a table that refers to the “primary key in another table”. So foreign key Can’t contain a value which does not refer to the primary key, I am not agree that PhoneNumberTypeID is a foreign key.

Integrity Constraints:
Some integrity constraints are:
  1. Primary key constraints
  2. Foreign key constraints
  3. Unique key constraints
3. Unique key contraints:
A unique column constraint in a table is similar to a primary key in that the value in that column for every row of data in the table must have a unique value. Although a primary key constraint is placed on one column, you can place a unique constraint on another column even though it is not actually for use as the primary key.


Share:

Data modelling, compare Data models | RGPV DBMS PYQ

RGPV 2019
Q. What do you mean by data modelling ? Compare different data models ?

Ans. Data modeling is a way to create data model for the data to be stored in a database. 

A data model a collection of conceptual tools for describing data, data relationships, data semantics, and consistency constraints. A data model provides a way to describe the design of a database at the physical, logical, and view levels.

Feature

Conceptual

Logical

Physical

Entity names

Entity relationships

Primary keys

 

Foreign keys

 

Column names

 

 

Column data types

 

 


The data models can be classified as:
  1. Relational Model
  2. Entity-Relationship Model.
  3. Object-Based Data Model
  4. Semi-structured Data Model
  5. Network Data Model
  6. Hierarchical Data Model
1. Relational model: 
  • The relational model uses a group of tables to represent both data and the relationships amongst those records. 
  • Each table has more than one column, and each column has a unique name. Tables are also referred as relations. 
  • Each table contains records of a specific type. Each record type defines a fixed number of fields, or attributes. 
  • The columns of the table correspond to the attributes of the record type. 
  • The relational data model is the most widely used data model.
2. Entity-Relationship Model:
  • The entity-relationship (E-R) data model uses a collection of basic objects, called entities, and relationships among these objects.
  • An entity is a “thing” or “object” in the real world that is distinguishable from other objects.
3. Object-Based Data Model:
  • Object-oriented programs (especially in Java, C ++, or C #) have become the preferred method of software development.
  • This has led to the development of an object-focused data model that can be seen as an extension of the ER model with input ideas, methods (functions), and object.
  • An object-related data model incorporates features of an object-focused data model and a data-related data model.
4. Semi-structured Data Model:
  • The semi-structured data model permits the specification of data in which individual data items of the same type may have different sets of attributes. 
  • This is in contrast to the data models mentioned earlier, in which every data item of specific type must have the identical set of attributes. 
  • Extensible Markup Language (XML) is extensively used to represent semi-structured data.
5. Network Data Model:
  • A network data model is a data model that allows multiple records to be linked to the same owner.
  • The model can be seen as an upside down tree wherein the branches are the member information connected to the owner, that is the lowest of the tree.
  • The multiple linkages which this information permits the network data model to be very flexible. 
  • Further, the relationship that the information has within the network data model is defined as many-to-many relationship because one owner file may be linked to many member documents and vice versa.
6. Hierarchical Data Model:
  • Hierarchical Data Model involves parent/child relationship.
  • In Hierarchical Data Model, parent can have more than one child.
  • In Hierarchical Data Model, child can have only parent.
  • Hierarchical data model visualize as upside/down tree.

Share:

RGPV DBMS Explain the concepts of generalization and aggregation with appropriate examples

RGPV 2019
Q. Explain the concepts of generalization and aggregation with appropriate examples ?

Ans.
Generalization:
  • It is a bottom-up approach in which two lower level entities combine to form higher entity. In generalization, the higher level entity can also combine with other lower level entity to make further higher level entity.
  • Generalization proceeds from the recognition that a number of entity sets share some common features. On the basis of the commonalities, generalization synthesizes these entity sets into a single, higher-level entity set.
  • Generalization is used to emphasize the similarities among lower-level entity sets and to hide the differences in the schema.


Aggregation:
  • One limitation of the E-R model is that it cannot express relationships among relationships. To illustrate the need for such a construct, quaternary relationships are used which lead to redundancy in data storage.
  • The best way to mode such situations is to use aggregation.
  • Aggregation is an abstraction through which relationships are treated as higher-level entities.
  • Below is the example of aggregation relation between offer (which is binary relation between center and course) and visitor.


Share:

RGPV solved Database approach vs Traditional file accessing approach

RGPV 2019
Q. Differentiate between Database approach vs Traditional file accessing approach ?

Ans. 

Database approach

Traditional file accessing approach

All Application shares a pool of related and integrated data.

Use separate data file for each application

Minimal data redundancy – Separate data files are integrated in to a single, logical structure.

Data redundancy – independent data files included a lot of duplicated data.

Each occurrence of a data item is recorded only once.

Same data is recorded and stored in several files.

Single version of data exist

Data inconsistency – several versions of the same data may exist.

Single update is required.

Same update must be done in all occurrences of same data item in each file.

A database is developed to share the data among the user who access to it

Users have very little opportunity to share data outside of their own application.

There is centralized control for overall data in database.

There is no centralized control for overall data in different files.

Data independence – the database system separates data descriptions from the application programs that use the data in it

Data dependence – description of files, records and data items are embedded within individual application programs.

Data structure can be modified without changing the programs accessing the data

Modification to data files requires the programs which access that file to be modified.

Less program maintenance

High program maintenance

Data are organized in to a single logical structure with logical relationships defined between associated data

Lack of data integration – accessing data in several files are difficult


Share: