Professional Documents
Culture Documents
The Bond Between Successful Business and Efficient Databases Is Behind A Door. Be Sure To Knock at Us!
The Bond Between Successful Business and Efficient Databases Is Behind A Door. Be Sure To Knock at Us!
• Interview with
Andrei Tudorean, PIM Copy Center manager
Phone: +40 232 261 851
Mobile phone: +40 788 332 831
Email: andrei@pimcopy.ro
placed by
ORDER
# date time
* copies no
REGULAR
receive
EMPLOYEE
# id received by
* first name handle PART OF
* last name TYPOGRAPHY assigned
ORDER
* address handled by # date time
of
(#1) contract no * quantity
(#2) ID card no
* birth date
* mobile phone
* home phone
* civil status
* studies
* prof_exp
* psycho_eval
* qualification
* availability
Structural Rules: Employees. Salaries.
Shifts
EMPLOYEE
# id
* first name
* last name
* address
(#1) contract no
(#2) ID card no
* birth date
* mobile phone SALARY
have
* home phone # date time
* civil status for * salary
* studies
* prof_exp
* psycho_eval SHIFT
work in
* qualification # date time
* availability for * number of hours
Structural Rules: Orders. Services.
Products
required by
PRODUCT SERVICE
# id require # id
* name * name
* price per unit ° range start
° range end
* price per unit
° description
on
ORDER
# date time list
* copies have SERVICES LIST
* count
REGULAR
of
TYPOGRAPHY
Structural Rules: Locations. Products.
Suppliers
PRODUCT
# id
LOCATION * name
# name * price per unit SUPPLIER
* address # id
* name
STOREHOUSE
listed on the provider of
COPY CENTER
for provided by
STOCK TRANSFER
have have
# date time
of of * quantity
° price
Structural Rules: Employees. Locations.
Transfers
EMPLOYEE
LOCATION # id
# name * first name TRANSFER
* address * last name order
# date time
* address * quantity
STOREHOUSE (#1) contract no ordered by
° price
(#2) ID card no
* birth date
* mobile phone
COPY CENTER supervised by * home phone
* civil status
responsible for * studies
assigned * prof_exp
* psycho_eval
work in * qualification
* availability
Structural Rules: Location.
Equipment
LOCATION
# name
* address
STOREHOUSE
EQUIPMENT
# id
COPY CENTER
COMPUTER
* processor
* monitor
* RAM
* HDD
° CD-R
° CD-RW on
° DVD-RW
list
PRINTER EQUIPMENT
on
* type LIST
° description list # date time
have
inside
COMPONENT COMPONENT
have
# id CHANGE
* name occur to # date time
* value
Procedural Rules
ASSUMPTION
• Now there is only one STOREHOUSE to keep track of.
We assume that in the future there may be more than
one STOREHOUSE.
CONSTRAINTS
• TRANSFERs in relationship with a SUPPLIER must
have the price attribute filled and must be in relationship
with one STOREHOUSE (through a STOCK instance).
• TRANSFERs not in relationship with a SUPLLIER
must not have the price filled and must be in relationship
with one COPY CENTER (through a STOCK instance).
Constraint
s
D
# id require # id
* name * name
* price per unit SUPPLIER CLIENT ° range start
# id # ID card no ° range end
* name * first name * price per unit
* last name ° description
listed on the provider of place
COMPONENT COMPONENT
have
# id CHANGE
* name occur to # date time
* value
Sample Mapping
EMPLOYEE (EPE) LOCATION (LCN)
key type optionality column name key type optionality column name
pk * id pk * name
* fname * address
* lname * LCN_type
* address fk, uk ° EPE_id
uk * contract_no
uk * IDcard_no PRODUCT (PDT)
* birthdate key type optionality column name
* mobilephone pk * id
* homephone * name
* civilstatus * price_per_unit
* studies
* profexp SERVICE (SVE)
* psychoeval key type optionality column name
* qualification pk * id
* availability * name
fk * LCN_name * priceperunit
° rngstart
° rngend
° description
fk ° PDT_id
Sample
Data
EMPLOYEE
id fname lname qualification availability LCN_name
3 Laura Jianu 1 2 HABITAT
5 Alexandru Codreanu 1 1 HABITAT
17 Ciprian Moraru 2 3 COPOU
62 Petru Olariu 3 2 COPOU
72 Irina Pintilie 1 1 HABITAT
LOCATION
id name address LCN_type EPE_id
0 STOREHOUSE b-dul Socola, nr. 13 storehouse NULL
1 COPOU sos Stefan cel Mare si Sfant, nr. 11 copy center 62
2 HABITAT b-dul Carol I, nr.4 copy center 5
3 INDEPENDENTEI b-dul Independentei, nr. 1 copy center 13
4 TUDOR str Ciurchi, nr. 80 copy center 21
PRODUCT SERVICE
id name price_per_unit id name rngstart rngend price_per_unit description PDT_id
13 A4 White Paper 250 3 A4 Printing (one side) 1 29 750 13
16 A4 Cardboard 3,000 4 A4 Printing (one side) 30 1499 300 13
19 A3 White Paper 500 19 Photo Editing (/minute) NULL NULL 10,000 NULL
25 CD 20,000 21 Binding NULL NULL 5,000 37
26 CD-RW 50,000 23 A4 T-Shirt Printing NULL NULL 100,000 49
The dotted lines skip attributes we did not consider very important.
Report: Schedule
Irina Pintilie
Schedule for the current week
12:00
16:00
20:00
0:00
4:00
The user needs to select an employee and the week to view (current or one of the past four).
Report:
Salaries
Salaries
September 1st – November 1st
Employees with qualification greater than 1.
Transfers
September 1st – November 1st
Location: HABITAT Product: A4 White Paper
Quantity
WED Nov 10, 2004 9 packs ordered
WED Nov 10, 2004 11 packs consumed
THU Nov 11, 2004 11 packs ordered
THU Nov 11, 2004 8 packs consumed
FRI Nov 12, 2004 14 packs ordered
FRI Nov 12, 2004 16 packs consumed
SAT Nov 13, 2004 16 packs ordered
SAT Nov 13, 2004 7 packs consumed
SUN Nov 14, 2004 3 packs ordered
SUN Nov 14, 2004 4 packs consumed
MON Nov 15, 2004 8 packs ordered
MON Nov 15, 2004 15 packs consumed
The user needs to select the location, the product and the time range.
The database stores quantity as pages and a pack of paper has 500 pages. We store the time
with data, but it’s not shown here, as we only show the totals for “ordered” and “consumed”.
Report:
Transfers
Transfers
September 1st – November 1st
Consumptions as chart.
Location: HABITAT Product: A4 White Paper
18
16
14
12
10
The user needs to select the location, the product and the time range.
Report:
Orders
Orders
Active orders.
front-end applications.
Motto: “Happiness comes of the Motto: “Our greatest glory consists not
capacity to feel deeply, to enjoy in never falling, but in rising
simply, to think freely, to risk life every time we fall.”
and be needed.” (Confucius)
(Storm Jamison)