Anda di halaman 1dari 14

1)Which type of entity cannot exist in the database unless another type of entity also exists in the

database, but does not require that the identifier of that other entity be included as part of its own
identifier?
Weak entity
2)What is an ERD?
A ERD or Entity-Relationship Diagram, is a chart that visually represents the relationship
between database entities.
3)What is entity?
An Entity can be any object, place, person or class. In E-R Diagram, an entity is
represented using rectangles. Consider an example of an Organization. Employee, Manager,
Department, Product and many more can be taken as entities from an Organization.
4)What is weak entity?
Weak entity is an entity that depends on another entity. Weak entity doesnt have key
attribute of their own. Double rectangle represents weak entity.
5)What is attribute?
An Attribute describes a property or characteristic of an entity. For example, Name, Age,
Address etc can be attributes of a Student. An attribute is represented using eclipse.
6)What is relationship?
A Relationship describes relations between entities. Relationship is represented using
diamonds.
7)Key attribute vs Composite attribute?
Key attribute represents the main characterstic of an Entity. It is used to represent
Primary key. Ellipse with underlying lines represent Key Attribute.
An attribute can also have their own attributes. These attributes are known
as Composite attribute.
8)What is genralisation?
Generalization is a bottom-up approach in which two lower level entities combine to
form a higher level entity. In generalization, the higher level entity can also combine with other
lower level entity to make further higher level entity.

9)Define Sepcialization?
Specialization is opposite to Generalization. It is a top-down approach in which one
higher level entity can be broken down into two lower level entity. In specialization, some higher
level entities may not have lower-level entity sets at all.
10)What is aggregration?
Aggregration is a process when relation between two entity is treated as a single entity.
Here the relation between Center and Course, is acting as an Entity in relation with Visitor.
11)Draw a er diagram for library management system.

1. What are the basic data types in SQL?


Ans:

1)Numeric
2)Character-string
3) Bit-string
4)Boolean
5)Date
6)Timestamp
7)Interval

2. What is the date type of CLOB and Maximum length for CLOB ??
Ans: CLOB is a character-string data type
CLOB- CHARACTER LARGE OBJECT
CLOB maximum length can be specified in kiloBytes(k) or megaBytes(m) or
gigaBytes(G).
For example:
CLOB(20K) specifies a maximum length of 20 kilobytes.

3. What is the command for creating a Table?


Ans:
CREATE TABLE table_name(columnname type, ..)

4 How to create Schema?


Ans:
A Schema is created via the CREATE SCHEMA statement , which can include all the schema
elements definitions.

5. What is catlog?

Ans:
Collection of Schemas in an SQL enivornment.
A catlog always contains a special schema called INFORMATION_SCHEMA.

6. How to define default value?


Ans:
DEFAULT <value>

7. Give an example for a constraint with CHECK?


Ans:
Eno INT NOT NULL CHECK (Eno >0 AND Eno<23);

8. Example for Primary Key contraint?


Ans:
Eno INT PRIMARY KEY

9. What is unique clause?


Ans:
Specifies alternate (secondary) keys.
Ex: Ename VARCHAR(15) UNIQUE;

10. What is tuple based contraints?


Ans:

In addition to key and referential integrity constants, which are specified by special
keywords, other table constraints can be specified at end of CREATE TABLE statements.

11.What is the basic statement for retrieving information from a database?


Ans: SELECT statement.

12.What is mapping or a select-from-where block?


Ans: It is formed of the three clauses SELECT,FROM and WHERE and has the following form:
SELECT <attribute list>
FROM

<table list>

WHERE

<condition>;

where
<attribute list> is a list of attribute names whose values are to be retrieved by the query.
<table list>is a list of the relation names required to process the query.
<condition>is a conditional (boolean) expression that identifies the tuples to be retrieved by the
query.

13.What is aliases or tuple variables?


Ans: Declaring alternative relation names called aliases or tuples variables.An alias can follow
the keyword AS or it can directly follow the relation name.
Eg: EMPLOYEE E,EMPLOYEE S

14.Unspecified WHERE clause indicates what?


Ans:A missing WHERE clause indicates no condition on tuple selection;hence all tuples of the
relation specified in the FROM clause qualify and are selected for the query result.

15.What is the use of asterisk(*)?

Ans:It is used to retrieve all the attribute values of the selected tuples.

16.What is the use of keyword DISTINCT?


Ans:DISTINCT is used to eliminate duplicate tuples from the result of an SQL query,meaning
that only distinct tuples should remain in the result.

17.What is ordering by clause?


Ans:SQL allows the user to order the tuples in the result of a query by the values of one or more
of the attributes that appear in the query result by using the ORDER BY clause.

