Assiment 1

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

1. What is data independence? Briefly explain.

Ans : A database system normally contains a lot of data in addition to users’ data. If the entire data
is dependent, it would become a tedious and highly complex job.Metadata itself follows a layered
architecture, so that when we change data at one layer, it does not affect the data at another level.
This data is independent but mapped to each other.

Logical Data Independence : data is managed inside

Physical Data Independence : Physical data independence is the power to change the physical data

without impacting the schema or logical data.

2. What is a table in relational data model? List the properties of relational tables
ANS: Relational data model is the primary data model, which is used widely around the world for
data storage and processing. This model is simple and it has all the properties and capabilities re-
quired to process data with storage efficiency.
The relational data model was introduced by C. F. Codd in 1970. Currently, it is the most widely
used data model.

The relational model has provided the basis for:

• Research on the theory of data/relationship/constraint

• Numerous database design methodologies

• The standard database access language called structured query language (SQL)

• Almost all modern commercial database management systems

The relational data model describes the world as “a collection of inter-related relations (or tables).”

A relation, also known as a table or file, is a subset of the Cartesian product of a list of domains

characterized by a name. And within a table, each row represents a group of related data values.

A row, or record, is also known as a tuple. The columns in a table is a field and is also referred to as

an attribute. You can also think of it this way: an attribute is used to define the record and a record

contains a set of attributes.

The steps below outline the logic between a relation and its domains.

Tables : A database is composed of multiple tables and each table holds the data. Figure 7.1 shows a

database that contains three tables.

3.List and explain the important responsibilities of database manager.

Ans : 1. Software installation and Maintenance


The system administrator sets up hardware and deploys the operating system for the database
server, then the DBA installs the database software and configures it for use.
2. Data Extraction, Transformation, and Loading.
Known as ETL, data extraction, transformation, and loading refers to efficiently importing large
volumes of data that have been extracted from multiple systems into a data warehouse environment.
3. Specialised Data Handling :
Managing a very large database (VLDB) may require higher-level skills and additional monitoring
and tuning to maintain efficiency.
4. Database Backup and Recovery :
In the case of a server failure or other form of data loss, the DBA will use existing backups to re-
store lost information to the system. Different types of failures may require different recovery
strategies, and the DBA must be prepared for any eventuality

4.Explain the Sequential File Organization with the help of diagrams.


Ans: In sequential organisation, record occurrences are referenced in the order that they are stored
physically. Data stored on cards and tapes are necessarily stored sequentially. Direct access devices
such as disks may be, but are not necessarily referenced sequentially.

Sometimes the processing is best done through sequential access, even when direct access devices

are used. Such is the case when many records of a file must be accessed to satisfy a request for data.

In a sequential file, records are maintained in the logical sequence of their primary key values. The

processing of a sequential file is conceptually simple but inefficient for random access. However, if

access to the file is strictly sequential, a sequential file is suitable. A sequential file could be stored

on a sequential storage device such as a magnetic tape.

5. What is view? List its advantages.

Advantages:
1. Views don't store data in a physical location.
2. The view can be used to hide some of the columns
from the table.
3. Views can provide Access Restriction,
since data insertion, update and deletion
is not possible with the view.

Disadvantages:
1. When a table is dropped, associated view become irrelevant.
2. Since the view is created when a query
requesting data from view is triggered,
its a bit slow.
3. When views are created for large tables,
it occupies more memory.
A database view is a searchable object in a database that is defined by a query. Though a view
doesn’t store data, some refer to a views as “virtual tables,” you can query a view like you can a ta-
ble
6 . Write a note on the following a) SUBSET Mapping b) SUPERSET Mapping
Ans : There must be at least one minimal subset of attributes in the relation, which can identify a tu-
ple uniquely. This minimal subset of attributes is called key for that relation. If there are more than
one such minimal subsets, these are called candidate keys.

hen working with tables, the solution would be to materialize a table that contains all the fields

needed for your analysis, most likely through some scheduled batch process.

A view is a simple logical layer that abstract an arbitrary SQL queries as a virtual table. This can al-

low you to join and union multiple tables, and to apply some transformation using arbitrary SQL

expressions. The limitation there is your database performance as Superset effectively will run a

query on top of your query (view).

You might also like