Unit 1-1-FInal-1
Unit 1-1-FInal-1
D BMS-
I ntr oduction
● Sales:
● For customer, pr oduct, and pur chase infor mation.
● Accounting:
● For payments, r eceipts, account balances, assets and other accounting
infor mation.
● Human resources:
● For infor mation about employees, salar ies, payr oll taxes, and benefits,
and for gener ation of paychecks.
● Manufacturing:
● For management of the supply chain and for tr acking pr oduction of
items in factor ies, inventor ies of items in war ehouses and stor es, and
or der s for items.
●And so on
D atabase
U nit systems
1- 1 offer solutions to all the above
I ntr oduction
D ata Abstr action
D atabase
attr ibutes
(or columns)
tuples
(or r ows)
● The set of allowed values for each attr ibute is called the domain of the attr ibute
● Thus, the domain of the salar y attr ibute of the instr uctor r elation is the set of all
possible salar y values.
● The domain of the name attr ibute is the set of all possible instr uctor names.
● The domain of the I D attr ibute is the set of all possible I D i.e. fr om 1to 70.
● The special value null is a member of ever y domain. I ndicated that the value is
“unknown”
● The null value causes complications in the definition of many oper ations
Example:
● Each cour se in a univer sity may be offer ed multiple times, acr oss differ ent semester s,
or even within a semester.
● W e need a r elation to descr ibe each individual offer ing, or section, of the class. The
schema is
● section (cour se id, sec id, semester, year, building, r oom number , time slot id)
● L et K R
● K is a super key of R if values for K ar e sufficient to identify a unique
tuple of each possible r elation r(R )
● Example: {I D } and {I D ,name} ar e both super keys of instructor.
● Entity sets and r elationship sets can be expr essed unifor mly as r elation schemas
that r epr esent the contents of the database.
● A database which confor ms to an E- R diagr am can be r epr esented by a collection of
schemas.
● For each entity set and r elationship set ther e is a unique schema that is assigned the
name of the cor r esponding entity set or r elationship set.
● Each schema has a number of columns (gener ally cor r esponding to attr ibutes),
which have unique names.
● A str ong entity set r educes to a schema with the same attr ibutes
● A many- to- many r elationship set is r epr esented as a schema with attr ibutes for the
pr imar y keys of the two par ticipating entity sets, and any descr iptive attr ibutes of the
r elationship set.
● Example: schema for r elationship set advisor
■ Many- to- one and one- to- many r elationship sets that ar e total on the
many- side can be r epr esented by adding an extr a attr ibute to the “many”
side, containing the pr imar y key of the “one” side
■ Example: I nstead of cr eating a schema for r elationship set inst_dept, add
an attr ibute dept_name to the schema ar ising fr om entity set instr uctor
● For one- to- one r elationship sets, either side can be chosen to act as the “many” side
● That is, an extr a attr ibute can be added to either of the tables cor r esponding to
the two entity sets
● I f par ticipation is par tial on the “many” side, r eplacing a schema by an extr a
attr ibute in the schema cor r esponding to the “many” side could r esult in null values
● The schema cor r esponding to a r elationship set linking a weak entity set to its
identifying str ong entity set is r edundant.
● Example: The section schema alr eady contains the attr ibutes that would appear in
the sec_cour se schema
schema attributes
● D r awback:
person getting inforstreet,
I D , name, mation cityabout, an employee r equir es accessing two
student the one
r elations, I Dcor
, tot_cred
r esponding to the low- level schema and the one
cor employee
r esponding toItheD , salary
high- level schema
schema attributes
person I D , name, street, city
student I D , name, street, city, tot_cred
● D r awback:employee
name, str eetIand city may
D , name, street,be stor
city, ed r edundantly for people who
salary
ar e both students and employees
● A bottom- up design pr ocess – combine a number of entity sets that shar e the same
featur es into a higher - level entity set.
● Specialization and gener alization ar e simple inver sions of each other ; they ar e
r epr esented in an E- R diagr am in the same way.
● The ter ms specialization and gener alization ar e used inter changeably.
■ Consider the ter nar y r elationship pr oj_guide, which we saw ear lier
■ Suppose we want to r ecor d evaluations of a student by a guide on a
pr oject
● R elationship sets eval_for and pr oj_guide r epr esent over lapping infor mation
● Ever y eval_for r elationship cor r esponds to a pr oj_guide r elationship
● However, some pr oj_guide r elationships may not cor r espond to any eval_for
r elationships
● So we can’t discard the pr oj_guide relationship
● Eliminate this r edundancy via aggr egation
● Tr eat r elationship as an abstr act entity
● Allows r elationships between r elationships
● Abstr action of r elationship into new entity
● U se of phone as an entity allows extr a infor mation about phone number s (plus
multiple phone number s)
● Chen, I D E1F X, …
*Gener alization can use mer ged or separ ate ar r ows independent
of disjoint/ over lapping
U nit 1- 1 I ntr oduction
Object- B ased D ata Model
● </ teaches>
● </ instr uctor >
U nit 1- 1 I ntr oduction 104
Histor y of D atabase Systems
● 1980s:
● R esear ch r elational pr ototypes evolve into commer cial systems
● SQL becomes industr ial standar d
● P ar allel and distr ibuted database systems
● Object- or iented database systems
● 1990s:
● L ar ge decision suppor t and data- mining applications
● L ar ge multi- ter abyte data war ehouses
● Emer gence of W eb commer ce
● Early 2000s:
● XML and XQuer y standar ds
● Automated database administr ation
● L ater 2000s:
● GiantU nit 1- 1
data stor age systems
I ntr oduction
R efer ences