18.How is partial strings are specified?


Ans:They are specified using two reserved characters:% replaces an arbitrary number of zero or
more characters and the underscore(_) replaces a single character.

19.

State the function of INSERT command.

Sol.

In its simplest form INSERT command is used to add a single tuple to a relation or table.
Relation or table name has to be specified along with the list of values for the tuple. The
same command can also be used to insert more than one tuple by slightly changing the
syntax.

20

Give the syntax for INSERT command in its simple form (Inserting a single tuple).

Sol.

INSERT INTO <table name> VALUES (<attr value1>, <attr value2>,<attr vlaue3>,
..,<attr value n>);

21

Give the syntax for INSERT command where multiple tuples can be inserted.

Sol.

INSERT INTO<table name>VALUES (<&column name1>,<&column name2>,


..,<&column name n);

22

State the function of DELETE command.

Sol.

This command is used to delete tuples from a relation or a table. It includes a WHERE
clause to specify the tuples to be deleted.

23

Give the syntax for DELETE command.

Sol.

DELETE FROM <table name>WHERE <condition>;

24

State the function of UPDATE command.

Sol.

This command is used to modify attribute values of one or more selected tuples. WHERE
clause is included in this command to specify the tuples to be modified.

25

Give the syntax for UPDATE command.

Sol.

UPDATE <table name> SET <attribute 1=new value, attribute 2=new value,..attribute
n = new value>WHERE <attribute=some value>;

26. What is Data Model?


Data model is a type of data abstraction that is used to provide this conceptual
representation. The Data model uses logical concepts, such as objects, their properties, and their
interrelationships, that may be easier for most users to understand than computer storage
concepts
1.What is tradional database?
In traditional database applications,in which most of the information that is stored and
accessed is either textual or numeric.

2.Define the following terms:


i)GIS
Geographic information systems (GIS) can store and analyze maps, weather data, and
satellite images.

ii)Data warehouses and OLAP


Data warehouses and online analytical processing (OLAP) systems are used in many
companies to extract and analyze useful business information from very large
databases to
support decision making.

3.Define database.
i)A database is a collection of related data.
ii)A database represents some aspect of the real world, sometimes called the miniworld or
the universe of discourse (UoD).
iii)A database is a logically coherent collection of data with some inherent meaning.
iv)A random assortment of data cannot correctly be referred to as a database.

4.Define DBMS.
A database management system (DBMS) is a collection of programs that enables users to
create and maintain a database. The DBMS is a general purpose software system that facilitates
the processes of defining,constructing, manipulating, and sharing databases among various users
and applications.

5.Define metadata.
The database definition or descriptive information is also stored by the DBMS in the
form of a database catalog or dictionary.It is called meta-data.

6.Whom we call "workers behind the scene" ?


"Workers behind the scene" are those who work to maintain the database system
environment but who are not actively interested in the database contents as part of their daily job.

7.What is DBA ?

The DataBase Administrator is responsible for authorizing access to the database,


coordinating and monitoring its use, and acquiring software and hardware resources as needed.
The DBA is accountable for problems such as security breaches and poor system response time.

8.Who are termed as end users ?


End users are the people whose jobs require access to the database for querying,
updating, and generating reports; the database primarily exists for their use.

9.List out the categories of end users.


i)Casual End Users
ii)Naive or Permanent End Users
iii)Sophisticated End Users
iv)Standalone users

10.What is canned transaction ?


Permanent end users main job function revolves around constantly querying and
updating the database, using standard types of queries and updates called canned
transactions,that have been carefully programmed and tested.

11.Who are system analysts ?


System analysts determine the requirements of end users, especially naive and parametric
end users, and develop specifications for standard canned transactions that meet these
requirements.

12.Who are called software developers ?


Application programmers implement the requirements of end users as programs.Then
they test, debug, document, and maintain these canned transactions. Such analysts and
programmers commonly referred to as software developers or software engineers.

13.What is data normalization ?


Normalization of data can be considered a process of analyzing the given relation
schemas based on their FDs and primary keys to achieve the desirable properties of minimizing
redundancy and minimizing the insertion,deletion,and update anomalies.

14.What is denormalization ?
By placing all the data together,we do not have to search multiple files to collect this
data.This is known as denormalization.

15.Write any five advantages of using DBMS Approach.


i)Controlling Redundancy.
ii)Restricting Unauthorized Access.
iii)Provinding Persistent Storage for program Objects.
iv)Providing Backup and Recovery.
v)Providing Multiple User Interfaces.

16.Define refrential integrity constraint.


A more complex type of constraint that frequently occurs involves specifying that a
record in one file must be related to records in other files.This is known as a referential integrity
constraint.

