Search This Blog

Saturday, April 24, 2010

cdac databse technology normaliztion part-4

Cdac original post part-3 for cdac mohali,cdac trivandrum,cdac pune,cdac hyderabad,noida and bangalore and recruitment from cdac.
Let me tell you before you go for this presenation how is the placement and recruitment in cdac going on.
I know about cdac hyderabad for cdac dabc its almost 100% and dac pune has around 80% ,desd pune has around 60% and desd hyderabad recruitment 70%.

Rest please you can enquire these things from orkut communities for 2010 created.
Here i am going on Data Normalization
Normalization

Database normalization is a technique for designing relational database tables to minimize duplication of information and to safeguard the database against certain types of logical or structural problems, namely data anomalies

Objectives

Data normalization aims to derive at records which avoid ?
Repetition of Data
Update anomalies
Insert Anomalies
Delete Anomalies


The Process of Normalization
Usually three steps (in industry) giving rise to
First Normal Form (1NF)
Second Normal Form (2NF)
Third Normal Form (3NF)
In academia
Boyce -Codd Normal Form (BCNF)
Fourth Normal Form (4NF)
Steps in Data Normalization
Attributes - Repeating Groups
When a group of attributes has multiple values then we say there is a repeating group of attributes in the entity

Functional Dependency


Consider a relation R that has two attributes A and B. The attribute B of the relation is functionally dependent on the attribute A if and only if for each value of A no more than one value of B is associated.
In other words, the value of attribute A uniquely determines the value of B

Stud_id -> stud_name
Stud_id -> Date of Birth
Module_id -> Module name
Marks -> grade

Full Functional Dependency

Let A and B be distinct collections of attributes from a relation R B is then fully functionally dependent on A if B is not functionally dependent on any subset of A.
(Stud_id, Module_id) -> marks

First Normal Form
A relation is in 1NF if and only if every attribute is single valued for
each tuple or row.

A relation is in 1NF if and only if there are no repeating groups of
Attribute values.


