Beruflich Dokumente
Kultur Dokumente
DISADVANTAGES OF DBMS::
complex sw :
size :: storage capicity..Ram more (multi user environment)
expensive : as t s complex so it woud be expensive(sw + hw) ,
HW constraints & cost :
Cost Of Conversion :
performance: will be slow becauz of multiuser environment....
Failure / breakdown...e,g 11sep all data was losed therer was no backup.....
LEVELS OF DB ARCHITECTURE ::
1st there was two level architecture including schema & subschema ...
but now a 3 level architecture
external level : the users view of db, it includes that part ofdb which s relevant to
each user..
conceptual level : the community view of db, it includes all entities , their att &
relationships , constraints on data, semantic info abt data, security & interity info.
internal level : the physical rep of db on comp, it inculudes storage spce, record
description, record placement, data compressin, data encryption..
DB LANGUAGES ::
Data Definition language: DDL used to define the db schema (data types, str,
constraints) e,g SQL..
Data Manipulation language: DML s used to both read & update db(insert, updat,
del, retrieve) by data manipulation language (DML) r of two types
a . procedural lang : manipulate db record by record, allow users to state how t
oretrieve the data e,g c , C++ , java
b. non procedural lang : manipulates sets of records of db allow users to statewat
data s needed e,g SQL,QBE (query by examp)..
4GL : fourth generation language ::e,g SQL, QBE..
ENTITY :: s a distinct object (a person, place, thing , concept, event)
SEQUAL SERVER :: s a Ms sw whose name s SQL - SERVER
DB LANGUAGES ::
Data Definition language: DDL used to define the db schema (data types, str,
constraints) e,g SQL..
Data Manipulation language: DML s used to both read & update db(insert, updat,
del, retrieve) by data manipulation language (DML) r of two types
a . procedural lang : manipulate db record by record, allow users to state how t
oretrieve the data e,g c , C++ , java
b. non procedural lang : manipulates sets of records of db allow users to statewat
data s needed e,g SQL,QBE (query by examp)..
4GL : fourth generation language ::e,g SQL, QBE..
ENTITY :: s a distinct object (a person, place, thing , concept, event)
SEQUAL SERVER :: s a Ms sw whose name s SQL - SERVER ...
WHAT IS DATABASE TUTORIAL
DATA MODELS ::
an integrated collection of concept for describing data , relatinship b/w data &
constraints(conditions & rules regulation) n an organizations ...
Components of DM :
1. structural part :: rules & regulation which makes db
2.manipulation part ::define operation on data
3.integrity rules :: data validation
Types of DM ::
1. object Based DM : uses concepts such as entity, attr, relationships .....types r
entity relationship
semantic
functional
object oriented
2. record based DM : db consists of a num of fixed format records of possibly
different types
relational :: by table , name of column should be unique .. intersection of row &
column
s cell
hireracharal :: tree str , link list
network ::data s represented as a collection of records. it's a circular list, so we don;t
have to waste time in searching because nodes r connected...
3.physical DM :: index mechanism , os + dbms work, how data s stord on HD,
access
mechanism of data ....
RELATIONAL KEYS:
To access a record
1. Super Key: an att or set of att that uniquely identifies a tuple with in a
relation.combine
2. all att.
3. Candidate keys: an att or set of att that uniquely identifies individual
occurrences of
4. entity type. e,g stdid, nic, passport num..
5. Composite key: if there are no such candidate keys then we concatenate more
than one
6. attr & it makescomposite keys e,g st.name it’s f.name & it’s address combinely
can make a
7. composite
8. Primary key: a canditate keywhich is selected to define a record e,g in univ we
pronounce
9. a person by it’s st.id not by it’s passport num .it’s the key which the
organizatoin take as base.
10. ]Usually a pkey s designated as underline in writing. There would be no
null in primary key.
11. alternate key : all those cand keys which are except pkey.
12. Foreign key: an att or set of att within one relation that matches the
caadidate key of
13. some (possibly the same ) relation.It can have only two things one the
info to which it s
14. related & then null(zero) nothing else.
RELATIONAL INTEGRITY:
Rules that ensures that data is accurate.
1. Entity Integrity: no nll in pkey ( Null: no value in a key even not space. )
2. Referential Integrity J (of reference) if a foreign key exists in a relation,
3. either the foreign key value must match a candidate key value of some tuple in
it’s
4. home relation or the foreign key value must be wholly null.
5. Enterprise Constraints: enterprise =organisation ..additional rules specified
by the
6. users or db admin of a db
RELATIONAL INTEGRITY:
Rules that ensures that data is accurate.
1. Entity Integrity: no nll in pkey ( Null: no value in a key even not space. )
2. Referential Integrity J (of reference) if a foreign key exists in a relation,
3. either the foreign key value must match a candidate key value of some tuple in
it’s
4. home relation or the foreign key value must be wholly null.
5. Enterprise Constraints: enterprise =organisation ..additional rules specified
by the
6. users or db admin of a db.
RELATIONAL LANGUAGES:
RELATIONAL ALGEBRA:
It’s a theoratical langauge which wth operations work on one or more relations to
define another
relation without changing thte original relation...
FACILITIES: (operations) of relational algebra:
A view s the dynamic result of one or more relational operations operating on the
base
relations to produce another relation. A view is a virtual relation that doesn’t actually
exist n the db but is produced upon request by a particular user, at the time of
request.
Purpose of views:
1. Security
2. Customized access of data
3. Simplify complex operations on base relations.
Updating views:
1. Updates r allowed by query involving a single base relation & containing either
2. pkey or cand key of base relation.
3. no updates through views which involve multiple base relation.
4. no udate through views which involves aggregation or grouping operations.
ENTITY TYPE:
Entity s an instance of an entity type that s uniquely identifiable.
S an obj or concept having independent existance / that thing abt which org wana
record data…..existance is of two kinds:
Physical e,g students, teachers
Conceptual e,g sale, examination
TYPES OF ENTITIES:
Æ Weak Entities: whose existance depend on strong entity e,g subject
selected. Represented by double rect
Æ Strong Entities: who has it’s own existance e,g teacher. Represented by
single rect
ATTRIBUTES :
Property of an entity or a relation ship type. represented by oval.
e,g student has name , rno.
Types of attribute:
1. Simple att: an att composed of single component.. e,g sales , gender(either male
/
2. femal)
3. composite att: an att composed of multiple components.
4. single valued att: an att that holds single value for an entity e,g rno
5. multi valued att: an att that holds multiple value for an entity e,g a person has
two telephone #
6. derived att: an att that represents a value that s derivable from the value of a
related att or set of att , not necessarily in the same entity. e,g we can derive
age from DOB. So no need to put age because it can be derived any time. e,g
age
KEYS
all 6 keys . chap 3…
PARTICIPATING CONSTRAINTS:
Employee------------completes--------------courses----course ID
-
determies whether the existance of am entity depends upon it’s being related to
another enityt through relation
there could be two problems :
ambigous:……….. FAN trap
missing link: …………chams trap
FAN TRAP: Exist when a model represents a relationship b/w entity types , but
the pathway b/w certain entity accurreness is ambiguous(missing link or path
doesn't exist)...
CHASM TRAP:
NOTATION MEANING
Strong Entity Type
Weak Entity Type
Weak Relationship
Attribute
Primary Key Attribute
Multi Valued Attribute
Derived Attribute
Composite Attribute
Db Normalization
DATABASE NORMALIZATION TUTORIAL
Database Security