0% found this document useful (0 votes)
13 views3 pages

DBMS Unit 6 Macro

Uploaded by

kkartikb18
Copyright
© © All Rights Reserved
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% found this document useful (0 votes)
13 views3 pages

DBMS Unit 6 Macro

Uploaded by

kkartikb18
Copyright
© © All Rights Reserved
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/ 3

Active and Deductive Databases: Active Databases • Active Disadvantages: 1.

As there is no fixed schema, storing the data is


databases are the databases which consists of triggers. The situation complex. 2. Querying the database is less efficient as the data is in
and action rules are embedded in the active databases. The active semi-structured manner. 3. Interpretation of relationship among data
databases are able to react automatically to the situations in the is difficult. Features of Semi-Structured Data Models: 1. The semi-
database. The trigger is a technique for specifying certain types of structured data can not be stored in the form of rows and columns in
active rules. The commercial databases such as Oracle, DB2, databases. 2. The semi structured data does not obey the tabular
Microsoft SQLServer allows the use of triggers. i) Event : The events structure of data models. But it has some structure. 3. Semi-
are database update operations that are performed explicitly on the structured data contains tags and elements which is used to group
databases. ii) Condition : The condition determines whether the rule data and describe how data is stored. 4. The entities can be grouped
action should be executed. If the action is not specified then the together based on their properties. 5. The entities in the same group
action will be executed automatically on occurrence of the event. iii) may or may not have the same attributes(properties). 6. As the semi-
Action : The action is usually a sequence of SQL statements. It could structured data does not have well defined structure, it can not be
be a database transaction or external program that will be executed programmed easily by the traditional programming languages. JSON:
on occurrence of condition. CREATE TABLE PersonTab ( pname • JSON stands for JavaScript object notation. • Using JSON we can
VARCHAR2(20) ); CREATE OR REPLACE TRIGGER MyTrigger BEFORE store and retrieve data. This text based open standard format. • It is
INSERT ON PersonTab FOR EACH ROW ENABLE DECLARE usr_name extended from JavaScript language. Features of JSON: 1. It is text
VARCHAR2(20); BEGIN SELECT user INTO usr_name FROM dual; based, lightweight data interchange format. 2. It is language
DBMS_OUTPUT.PUT_LINE('Inserted a new row by user: independent. 3. It is easy to read and write. 4. It is easy for machines
'||usr_name); END; / INSERT INTO PersonTab VALUES('Sharda');. to parse and generate. 5. It uses the conventions that are familiar to
Deductive Database • Deductive database is a database system that the languages like C, C++, Java, JavaScript, Perl, Python and so on.
can make deductions based on rules and facts stored in the database. Structure of JSON: JSON is built on two structures : 1. A collection of
• Deductive databases use the concept of logic programming for name/value pairs. In various languages, this is realized as an object,
specifying the rules and the facts. Prolog is a popular programming record, struct, dictionary, hash table, keyed list, or associative array.
language which is based on the concept of logic programming. • There 2. An ordered list of values. In most languages, this is realized as an
are two types of specifications used in deductive databases – 1) Facts array, vector, list, or sequence. JSON Object: • JSON object holds the
: Facts are specified as the same way the relations are specified in the Key value pair. • Each key is represented as string and value can be of
Relational Database except it is not necessary to include the attribute any datatype. • The key and value are separated by colon.• Syntax {
names.The meaning of an attribute value in a tuple is determined string : value, .......} • For example “Age”:38 • Each key value pair is
solely by its position in the tuple. 2) Rules : They specify “virtual separated by comma. • The object is written within the { }curly
relations” that are not actually stored but that can be formed from brackets. 1) JSON object containing value of different data types: {
the facts by applying deduction mechanisms based on the rule “student”: { “name”: AAA”,  String value “roll_no”: 10,  Numeric
specifications. Semantic Databases: • Semantic database value “Indian”: true  Boolean value } }.2) JSON Nested Object: {
management system is a system that stores the meaning of “student”: { “name”: “AAA”, “roll_no”: 10, “address”: { “Street”:
information as facts about objects. Semantic databases represent the “Shivaji Nagar”, “City”: “Pune”, “Pincode”: 411005 } } }.XML: • XML
data models in which data is arranged in some logical manner. • It is stands for eXtensible Markup Language. • This scripting language is
a conceptual database system that include semantic information that similar to HTML. That means, this scripting language contains various
adds basic meaning of the data and relationships among the data. • tags. But these tags are not predefined tags, in-fact user can define
The semantic database systems allow easy development of his own tags. • Thus HTML is designed for representation of data on
application programs and also it becomes easy to maintain such the web page whereas the XML is designed for transport or to store
database system when data is updated. Features: 1. Semantic data. Uses of XML: 1. XML is used to display the meta contents i.e.
database systems are exceptionally usable and flexible. 2. They have XML describes the content of the document. 2. XML is useful in
shorter application design and programming cycle. 3. It provides user exchanging data between the applications. 3. The data can be
control via an intuitive structure of information. 4. It empowers the extracted from database and can be used in more than one
end-users to pose complex, ad-hoc, decision support queries. 5. application. Different applications can perform different tasks on this
These are highly efficient database systems. Semi-Structured Data: • data. Advantages of XML: 1. XML document is human readable and
Semi structured data is a kind of data that can’t be organized in we can edit any XML document in simple text editors. 2. The XML
relational databases. This is a kind of data which does not have document is language neutral. That means a Java program can
structural framework but it might have some structural properties. • generate an XML document and this document can be parsed by Perl.
Semi-structured data is basically a combination of structured and 3. Every XML document has a tree structure. Hence complex data can
unstructured data. For example - Facebook that organizes be arranged systematically and can be understood in simple manner.
information by User, Friends, Groups, Marketplace, etc., but the 4. XML files are independent of an operating system. Goals of XML:
comments and text contained in these categories is unstructured. • 1. User must be able to define and use his own tag. This allows us to
The semi-structured data does not reside in relational database. By restrict the use of the set of tags defined by proprietary vendors. 2.
applying some processes we can store them in relational database. • Allow user to build his own tag library based on his web requirement.
XML(eXtensible Markup Language) is widely used to store and 3. Allow user to define the formatting rules for the user defined tags.
exchange semi structured data. • Examples of semi-structured data 4. XML must support for storage or transport of data. Features of
are - 1. Emails 2. Web pages. 3. XML documents 4. Zipped files 5. XML: • XML is EXtesible Markup Language intended for transport or
Binary executables. Advantages: . The semi-structured data is flexible storage of the data. • The most important feature of XML is that user
as schema can be changed accordingly. 2. Data is portable. 3. The is able to define and use his own tag. • XML contains only data and
heterogeneous information can be stored in semi-structured data. 4. does not contain any formatting information. Hence document
There is no need to express the requirements in pure SQL only. developers can decide how to display the data. • XML permits the
document writer to create the tags for any type of information. Due and objects in the programming language. • An object can be
to this virtually any kind of information can be such as mathematical retrieved based on the selection condition on its attributes. • The
formulae, chemical structures, or some other kind of data can be object oriented programs can be used to create an object, update the
described using XML. • Searching sorting, rendering or manipulating objects and delete the object. Similarly mapping from object to
the XML document is possible using Extended Stylesheet Language relations is possible by updating, deleting, and inserting tuples in the
(XSL). • The XML document can be validated using some external database. • Hibernate is an open source object relational mapping
tools. • Some commonly used web browsers like Internet Explorer tool for the Java platform. Advantages: 1. It supports object oriented
and Firefox Mozilla provide support to the tags in XML. Hence XML is features such as inheritance, polymorphism, association and so on. 2.
not at all vendor specific or browser specific. Document Type Instead of plain data, the object relational mapping return objects.
Definition (DTD): • The document type definition is used to define the These objects can be easily accessed, programmed and permanently
basic building block of any xml document. • Using DTD we can specify stored in memory. 3. Object relational mapping systems also provide
the various elements types, attributes and their relationship with one query languages that allow programmer to write queries directly on
another. • Basically DTD is used to specify the set of rules for the object model. Such queries are translated into SQL queries for
structuring data in any XML file. • For example : If we want to put underlying relational database. Disadvantages: 1. The query language
some information about some students in XML file then, generally we for object relational mapping systems have limited capabilities. 2.
use tag student followed by his/her name, address, standard and There is significant overhead on the object relation system when
marks. That means we are actually specifying the manner by which there occurs bulk database update. Geographic Data: • Geographic
the information should be arranged in the XML file. And for this data are spatial in nature. For example – maps and satellite images
purpose the Document Type Definition is used. • There are two ways are geometric data. • Maps not only provides the location but along
by which DTD can be defined. Merits of DTD: 1. DTDs are used to with location it also provides detailed information about the location.
define the structural components of XML document. 2. These are Applications of geographic data: 1) Web based road map services
relatively simple and compact. 3. DTDs can be defined inline and which allows us to use map data for vehicle navigation. 2) Vehicle
hence can be embedded directly in the XML document. Demerits of navigation systems store information about roads and services for use
DTD: 1. The DTDs are very basic and hence cannot be much specific of drivers. 3) Global Positioning System (GPS) information broadcasts
for complex documents. 2. The language that DTD uses is not an XML from GPS satellites to find the current location of user with some
document. Hence various frameworks used by XML cannot be accuracy. Representation of geographic data: 1. Raster data : Raster
supported by the DTDs. The DTD cannot define the type of data data consists of bit maps or pixel maps in two or more dimensions.
contained within the XML document. Hence using DTD we cannot For example – 2D raster image : Satellite image of cloud cover, where
specify whether the element is numeric, or string or of date type. 4. each pixel stores the cloud visibility in a particular area. 2. Vector data
There are some XML processor which do not understand DTDs. 5. The : The vector data is constructed from basic geometric objects such as
DTDs are not aware of namespace concept. Difference between points, line segments, polygon, triangles and so on. The vector data is
ODBMS and DBMS: OODBMS- 1.OODBMS stands for Object Oriented always used to represent the map data. For instance – roads can be
Database Management System that supports creating and modelling considered as two dimensional(2D) and represented by lines and
of data as objects. 2. Handles larger and complex data than RDBMS. curves. Rivers may be represented as complex curves. The regions
3. Data Handling - Stores data as well as methods to use it. 4. OODBMS and lakes can be represented using polygons.
is object-oriented. 5. OODBMS uses inheritance and encapsulation to
reduce data redundancy. 6. Examples - Object Database,
Objectivity/DB, ObjectStore, Cache, and, ZODB. DBMS- DBMS is any
Database Management System. The most popular DBMS are
relational database management systems in which we store
everything as a relation between entities. 2. Handles comparatively
simpler data. 3. Data Handling - RDBMS stores only data. 4. RDBMS is
table-oriented. 5. Normalization is used to eliminate data redundancy
in RDBMS. 6. Examples - MSSQL, MySQL, and Oracle. Table
Inheritance: • Table inheritance is a feature where there are sub-
tables in Relational database management systems that inherit the
schema of parent tables. • For example – Following statements
demonstrate how to achieve table inheritance create table people of
Person;  Parent table create table students of Student  Child table
under people; create table teachers of Teacher  Child table under
people; • As a result of above statements, every attribute present in
the people table is also present in the subtables students and
teachers. Similarly every tuple present in the students or teachers
become implicitly present in people. • Using the keyword only in the
query we can restrict the access to particular table. For example – if
we want to find the tuples that are present in the people table but
not in its subtables then we should use “only people”. Object-
Relational Mapping: • Object oriented relational mapping is an
approach in which object oriented programming language is
integrated with databases. • The object-relational mapping allows a
programmer to define mapping between tuples in database relations
Study material provided by: Vishwajeet Londhe

Join Community by clicking below links

Telegram Channel

https://t.me/SPPU_TE_BE_COMP
(for all engineering Resources)

WhatsApp Channel
(for all tech updates)

https://whatsapp.com/channel/
0029ValjFriICVfpcV9HFc3b

Insta Page
(for all engg & tech updates)

https://www.instagram.com/
sppu_engineering_update

You might also like