The document provides an extensive overview of Database Management System (DBMS) architecture, detailing components such as the query evaluation engine, transaction manager, lock manager, and recovery manager. It also compares DBMS with RDBMS, discusses data models and their types, and outlines the advantages and disadvantages of using DBMS. Additionally, it covers SQL, PL/SQL, and various SQL commands, data types, and cursors, providing examples and explanations for each concept.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
3 views4 pages
Internship Report Varnit.pdf Edited
The document provides an extensive overview of Database Management System (DBMS) architecture, detailing components such as the query evaluation engine, transaction manager, lock manager, and recovery manager. It also compares DBMS with RDBMS, discusses data models and their types, and outlines the advantages and disadvantages of using DBMS. Additionally, it covers SQL, PL/SQL, and various SQL commands, data types, and cursors, providing examples and explanations for each concept.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4
Q.Explain Aechitecture of DBMS in detail.
Ans:- Draw architecture Explain Architecture of DBMS
explain the internal behavior or database management system components In DBMS architecture there one basic building blocks available which can interact with each other! to perform particulous job.In Architecture there core various components on blocks which can perform different Jules. Query evaluation engine have four blocks as follows :a) Plan enecutor b) Query evaluator c) parsnal d)optimizer Description of Architecture a)l plan Executor: pian Executor is a blueprint about any query given by the user for evalua -tion a query and is generally represented by relationship b) Query Evatator : Queny evalo for can be used to understand and evaluate the relationship operator which can sesive as the building blocks for evalu- -CHing queries. c) Panser : Pansen will check the syntan of query as well as veriries in the relationship and attribute used in the query ane defined in the database d) Optimizen : saliqueries are optimized by decomposition them into collection of smaller units called as blocks A typical query optimizer concentrate on optimizing a single block at a time. The optimizes concent on optimizer enamine the system catalog the information length types, I to retrive about data of data item and access path. * Transaction manager:Any activity done by the user is called as transaction is nothing but any one execution! of uses program in database! of useon program in database the management system.A transaction is a program unit whose execution may change contents of database remain inconsistent stant For en: Aion reservation,any type of bank transaction Transaction have four action:1)Road 2)Worite 3)commit 4)Abort Lock manager:A Lock is a mechanism use to controt access to the data types objects. There are two types OF locks 1)Share Lock : An object can be held by two different transaction at the same time. 2)Enclusive lock: An object can. Be held by two different transaction at the same time 3)Enclusive Lock : An object ensure that no other transaction hold any lock on this objects. Concurrency control::Concurrency control is that term when same object can be demanded by the number of uscon at one time is called concurrency control. Eg: Travel agent reservation. System Recovery manager:Recovery manager plays very important role when system get corashed. An this situation. We may lost manimum data. Then recovery manager can repairing using a techi que for recovery of derta sometimes it is possible to recoven a data particilly or Fully but it depends upon intensity of damage to the system. Naïve usens Naïve usens are those users who not do not have complete knowledge about a particular systern but can handle the simple operation perform on the system :Sophisticated users. Sophisticated users are those users who have complete.Knowledge about particulan system and can handle complen operation performe on it. Q. Write any FIVE Differences between DBMS & RDBMS.Ans:- RDBMS:-1)Data stored is in table format 2)Multiple data elements are accessible together 3)Data in the form of a table are linked together 4)Normalisation is not achievable 5)Support distributed database DBMS:-1)Data stored is in the file format 2)Individual access of data elements 3)No connection between data 4)There is normalisation 5)No support for distributed database Q.What is Data Models? Explain with their types in detail.Ans:- what is Data models I Explain with their types in detail.Data model is a collection of conceptual tool for describing. A data data relationship dater sematics and consistency constraints. Basically a data model is nothing but group of attributas which is collected and srepre sents some entity and using that entity we can design a relationship between another entity •It is divided into following. Three types 1)object based model 2) Record based model 3) physical data model 1)object based model:-Object based model describes data at the conceptual lever! And internal via level.It can provide flexible Structuring capabilities and allow data constraints object based model is clivide into another model ie (E-R model) 2) Recond based data model:- Recond based data model completely depends on a record based operation Any single now in a table is called as single mecard on a tupple It specifies the overall structur of database and provides higher level description of the impleme -ntation of the databash 3)Physical data model:-Physical data model is that model which contains the actual data.When your conceptual view is ready and we insert a databar is called physical data model. Q.Explain Advantages & disadvantages of DBMS.Ans:- Advantage of ste DBMS 1)Reduction of redundancy 2)Data sharing. 3)Data Integrity 4) security. 5)conflict Resolution 6)Data Independence a)Physical data independence b)Logical data independence Reduction of Redundancy:- The centralized control of dater by DBA quoids unnecessary duplication of data and efficiently meduce the total amount of data storage require •Advantage of avoiding dupli of quimination. Of the inconsistence that tend to be present in nedun.-dant data Files Data Sharing:In DBMS data can be shanad by authorized usesis of organization By proper management of data it gives rights multiph users to ciccess if. To also allows multiple user. To access same piece of information simult an cowly. Remote users can also Share, some data.Data integrity:- Data integrity means the data contained in the database, is both entened and consistent therefore data valves being entered for storage could be checked to ensure that they fall within specified mange and are or correct Format •Integrity check should be incorporated in the database to ensure that if there is a sreference to centain object that object must crist Data Security:-'Data is or vital importance to an organization and maybe confidential DBA who has the ultimate responsibility of the data in DBMS can ensure that properness procedure are Follows including proper authentication schemes for access to the DBMs and additional check before ting caccess to pre permitting. sensitive data Different levels of security could be implemented for various type of data and operations.The enforcement of security could be data value dependant and data dependant. Conflict Resolution:-Any complict in the databas. Environment has to resolve by DBA. The DBA choose best File Structure and access method to get optimal performance so that user won’t get a chance to complait.Data independence:-Data independence allows. For changes at one level If edetabases without affecting ether levels There ane two types of data independence 1)Physical data independence 2) data Independence Disadvantage of DBMS:- Problem by centralization:-Centralization means that data is accessible from single sounce namely the database this increased the potential serenity of security branches and aisouption of the opera -tion of the organization because of down time failure.2) cost or software I hardware and migration:-A signification disadvantage of DBMS IS Cost In addition to the Cost of purchasing ping and develo a software Thardware is to be updated to allow for entensive program and the work space required Forther enecution and storage also an additition cost is that the migration from traditionally separate application environment to an integration.Complenity of backup and recovery:-Backup and recovery opera -tion and fairly in complen DBMS envinnenment andthis is aproblemin concurrent multiuser DBMS. Q.What is Relation Algebra. Explain following set operations with proper example.Ans:-Relational algebra is a colle-ction of operiction to mani- pulate relation It is a procedural manipul- -ation language It deseribe the procedure for solving any tupe of problem It defines the complete scheme for each of the result relation.It specified the operation. And the other in which they are to be performed on tupple of relation. It is just like a programi - -ng on language.Relational algebra is divided into in to Following tupes OF operchions 1)set oriented operation. The operation that are performed on particular no. of set are called set oriented operation It is also called as basic operation broadly divided into following four types a)Union b)Intersection c)difference d) cartesian product set oriented operation:-The operation performed on particular number of well depine sets orientad operation or torciditional operation. Set oriented broadly divided into Following atypes. a)union Intersection,Difference, Contesian products. Q.Write any FOUR differences between 3NF and BCNF. 3NF:-1) 3NF is comparatively less strong than that of the BCNF.2)The functional dependencies in 3NF already exist in 2NF and INF.3)3NF has a comparatively much higher redundancy.4)In the case of 3NF, preservation occurs for all the functional dependencies. BCNF:- BCNF is comparatively much stronger than that of the 3NF.2)The functional dependencies in BCNF already exist in 3NF, 2NF, and INF.3)BCNF has a comparatively much lower redundancy.4)In the case of BCNF, there is no preservation for all the functional dependencies. Q. What is DDL? Explain following DDL commands with meaning & proper syntax and their example. ALTER:- ALTER TABLE COMMAND:- The use of this command is 10 alten the Staucture of table by Cither adding or modifiying Column Alter command is used to penferm the following action. On the table Ad Adding Column in the anisting Table b) Incncdoing and decreasing the column size and changing data typesI Dropping column Reniaming the column. Adding anew column to an existing table Syntan: ALTER TABLE table name ADD (Column-name1 Column-name” data-type Example:- ALTER TABLE Student ADD (result NUMBER (10)):Output Table attered 2) DESCRIBE:-Syntax: DESCRIBE TABLE Name Enample: DESCRIBE CREATE:- create table command. This command is used for Creciting tables The First stop In establishing a database is to create one or more tables to hold data, creating a table to hold data. creating cre atable Structure to hold data is called defining catable. CREATE TABLE < Table Names (columnname I Datatype (size); (column name 2 Data type (size);* Example salt create table depart- ment (dept no number (2), dname varchour 14) loc varehan (I3); Q.What is DML? Explain following DDL Commands with meaning & proper syntax and their example.Ans:-SELECT:- The Stect command enables to metrieve data from a specified table and display it is tabulas Form. The syntein of select command is * Syntan: SELECT Sname.stud-id FROM student, Example 2) UPDATE:-The UPDATE command is used to. change data already in a table one may change columns of selected row with this column: command syntax UPDATE Command is used to échange data already in atable one may change columns of selected row with this command. Syntan: UPDATE table-nameSET column-name = empression Column-name = expression.WHERE Cond Example:-UPDATE student SFT age age + 10 WHERE Stud = id> 105. DELETE:-Suntax: DELETE FROM <tablename> [where <cond”>]; Enamples SAL 7 DELETE FRomdepoiment sgrocos deleted. Q.What is SQL? Explain with Advantages and Disadvantages of SQL.Ans:- SQL is a widely used programming language designed to interface with databases.Web developers and data scientists may use SQL on a daily basis in their careers. SQL functions as a method for retrieving data from within a database, and this popular method can interface with multiple programs and systems. Advantages of SQL : SQL has many advantages which makes it popular and highly demanded. It is a reliable and efficient language used for communicating with the database. Some advantages of SQL Disadvantages of SQL : Although SQL has many advantages, still there are a few disadvantages. Various Disadvantages of SQL. Q.What is PL/SQL? Explain with its advantages.Ans:-PL/SQL gives high productivity to programmers as it can query, transform, and update data in a database. PL/SQL saves time on design and debugging by strong features, such as exception handling, encapsulation, data hiding, and object-oriented data types. Applications written in PL/SQL are fully Advantages:-PL/SQL Stands for Procedural Language for SQL.2. PL/SQL is not Flexible & not easy to learn.3.Data Manipulation not becomes very easy.4. PL/SQL is Procedural Language.5. PL/SQL is Extension of SQL.6. PL/SQL can be used as programming Language and as an application development tool. Q.Explain ANY FOUR SQL Data types in detail.Ans:-1)TINYTEXT Holds a string with a maximum length of 255 characters 2)TEXT(size) Holds a string with a maximum length of 65,535 bytes 3)BLOB(size) For BLOBS (Binary Large Objects). Holds up to 65,535 bytes of data.4)MEDIUMTEXT:-Holds a string with a maximum length of 16,777,215 characters Q.Explain Components of SQL in brief.Ans:-SQL uses several key commands while interacting with databases. These include: Data Definition Language (DDL): SQL uses commands to create and maintain databases such as CREATE, DROP, ALTER, TRUNCATE, and COMMENT. Data Query Language (DQL): This refers to SQL commands used to retrieve data from databases. Q.What is clause? Explain any two Clauses with proper example.Ans:-There are two types of clauses: independent clauses and subordinate clauses. Clauses contain a subject (the person or thing doing the action) and a verb (the action). Here is an example of a clause: The grey squirrel darted up a tree. Q.Draw & Explain architecture of PL/SQL.Ans:-In Oracle, PL/SQL (Procedural Language/SQL) is the procedural language extension to the non-procedural SQL. It combines the data manipulation power of SQL and the procedural power of standard programming languages. PL/SQL was developed by Oracle Corporation within the early ’90s to reinforce the capabilities of SQL. It integrates well with SQL* PLUS and other application development products of Oracle. PL/SQL is the superset of SQL. It provides SQL data manipulation commands and SQL data types. In PL/SQL, a block without any name is called Anonymous Block. PL/ SQL block consists of various functions, library, procedures, trigger, packages etc. Q.Draw Block Structure PL/SQL? Explain in detail.Ans:-A block is a unit of code that provides execution and scoping boundaries for variable declarations and exception handling. PL/SQL allows you to create anonymous blocks (blocks of code that have no name) and named blocks, which may be packages, procedures, functions, triggers, or object types. Q.What is Cursor? Explain with Implicit cursor & Explicit cursor with proper example.Ans:-Cursors can be broadly classified into Implicit Cursors and Explicit Cursors. Implicit cursors are automatically created when select statements are executed. Explicit cursors needs to be defined explicitly by the user by providing a name. They are capable of fetching a single row at a time. Implicit Cursor:-Whenever any DML operations occur in the database, an implicit cursor is created that holds the rows affected, in that particular operation. These cursors cannot be named and, hence they cannot be controlled or referred from another place of the code. We can refer only to the most recent cursor through the cursor attributes.Explicit Cursor:-Programmers are allowed to create named context area to execute their DML operations to get more control over it. The explicit cursor should be defined in the declaration section of the PL/SQL block, and it is created for the ‘SELECT’ statement that needs to be used in the code Q.Explain PL/SQL basics used in PL/SQL with proper example.Ans:-PL/SQL is a procedural language designed specifically to embrace SQL statements within its syntax. PL/SQL program units are compiled by the Oracle Database server and stored inside the database. And at run-time, both PL/SQL and SQL run within the same server process, bringing optimal efficiency. Q.Explain variable used in PL/SQL.Ans:-A variable is a meaningful name which facilitates a programmer to store data temporarily during the execution of code. It helps you to manipulate data in PL/SQL programs. It is nothing except a name given to a storage area