Data base Management Systemdatabase

Explain any three aggregate functions with examples

Explain any three aggregate functions with examples. Aggregate Functions are keywords in SQL used to manipulate values within columns for output purposes. A function is a command always used in conjunction with a column name or expression. There are several types of functions in SQL.  An aggregate function is used to provide summarization information for an SQL statement, such as counts, totals, and averages.MIN      - returns the smallest value in a given columnMAX     - returns the largest value in a given columnSUM    - returns the sum of the numeric values in a given columnAVG     - returns the average value of a given columnCOUNT- returns the total number of values in a given columnCOUNT(*) - returns

Read More
Data base Management Systemsdatabase

Explain embedded SQL

Explain embedded SQL. Embedded SQL is a method of inserting inline SQL statements or queries into the code of a programming language, which is known as a host language. Because the host language cannot parse SQL, the inserted SQL is parsed by an embedded SQL preprocessor.Embedded SQL is a robust and convenient method of combining the computing power of a programming language with SQL's specialized data management and manipulation capabilities.

Read More
Data base Management Systemdatabase

Explain Database architecture

Explain Database architectureThere are following three levels or layers of DBMS architecture:• External Level•Conceptual Level• Internal LevelObjective of the Three Level ArchitectureThe objective of the three level architecture is to separate each user's view of the database from the Way the database is physically represented. There are several reasons why this separation is desirable:• Each user should be able to access the same data, but have a different customized view of the data. Each user should be able to change the way he or she views the data, and this change should not affect other users.• Users should not have to deal directly with physical database storage details, such as indexing or hashing. In other words a user's interaction with the database should be independent of stora

Read More
Data base Management Systemsdatabase

Explain ACID properties.

Explain ACID propertiesExplain ACID properties. ACID (Atomicity, Consistency, Isolation, Durability) is a set of properties that guarantee that database transactions are processed reliably. In the context of databases, a single logical operation on the data is called a transaction. For example, a transfer of funds from one bank account to another, even involving multiple changes such as debiting one account and crediting another, is a single transaction.Atomicity : Atomicity requires that each transaction be "all or nothing": if one part of the transaction fails, the entire transaction fails, and the database state is left unchanged. An atomic system must guarantee atomicity in each and every situation, including power failures, errors, and crashes. To the outside world, a committed t

Read More
Data base Management Systemsdatabase

Explain normalization.

Explain normalization.Explain normalization. In creating a database, normalization is the process of organizing it into tables in such a way that the results of using the database are always unambiguous and as intended. Normalization may have the effect of duplicating data within the database and often results in the creation of additional tables. (While normalization tends to increase the duplication of data, it does not introduce redundancy, which is unnecessary duplication.) Normalization is typically a refinement process after the initial exercise of identifying the data objects that should be in the database, identifying their relationships, and defining the tables required and the columns within each table.First normal form (1NF). This is the "basic" level of normalization and genera

Read More
Data base Management Systemsdatabase

Define XML and explain the structure of XML.

Define XML and explain the structure of XML. Define XML and explain the structure of XML.XML stands for extensible markup language. XML was developed around 1996 and is a subset of SGML. It's documents conform to SGML. XML was made less complicated than SGML to enable its use on the web. XML uses the ISO 10646 (Unicode) standard for encoding characters.XML StructureThis page provides a description of XML structure including the document parts, the prologue, and provides a simple XML example document.Document PartsPrologDocument Element (root element)The Prologue : The prologue, equivalent to the header in HTML, may include the following:An XML declaration (optional) such as: <?xml version="1.0"?>A DTD or reference to one (optional). An example reference to an external DTD file:<!D

Read More
Data base Management Systemsdatabase

Explain Network and Relational data models

7. Explain Network and Relational data models. Explain Network and Relational data modelsThe network model is a database model conceived as a flexible way of representing objects and their relationships. Its distinguishing feature is that the schema, viewed as a graph in which object types are nodes and relationship types are arcs, is not restricted to being a hierarchy or lattice.The relational model for database management is a database model based on first-order predicate logic, first formulated and proposed in 1969. In the relational model of a database, all data is represented in terms of tuples, grouped into relations. A database organized in terms of the relational model is a relational database.In the relational model, related records are linked together with a "key". The...

Read More
Data base Management Systemsdatabase

Define RDBMS with example

4. Define RDBMS with example. Define RDBMS with exampleRDBMS is the abbreviated form of Relational Data Base Management System.  A relational database management system (RDBMS) is a database management system (DBMS) that is based on the relational model as invented by E. F. Codd, of IBM's San Jose Research Laboratory. Many popular databases currently in use are based on the relational database model. RDBMSs have become a predominant choice for the storage of information in new databases used for financial records, manufacturing and logistical information, personnel data, and much more since the 1980s. Relational databases have often replaced legacy hierarchical databases and network databases because they are easier to understand and use. However, relational databases have been challe...

Read More
Data base Management Systemsdatabase

Explain about triggers

5. Explain about triggers. Explain about triggersA database trigger is stored code that is executed immediately after a predefined event. It is used to ensure the coordinated performance of related actions. Although implementation varies, all major relational databases support triggers. A database trigger is procedural code that is automatically executed in response to certain events on a particular table in a database. Triggers can restrict access to specific data, perform logging, or audit data modifications....

Read More
Data base Management Systemsdatabase

Define deadlock with example

6. Define deadlock with example. Define deadlock with exampleIn a database, a deadlock is a situation that occurs when two or more different database sessions have some data locked, and each database session requests a lock on the data that another, different, session has already locked. Because the sessions are waiting for each other, nothing can get done, and the sessions just waste time instead. This scenario where nothing happens because of sessions waiting indefinitely for each other is known as deadlock.Database deadlock example: Suppose we have two database sessions called A and B. Let’s say that session A requests and has a lock on some data – and let’s call the data Y. And then session B has a lock on some data that we will call Z. But now, lets say that session A needs a lock on ...

Read More