Dbms Final
Dbms Final
A)An organized, consistent, and logical collection of data that can easily be
updated, accessed, and managed. Database mostly
contains sets of tables or objects which consist of records and fields.
DBMS helps a user to overcome problems like data inconsistency, data redundancy.
-----------------------------------------------------------------------------------
---------------------------------------------
3)Advantages of DBMS?
A)1)Data Sharing-->Data which is stored in database can be shared by multiple
users.
2)Integrity Constraints-->It allows storing of data in an organized and refined
manner.
3)Controlling redundancy in tables-->The same piece of data dosent exists in
multiple places.
4)Data Independence-->Allow changing the data structure without altering the
composition of any of the other running programs.
5)Provides backup and recovery facility-->automatically create the backup of the
data and restore the data in the database.
6)Data Security--->Authentication,Encryption are the tools used
-----------------------------------------------------------------------------------
----------------------------------------------
4)Explain different languages present in DBMS?
A)
1)DDL(Data Definition Language):Commands which are required to define the database.
Ex:craete--->create table.
drop--->including data and table will delete.
alter-->modify the table by adding attributes.
truncate--->only data/tuples will be deleted in table.
-----------------------------------------------------------------------------------
----------------------------------------------
7)Are NULL values in a database the same as that of blank space or zero?
A)No, a NULL value is very different from that of zero and blank space.NULL Value
represents a value that is assigned, unknown,
unavailable, or not applicable and blank space which represents a character and
zero represents a number.
-----------------------------------------------------------------------------------
----------------------------------------------
8)What is meant by Data Warehousing?
A)The process of collecting, extracting, transforming, and loading data from
multiple sources and storing them into one database.
It is a central repository where data flows from transactional systems and other
relational databases and is used for data
analytics.
-----------------------------------------------------------------------------------
----------------------------------------------
9)Explain different levels of data abstraction in a DBMS.
A)Data Abstraction-->Process of hiding irrelevant Data.It has 3
levels(Physical,Conceptual,External)
Physical-->This level consists of data storage descriptions and the details of this
level are hidden from system admins, developers, and users.
External--->only part of the database hides the details of the table schema and its
physical storage from the users.
A view is a virtual table created by selecting fields from one or more tables
present in the database.
-----------------------------------------------------------------------------------
----------------------------------------------
10)What is meant by an entity-relationship (E-R) model?
A)ER Model is a diagrammatic approach to a database design where real-world objects
are represented as entities and relationships between them.
4)Many to one:A relationship is applied when many rows in table X is related to one
rows in table Y.
Ex:Many students in one college.
-----------------------------------------------------------------------------------
----------------------------------------------
12)Explain the difference between intension and extension in a database.
A)
1)Intension: It is a database schema is used to define the database and is
specified during the design of the database and remains same.
Shared Lock:It is required for reading a data item and many transactions may hold a
lock on the same data item in a shared lock.
Multiple transactions are allowed to read the data items in a shared lock.
Logical Design
Split Data into multiple table--->no data is lost,Useful info can be easily
reconstitued
Mofification anomolies:
Update--->redudancy(repition of data)
deletion----->if we dlt last element the entire data is deleted.
Insertion--->violates entitiy integrity(primary key--->it dosent null)
Noramlaization
----------------------------
Divide and Rule
Divide the data into separate table/Independent entiites and relate them using the
comon Attribute(Branch)
Ex:Main table--->Student(name,branch,hod,phnumber)
Studet table divided into 2 tables
table 1---->name,branch
table 2----->branch,hod,phnumber.
4 rules:
1)Attribute/column can have only single value.
2)Value in column should be the same domain
3)All the column names are unique
4)Order is not mattered.
Functinal Dependecy:If the info is sotred in the table can uniquely determine
another info in the same table
By using functinal dependency we can obtain the value of another attribute from
given attribute.
It exists only when for a composite primary key any attribute in the table depends
on
part of primary key but not the complete primary key.
For a table to be in Third normal form it should be in the Second normal form.
It should not have Transitive Dependency.(A-->B--->C)
To remove the transitive dependecy take out the columsn which causes
transitive dependecy and make it a separate table.
Ex:Course Table--->{so,courseno,coursename}
Ex:Student Table--->{Sno},{Sno,Sname}
Conditions:
--->table must be in 3r normal form(no transitive dependecy)
--->And for each functinal dependency (X-->Y) X should be a super key.
Join dependency:
properties:
1)Values are atomic.
2)All of the values in a column have the same data type.
3)Each row is unique.
4)The sequence of columns is insignificant.
5)The sequence of rows is insignificant.
6)Each column has a unique name.
7)Integrity(Accurate) constraints maintain data consistency across multiple tables.
-----------------------------------------------------------------------------------
-------------------------------------------------------------
20)Difference between vertical and horizontal scaling
A)Vertical Scaling-->Increase the capacity of a single machine and increase its
throughput.
Horizontal Scaling-->Adding more instances of machines without first implementing
improvements to existing specifications.
-----------------------------------------------------------------------------------
-------------------------------------------------------------
21)What is sharding?
A)Splitting and storing a single logical dataset in multiple databases. By
distributing the data among multiple machines,
a cluster of database systems can store larger dataset and handle additional
requests.
-----------------------------------------------------------------------------------
-------------------------------------------------------------
22)Indexing in DBMS
A)It is used to locate and access the data in a database table quickly.
-----------------------------------------------------------------------------------
-------------------------------------------------------------
23) Conflict Serializability in DBMS.
A)Serializability--->Helps us to check which schedules are serializable.
A serializable schedule is the one that always leaves the database in consistent
state.
The concurrency control protocols ensure the ACID and serializability of the
concurrent execution of the database transactions.