1 / 8

EMPOLYEE

EMPLOYEE ( empid , name) DEPARTMENT( depid , post, empid ). Database Schema (1:1 Relationship). Empid. depid. manages. EMPOLYEE. Department. 1. 1. name. post. Empid. depid. manages. EMPOLYEE. Department. 1. 1. name. EMPLOYEE( empid , name, depid ) DEPARTMENR( depid , post).

kelii
Download Presentation

EMPOLYEE

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. EMPLOYEE (empid, name) DEPARTMENT(depid, post, empid ) Database Schema (1:1 Relationship) Empid depid manages EMPOLYEE Department 1 1 name post

  2. Empid depid manages EMPOLYEE Department 1 1 name EMPLOYEE(empid, name, depid) DEPARTMENR(depid, post) post Database Schema (1:1 Relationship) or • NO new table is created. • FK can be added to either table.

  3. EMPLOYEE (empid, name, depid ) DEPARTMENT(depid, post,) Database Schema (M:1 Relationship) Empid depid Works in EMPOLYEE Department M 1 name post

  4. Empid depid Works in EMPOLYEE Department M 1 name post Database Schema (M:1 Relationship) EMPLOYEE (empid, name, depid ) DEPARTMENT(depid, post,) • FK should be added to “many” side. • Doesn’t matter for cardinalities.

  5. sid date evid admission Student event M N sname class schoolyear grade evname Database Schema (M:N Relationship) STUDENT (sid, sname, class, classno) EVENT (evid, evname, grade, gender) How about admission?

  6. sid date evid admission Student event M N sname class schoolyear grade evname Database Schema (M:N Relationship) STUDENT (sid, sname, class, classno) EVENT (evid, evname, grade, gender) • A new table is needed. • FK(s) should be placed in that new table. ADMISSION (sid, evid, date, schooyear)

  7. Ex. Transform the E-R diagram into database schema standard_cost vid unit_cost mid supply VENDOR RAW_MATERIAL M N M vendor_name manufacture pid product_desc N PRODUCT unit_price

  8. Standard_cost vid unit_cost mid supply VENDOR RAW_MATERIAL M N M vendor_name manufacture Pid VENDOR (vid, vendor_name) RAW_MATERIAL (mid, standard_code) PRODUCT (pid, product_desc, unit_price) SUPPLY (vid, mid, unit_cost) MANUFACTURE (pid, mid) product_desc PRODUCT N Unit_price

More Related