17.What is key or uniqueness constraint?


This constraint specifies uniqueness on data item values, such as every course record
must have a unique value.This is known as a key or uniqueness constraint.

18.What is deductive database system ?

Some database systems provide capabilities for defining deduction rules for inferencing
new information from the stored database facts.Such systems are called deductive database
systems.

19.Define a trigger.
A trigger is a form of a rule activated by updates to the table,which results in performing
some additional operations to some other tables,sending messages,and so on.

20.How DBMS Approach benefit organisations?


i)Potential for Enforcing Standards.
ii)Reduced Application Development Time.
iii)Flexibility.
iv)Availability of Up-to-Date Information.
v)Economies of Scale.
1).HOW IS SQL SCHEMA DEFINED.?
An schema is identified by schema name,and includes an authorization identifier to indicate
the user account who owns the schema
2.)WHAT ARE SCHEMA ELEMENTS.?
schema elements include tables,constraintsiews,domains and other constructs that describe the
schema

3.)WRITE ABOUT CREATE TABLE COMMAND IN SQL .?


the create table command is used to specify a new relation by giving it a name and specifying
its attributes and initial constraints.
4.)WHAT ARE BASIC DATA TYPES.
the basic data types are
numeric data type

character string data type


bit string data type
bolean data type
timestamp data type

5.)WRITE ABOUT CHARCTTER STRING DATA TYPE.?


charchter stirng data type are either fixeed length char or charchter(n)
where n is the number of charchters or variying length .VARCHAR
6.)WRITE ABOUT BIT STRING DATA TYPE.?
bit string are either fixed length n bit or variying length BIT variying ..where n is the max no of
bits..
8.)WRITE ABOUT BOOLEAN DATA TYPE
he boolean data type as a traditinoal value of true or false ..in SQL,because of the presence of
null values s
a three valued logic is used ,so third possible value for a boolean type is UNKNOWN
9.)WRITE ABOUT DROP COMMAND.?
the drop command can be used to drop named schema elements such as tables,domainsor
constraints..

10.)WRITE CASCADE DROP BEHAVIOUR USED.?


for ex to remove the company database schema and all its tables ,domains,and other
elements .the cascade option is used

12.)WRITE THE USE OF ALTER COMMAND.?

the definition of base table or other named schema elements can be changed by using the alter
command .for base tables the possible alter actions are

include adding or dropping a column ,changing a column definition and adding or dropping a
table

13.)WHAT ARE NESTED QUERIES.?


some quries that require that exsiting values in the data base be fetched and then used ina
comparison condition ..such quries
can be convinently formulated by using nested queries..

14.)WHAT ARE CORRELATED NESTED QURIES.?

whenever a condition in the WHERE clause of a nested queries references some attribute of a
relation declared in the outer query
the two queries are said to be correlated...
15.) WHAT ARE AGGREGATE FUNCTIONS IN SQL.?
the concept of aggregate function is introduced as a relational operation .because grouping and
aggreation are requried
in many database applications sql has features that incoporate these concepts...
16.)WHAT IS THE USE OF AGGREGATE FUNCTIONS IN SQL.?
the COUNT function is used return the number of tuples or values as specified ina
the functions SUM,MAX,MIN and AVG are applied to a set of muliset of numeric values and
return respectively...

17.)WHICH DATA MODEL IS KNOWN AS RECORD BASED DATA MODEL.?DESCRIBE


ABOUT IT.?

representational data model is known as record based data model.as it represent the data using
record structures

18.)WHAT IS ACCESS PATH.?GIVE AN EXAMPLE..?IN WHICH DATA MODEL IT IS


REPRESENTED.?
access path describes the structure that makes the search for particular record efficent
index is the example of accesspath .it is represented in physical data model.
19.)WHAT IS SCHEMA EVOLUTION .?
adding the new data item to each record in a file is called as schema evolution..

20.) WHAT IS DATABASE RATE .? WHEN CAN IT BE CHANGED.?


the data in a database at a particular time is called a database state or snapshot..
everytime when a record is marked or deleted ..when the value of data item in a recordis
changed form one state of db
changes to another state
21.)WHAT IS DISADVANTAGE OF SCHEMA ARCHITECTURE.?
the two level of mapping create an overhead during compitation and execution of a query
or program ,leading
to inefficient in DBMS
22.)WHAT IS DML And WHAT ARE THE TWO TYPES OF DML.?
DML is data manipulation language ..the dbms provides a set of operations or a language
called DML for manipulating
retrival,invertion deletion and notification of data in the database
two types are
high level or non procedural DML
low level or procedural DML

Anda mungkin juga menyukai