Loading presentation...

Present Remotely

Send the link below via email or IM

Copy

Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.

DeleteCancel

Database for Product

No description
by

Cs T

on 5 December 2017

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Database for Product

add logo here
Specification
I wanted to make a databes for a company!
I store evry important data for exemple
Employee
Customer, and suplier company
Workingflow
Product
Factory and office
ER Diagram
Some SQL Query
Thanks your attention

Database for Product
Tusa Csaba (BN12FG)

Create Table Example
CREATE TABLE product(
P_type VARCHAR2(30) PRIMARY KEY,
quantity VARCHAR2(120),
whereismade VARCHAR2(120) NOT NULL,
price INT,
FOREIGN KEY(whereismade) REFERENCES factory(address)
)

Relation Model
Employee{SSN; Tax_Number; Benefits; Address; Name; Salary; E.Manager}
Work_Team{ Workflow_Name; Cost; Responsible; Worker; Time}
Factory{Address; Maximal_Capacity; Actual_Capacity; Local_taxes}
Product{Type; Quantity; Time; Raw_Material; Price; Material_Costs; Where_is_Made}
Private_Person{Tax_Number; Name; Contact; Discount; Billing_Address; Discount_Card }
Company{ Tax_Number; C_ID; Exclusive; Partnership_from; Contact; Discount; Billing_Address; Name}

Find that who work to Goodboss Max, and give them email.
SELECT e.E_name, m.email
FROM employee e, E_email m
WHERE e.SSN IN (SELECT em.E_manager
FROM employee es, employee em
WHERE em.SSN = es.E_manager
AND em.E_name='Goodboss Max'
)
AND m.SSN = e.SSN;

That’s workflow, where aren’t work Tricking Alexander and they cheap 2000.
SELECT workflow_name
FROM work-team w
WHERE w.W_cost<2000
AND w.workflow_name NOT IN (SELECT workflow_name
FROM employee e, what_to_do wd , work_team wo
WHERE e.SSN = wd.SSN
AND wo.workflow_name=wd.workflow_name
AND e.E_name = 'Tricking Alexander'
);

ALTER TABLE factory
ADD buildingcolor VARCHAR2 (30) DEFAULT 'red';
ALTER TABLE factory
MODIFY buildingcolor VARCHAR2(50);
Full transcript