Example of First Normal Form
PURCHASE-ORDER (ORDER#, SUPPLIER#, ORDER-DATE
DELIVERY-DATE, (PART#, PART-DESCRIPTION,
QUANTITY-ORDERED, PRICE), TOTAL-PRICE)
Example in 1NF
PURCHASE-ORDER (ORDER#, SUPPLIER#, ORDER-DATE
DELIVERY-DATE, TOTAL-PRICE)
PURCHASE-ITEM-1 ( ORDER#, PART#, PART-DESCRIPTION,
QUANTITY-ORDERED, PRICE)
Example
STUDENT (Student#, student-name, student-address)

ENROLMENT (Student#, Course#, course-title,
tutor-name,tutor-staff#
1st Normal Form
Process results in separation of different objects
BUT anomalies may still exist
PURCHASE-ITEM-1( ORDER#, PART#, PART-DESCRIPTION,QUANTITY-ORDERED, PRICE)

PART-DESCRIPTION appears on every PURCHASE-ITEM occurrence.
This may result in anomalies when updating or deleting records
The problem in the example is that PART-DESCRIPTION is functionally dependent only on PART# (part of the identifier)
Second Normal Form
A relation is in 2NF if and only if it is in 1NF and all the
non-key attributes are fully functionally dependent on the
key.

Any entity type in 1NF is transformed to 2NF

Identify functional dependencies

Re-write entity types so that each non-identifying attribute is functionally dependent on the whole of the identifier
Example
PURCHASE-ORDER (ORDER#, SUPPLIER#, ORDER-DATE
DELIVERY-DATE, TOTAL-PRICE)
PURCHASE-ITEM-1 ( ORDER#, PART#, PART-DESCRIPTION,
QUANTITY-ORDERED, PRICE)
Functional Dependencies
PURCHASE-ORDER (ORDER#, SUPPLIER#, ORDER-DATE
DELIVERY-DATE, TOTAL-PRICE)
PURCHASE-ITEM-1 ( ORDER#, PART#, PART-DESCRIPTION,
QUANTITY-ORDERED, PRICE)

In 2nd Normal Form

Decompose PURCHASE-ITEM into two entity types
PURCHASE-ITEM (Order#, Part#, Quantity-Ordered, Price)
PART (Part#, Part-Description)
Original entity types are decomposed into three entity types in 2nd normal form
PURCHASE-ORDER (Order#,Supplier#, Order-Date, Delivery-Date, Total-Price)
PURCHASE-ITEM (Order#, Part#,Quantity-Ordered, Price)
PART (Part#, Part-Description)
Example in 2NF
STUDENT (Student#,Student-Name, Student-Address)
ENROLMENT ( Student#, Course#, Tutor-Name, Tutor-Staff#)
COURSE (Course#, Course-Title)

Third normal Form

A relation is in 3NF if and only if it is in 2NF and no
non-key attribute is transitively dependent on the key.


Any enity type in 2NF is transformed in 3NF

Determine functional dependencies between non identifying attributes
Decompose enity into new entities
Example
STUDENT (Student#,Student-Name, Student-Adderss)
ENROLMENT ( Student#, Course#, Tutor-Name, Tutor-Staff#)
COURSE (Course#,, Course-Title)
Functional Dependencies
STUDENT (Student#,Student-Name, Student-Adderss)
ENROLMENT ( Student#, Course#, Tutor-Name, Tutor-Staff#)
COURSE (Course#,, Course-Title)

Example in 3NF

STUDENT (Student#,Student-Name, Student-Adderss)
ENROLMENT ( Student#, Course#, Tutor-Staff#)
COURSE (Course#,, Course-Title)
TUTOR (Tutor-Staff#, Tutor-Name)
Example of Normal Forms

Functional Dependencies

Analysis of the sample FDs
1NF: Since PROGNAME and EMPID is the composite key, each cell contain single value so WORK is in 1NF.
The partial dependencies are
PROJNAME PROJMGR, BUDGET, STARTDATE
EMPID EMPNAME, SALARY, EMPMGR, EMPDEPT

Transform the relation work into an equivalent collection of 2NF relations
The relations schemes are:
PROJ ( PROJNAME, PROJMGR, BUDGET, STARTDATE)
EMP ( EMPID, EMPNAME, SALARY, EMPMGR, EMPDEPT)
WORK1 ( PROJANAME, EMPID, HOURS, RATING)
The above relations schemes are in 2NF.

Here is the download link download

cdac er diagram prsentation part-3

Cdac original post part-3 for cdac mohali,cdac trivandrum,cdac pune,cdac hyderabad,noida and bangalore and recruitment from cdac.
Let me tell you before you go for this presenation how is the placement and recruitment in cdac going on.
I know about cdac hyderabad for cdac dabc its almost 100% and dac pune has around 80% ,desd pune has around 60% and desd hyderabad recruitment 70%.

Rest please you can enquire these things from orkut communities for 2010 created.
Here i am going on er model
Er diagram :-
These all wil be covered
Entity Sets
Relationship Sets
Mapping Constraints
Keys
E–R Diagram
Design of an E-R Database Schema
Reduction of an E-R Schema to Tables


Entity-Relationship Diagrams

Developed by Chen in 1965.
Purpose:
To facilitate database design by allowing the designer to express the logical properties of the database in an enterprise schema.

An enterprise schema is a description that corresponds to the conceptual level.

It is valid for any kind of DBMS and will remain correct even if the DBMS is changed.

The diagrams are basically design tools and documentation for the system.

Classified as a Semantic data model since it attempts to capture the meaning and structure.

Entity Relationship Model c

Representation of ER model

The items in the model represent the ‘things’ in the real-world, and the
relationships between the real-world things are expressed by relationships in the model.
The environment of the model consists of
Entities
Attributes
Keys
Super Keys, Candidate Keys, Primary Keys, Foreign Keys
Relationships
one-one , one-many, many-one, many - many
Dependencies
Existence Dependency
Aggregation and Generalization


Entity Sets

A database can be modeled as:
– a collection of entities,
– relationships among entities.

An entity is an object that exists and is distinguishable from other objects.
Example: specific person, company, event

An entity set is a set of entities of the same type that share same properties.
Example: set of all persons, companies, trees, holidays

Attributes

An entity is represented by a set of attributes, that is,
descriptive properties possessed by all members of an entity set.
Example:
customer = (customer-name, social-security,
customer-street, customer-city)
account = (account-number, balance)
Domain – the set of permitted values for each attribute
Attribute types:
– Simple and composite attributes.
– Single-valued and multi-valued attributes.
– Derived attributes.


Relationship Sets

A relationship is an association among several entities
An attribute can also be a property of a relationship set.

Degree of Relationship Set

Refers to number of entity sets that participate in a relationship set.

Relationship sets that involve two entity sets are binary sets.

Relationship sets may involve more than two entity sets. Relationship sets that involve two entity sets are ternary sets.

Roles

The labels “manager” and “worker” are called roles; they specify how employee entities interact via the works-for relationship set.

Roles are indicated in E-R diagrams by labeling the lines that connect diamonds to rectangles.

Mapping Cardinality
Express the number of entities to which another entity can be associated via a relationship set.

For a binary relationship set the mapping cardinality must be one of the following types:
– One to one
– One to many
– Many to one
– Many to many

Relationships
Relationships
Existence Dependencies
If the existence of entity x depends on the existence of entity y,
then x is said to be existence dependent on y.
– y is a dominant entity (loan)
– x is a subordinate entity (payment)

Keys
Each record in a table must be unique

A super key is a column, or a set of columns, that uniquely identifies a record in a table.

A minimal super key , with no proper subset that is also a super key, is called a candidate key.

A key consisting of more than one column is called a composite key.

A primary key is the candidate key that is selected by the database designer, to uniquely identify records within the table.
– the candidate keys not selected are called
alternate keys.

A foreign key is a column or set of columns within a table that is the candidate key of another table.

Weak Entity Sets
An entity set that does not have a primary key is referred to as a weak entity set.

The existence of a weak entity set depends on the existence of a strong entity set; it must relate to the strong set via a one-to-many relationship set.

The discriminator (or partial key) of a weak entity set is the set of attributes that distinguishes among all the entities of a weak entity set.

The primary key of a weak entity set is formed by the primary key of the strong entity set on which the weak entity set is existence dependent, plus the weak entity set’s discriminator.
Weak Entity Set
Specialization Example
Generalization
A bottom-up design process – combine a number of entity sets that share the same features into a higher-level entity set

Specialization and generalization are simple inversions of each other; they are represented in an E-R diagram in the same way.

Attribute Inheritance – a lower-level entity set inherits all the attributes and relationship participation of the higher-level entity set to which it is linked.

Aggregation
It is an abstraction of that allows us to group together objects into higher level objects.

Its inverse is decomposition, means breaking
up an object into its detailed components.
In ERD, aggregation is represented by placing a large labeled rectangle around the objects being aggregated, whether they are entity sets alone or include relationships.
Download here oroginal er diagram cdac presenattion download

Wednesday, April 21, 2010

cdac 2010 database presentation

Database technology Part-2

THERE ARE MANY UPCOMING TECHNOLOGY DATABASE ABOUT ACCESS DATABASE
what is database
what is database system
what is database development will all be covered in this database presentation

web database technolgy is based on sql database and upcoming database are the fusion oracle database .
Smallest db is couchdb used in Iphone apps and in html5 .

Structured Query Language


It’s a relational database language
SQL commands are the means of communication with DBMS
SQL can be categorized as

DDL(Data Definition Language):Those SQL commands that
Operate on structure of database objects (table)?
Create,Alter,Drop.

DML(Data Manipulation Language): Those SQL commands
that operate on the data stored in the database objects.
Insert,Update,Delete,Select

DCL(Data Control Language): Those SQL commands that
Control the behavior of database objects
Commit,Rollback,Save point

Data types


Character data types
-CHAR(size):Stores fixed length character data.
Max size is 2000 bytes. Default & min size is 1 byte.

-VARCHAR2(size): Stores variable length character strings.
Max size is 4000 bytes, Min size is 1 byte. Must specify size.

-LONG:Columns defined as LONG can store variable-length
character data containing up to two gigabytes of information.

Number data types
-NUMBER(p,s): Stores numbers (fixed or floating point).

DATE: stores date & time. Standard format is
DD-MON-YY HH:MI:SS

Data types


LOB data types: Stores large blocks of unstructured
data (such as text, graphic images, video clips, and
sound waveforms) up to four gigabytes in size.
-BLOB: stores up to four gigabytes of binary data
-CLOB: stores up to four gigabytes of character data.
-BFILE:stores a file locator that points to an external file
containing the data.

RAW/LONG RAW:used to store binary data such as picture
image .
RAW max length 2000 bytes.
LONG RAW: 2gigabytes.

DML consist of-


Create
Alter
Drop

here is the link to download
download original cdac ppt

10g databaseaccess databasec# access databaseclient databaseconnecting databaseconnection databaseconvert access to sqlcopy technologydatabase advantagesdatabase codedatabase comparisondatabase conceptsdatabase connectdatabase engineeringdatabase fromdatabase indiadatabase installationdatabase introductiondatabase programsdatabase querydatabase replicationdatabase stored proceduresdatabase systemdatabase tablesdatabase technologiesdatabase technologydatabase withdatabases for dummiesdb databasedbms databasedelete databasedesigning databaseexample databasehow to databaseinstall databaselinux databasemicrosoft sqlmicrosoft sql servermicrosoft technologyms sql server databasemssql databasenew database technologiesperformance sqlperformance sql serverperformance sql server 2000performance tuning sql serverppt databaseselect databaseserver databasesql 2000sql databasesql database designsql generatorsql scriptssql serversql server 2000sql server 2000 tutorialsql server applicationssql server copy tablesql server database designsql server databasessql server dbasql server programmingsql server toolssql server tutorialssql technologysqlserver databasetable databasetechnology databasestrigger databaseusing databaseweb database applicationweb database technologies

Wednesday, April 14, 2010

cdac hyderabad original ppt on sql database and sql database server from hyderabad

this post consist of information technology database and database management as well as sql database
mainly consist of -
FMS & Disadvantages
Data redundancy and inconsistency
Difficulty in accessing the data
Data isolation
Integrity problems
Atomicity problems
Concurrent access anomalies
Security problems
Database Management System
Control of data redundancy
Sharing of data
Maintenance of Integrity
Control over Security
Data abstraction
Data independence
Data Abstraction

Data Models
-Hierarchal Model
-Network Model
-Relational Model

Relational Data Base Management System Concepts covered below
Let me explain you something-
Data :- It is defined as an information that can be recorded
and that has implicit meaning.

Database : Collection of related data, stored in a standardized format ,designed to be shared by multiple users.

DBMS(Data Base Management System):-
It consists of collection of inter related data and a set of
programs to access the data
It provides a convenient & efficient environment for inserting, retrieving,modifying and storing database information.


Database Applications
Banking: all transactions
Airlines: reservations, schedules
Universities: registration, grades
Sales: customers, products, purchases
Manufacturing: production, inventory, orders, supply chain
Human resources:employee records, salaries, tax deductions


Basic Concepts

DBMS provides users with an abstract view of data.
It hides the complex data structures for the representation of data in database.
Levels of abstraction
Physical level : Lowest level of abstraction describes how data is stored.

Logical level : Next higher level of abstraction describes what data is stored and the relationships among the data

View level : Highest level of abstraction describes only part of database.

Data Independence
Physical data
independence
Ability to modify the physical schema without causing application programs to be rewritten
Data Model
An integrated collection of concepts for describing data, relationships between data and constraints on the data.

A data model comprises three components:
– a structural part (a set of rules describing how
the database is to be constructed)?
– a manipulative part (defines the types of operations allowed on the data)?
– a set of integrity rules (ensures data accuracy)?

Types of data models
Object-based logical models: Based on collection of objects.
ER-model,object-oriented model
Record-based logical model:Database is structured in fixed format record.
Hierarchical,Network,relational models

Entity-Relationship Model
Example of schema in the entity-relationship model
Hierarchical model
A Hierarchical database consists of a collection of records that are connected to each other through links.

The hierarchical data model organizes data in a tree structure

Parent-child relationship (one-to-one or one-to-many) among data
Hierarchical data model
Hierarchical data model
Network Model

A Network database consists of a collection of records connected to one another through links,which can be viewed as pointers.

The records in the database are organized as collections of arbitrary graphs.

One-to-one, one-to-many, many-to-one, or many-to-many relationships possible

Relational Model
A relational model consists of relations which represents data and the relationships among data..
A relation is a two dimensional table with special properties.
A relational table is a collection of columns and rows
columns are called attributes and rows are called tuples.

Properties of Relational Tables
Table name is distinct from all other table names in the database.
Each cell of table contains exactly one atomic (single) value.
Each column has a distinct name.
Values of a column are all from the same domain.
Each record is distinct; there are no duplicate records.
Order of columns has no significance.
Order of records has no significance.
Relational Model
Example of tabular data in the relational model

Relational Keys
Each record in a table must be unique
A super key is a column, or a set of columns, that uniquely identifies a record in a table.
A minimal super key , with no proper subset that is also a super key, is called a candidate key.
A key consisting of more than one column is called a composite key.
A primary key is the candidate key that is selected by the database designer, to uniquely identify records within the table.
– the candidate keys not selected are called
alternate keys.
A foreign key is a column or set of columns within a table that is the candidate key of another table

Relational Integrity
A set of integrity rules ensure that the data is accurate.
Domain Integrity:Defines the domain constraint for each column that restrict the set of values allowed for each column

Entity Integrity:In a table, no column of primary key can be null or duplicate.

Foreign key and Referential Integrity:If a foreign key exists in a table its value must
-either match with candidate key value of some record in the home table
-or be wholly null

Database technology Part-2

THERE ARE MANY UPCOMING TECHNOLOGY DATABASE ABOUT ACCESS DATABASE
what is database
what is database system
what is database development will all be covered in this database presentation

web database technolgy is based on sql database and upcoming database are the fusion oracle database .
Smallest db is couchdb used in Iphone apps and in html5 .

Structured Query Language

It’s a relational database language
SQL commands are the means of communication with DBMS
SQL can be categorized as

DDL(Data Definition Language):Those SQL commands that
Operate on structure of database objects (table)?
Create,Alter,Drop.

DML(Data Manipulation Language): Those SQL commands
that operate on the data stored in the database objects.
Insert,Update,Delete,Select

DCL(Data Control Language): Those SQL commands that
Control the behavior of database objects
Commit,Rollback,Save point

Data types

Character data types
-CHAR(size):Stores fixed length character data.
Max size is 2000 bytes. Default & min size is 1 byte.

-VARCHAR2(size): Stores variable length character strings.
Max size is 4000 bytes, Min size is 1 byte. Must specify size.

-LONG:Columns defined as LONG can store variable-length
character data containing up to two gigabytes of information.

Number data types
-NUMBER(p,s): Stores numbers (fixed or floating point).

DATE: stores date & time. Standard format is
DD-MON-YY HH:MI:SS

Data types

LOB data types: Stores large blocks of unstructured
data (such as text, graphic images, video clips, and
sound waveforms) up to four gigabytes in size.
-BLOB: stores up to four gigabytes of binary data
-CLOB: stores up to four gigabytes of character data.
-BFILE:stores a file locator that points to an external file
containing the data.

RAW/LONG RAW:used to store binary data such as picture
image .
RAW max length 2000 bytes.
LONG RAW: 2gigabytes.

DML consist of-

Create
Alter
Drop

10g databaseaccess databasec# access databaseclient databaseconnecting databaseconnection databaseconvert access to sqlcopy technologydatabase advantagesdatabase codedatabase comparisondatabase conceptsdatabase connectdatabase engineeringdatabase fromdatabase indiadatabase installationdatabase introductiondatabase programsdatabase querydatabase replicationdatabase stored proceduresdatabase systemdatabase tablesdatabase technologiesdatabase technologydatabase withdatabases for dummiesdb databasedbms databasedelete databasedesigning databaseexample databasehow to databaseinstall databaselinux databasemicrosoft sqlmicrosoft sql servermicrosoft technologyms sql server databasemssql databasenew database technologiesperformance sqlperformance sql serverperformance sql server 2000performance tuning sql serverppt databaseselect databaseserver databasesql 2000sql databasesql database designsql generatorsql scriptssql serversql server 2000sql server 2000 tutorialsql server applicationssql server copy tablesql server database designsql server databasessql server dbasql server programmingsql server toolssql server tutorialssql technologysqlserver databasetable databasetechnology databasestrigger databaseusing databaseweb database applicationweb database technologies
long time thought to have post on database with ppt presentation and download mateial on postgresql open source database oracle database we have already shown sql oracle database exacmple with java database connectivity
We will also be going to cover database interview questions database management system some advance topics in my later post anime database pdf database these questions stored like pet society database kind. many are free database like mysql and new small db couchdb used in iphone and also in mozilla but you can easily create database like for movie database or using some software a database software
below a presentation for database access and database examples and you will like to know foxpro database which we have some slides.
YOu have worked on alter database archivelog navicat and a multimedia database

10g database
access database
c# access database
client database
connecting database
connection database
convert access to sql
copy technology
database advantages
database code
database comparison
database concepts
database connect
database engineering
database from
database india
database installation
database introduction
database programs
database query
database replication
database stored procedures
database system
database tables
database technologies
database technology
database with
databases for dummies
db database
dbms database
delete database
designing database
example database
how to database
install database
linux database
microsoft sql
microsoft sql server
microsoft technology
ms sql server database
mssql database
new database technologies
performance sql
performance sql server
performance sql server 2000
performance tuning sql server
ppt database
select database
server database
sql 2000
database
sql database
sql database design
sql generator
sql scripts
sql server
sql server 2000
sql server 2000 tutorial
sql server applications
sql server copy table
sql server database design
sql server databases
sql server dba
sql server programming
sql server tools
sql server tutorials
sql technology
sqlserver database
table database
technology databases
trigger database
using database
web database application
web database technologies