Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 4

Subject Name: DBMS and SQL Server set 2

1. Define the following terms:


o Entity :
The entity is the most basic concept in the E-R model that represents important
objects in the real application. An entity is something which is described in the
databases by storing its data. it may be concrete entity a conceptual entity .

o Entity set :
An entity set is a collection of similar entities. This concept allows to grouping of
similar entities which perform same task in the applications. Two entity sets may
have a common entity. The entity set is frequently referred to as an entity type or
class ,whereas an individual entity is considered as an occurrence to that type .
o Attributes :
An attribute describes a property associated with entities. Attribute will have a
name and a value for each entity. A set of attributes would describe one entity set
and an entity will have value for each if these attributes.
o Domain :
A domain define a set of permitted values for a attribute . A domain will typically
be defined by the data type of the attribute, range of permitted values etc.
o One to one relationship :
Where one entity in A may be associated at most with one entity in B.For ex.
Relationship between textbook and the course, where a course may have a specific
textbook.
o One to many relationship :
Where one entity in A is associated at with zero or more entities in B can be
associated with at most one entity from A. For ex. Relationship of department with
employee.

o Many to many relationship :


Where an instance in A is associated with many entities in B and vice-versa. For ex.
Relationship between a teacher and the course, where course can be have different
teacher and teacher can teach more than one course.
o Existence Dependence :
To check the correctness of the data in the database, there is constraint called
existence dependence, which indicates that entity has its own identity it cannot exist
independently.
o Symbols in E-R notation
The E-R model is represented using different symbols as shows the notations for
representing different concepts of the ER model.
2. Discuss the following concepts of Normalization with examples :
• Needs for normalization
We will separate all database as usual. Because in single database can’t be
normalized. Normalization is a process to remove rededency and for purpose of
(insert, delete and modify) anomaly.
Employee Employee Store Department Item Item Item
no. name branch no. description price
21130680 Anand Downtown Hardware TR 10 Router 35
Kumar SA 1 Saw 19
PT 6 Drill 21
AB 16 Column 245
41984620 Balwant Cuter Autoparts MC File 150
Singh point 16
AC Hammer 290
146
BD Chisel 90
100
61204721 Bhagwant Fashiom Men’s HS 10 Shirt 350
point clothes
Un-normalized Database
• First Normal Form
When table has no repeating group. It is a set to be in one first normal form that is
for each cell in a table there can be only value. This should be atomic in the sense
that it cannot be decompose into smaller pieces.
* Employee name Store branch Department
Employee no.
21130680 Anand Kumar Downtown Hardware
4198462 Balwant Singh Cuter point Autoparts
61204721 Bhagwant Singh Fashion Point Men’s clothes
Employee database
* *
Employee no Item no Item Description Item Price
21130680 TR 10 Router 35
SA 1 Saw 19
PT 6 Drill 21
AB 16 Column 245
4198462 MC 16 File 150
AC 146 Hammer 290
BD 100 chisel 90
61204721 HS 10 Shirt 350
Item no. database
 Second Normal Form
A relation is said to be in 2NF if it is in 1NF and non-key attributes are functionally
dependent on the key attribute(s).Further if the key has more than one attribute then
no non-key attributes should be functionally dependent upon a part of the key
attributes.
 Third Normal Form
A third normal form normalization will be needed where all attributes in a relation
tuple are not functionally dependent only on the key attribute. If two non-key
attributes are functionally dependent, then there will be unnecessary duplication of
data.
3. Discuss the following:
• SQL Server Components
SQL server components include software for both server and client, and also an
array of database objects that help you structure your data and define data
integrity mechanisms.
i. Server Software
The SQL server services include SQL server, SQL server agent, and Microsoft
distributed transaction coordinator (Ms-DTC).
ii. SQL Server Service
It is the component that processes all transact-SQL statement that are sent from
SQL server client applications, that manages all files that comprise the database
on the server.

• SQL Server Administration Tools & Wizards


SQL server provides a number of administrative tools and wizards that as with
particular aspects of SQL server. The following line describes SQL server 2005
tools & wizards.
4. Discuss the following built- in functions of SQL Server 2005 with suitable
examples:
Function Of SQL Server-2005
• Mathematical Function
When using mathematical function consider the following:
• Use mathematical function to return values for operations on
columns with numeric data.
• The monetary data types (money and small money) consist of
numeric data for decimal currencies. We must precede money data with a currency
symbols: without one, the value is treated as a numeric with a scale of 4.
• Even when input with a currency symbol the monetary data types
does not return currency symbols in the result.

String Function
String function are used for various operations on character and binary strings, and
they return values commonly needed for operations on character data. A few string
function can also be used on binary and verbinary data.
We can use string function to :
• Retrieve only apposition of a strings(substrings).
• Look for similarities in the sound of character string(SOUNDEX and DIFFERENCE ).
• Find a starting position number of the latter. A in “what a beautiful day”.
• Concatenate or combine strings into one string. For example, combining a
first name, last name and middle name or initial for a full name.

You might also like