Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Database Design Victor Matos. 2 Phases of Database Design u Conceptual design begins with the collection of requirements and results needed from the.

Similar presentations


Presentation on theme: "1 Database Design Victor Matos. 2 Phases of Database Design u Conceptual design begins with the collection of requirements and results needed from the."— Presentation transcript:

1 1 Database Design Victor Matos

2 2 Phases of Database Design u Conceptual design begins with the collection of requirements and results needed from the database (ER Diag.) u Logical schema is a description of the structure of the database (Relational, Network, etc.) u Physical schema is a description of the implementation (programs, tables, dictionaries, catalogs

3 3 Models A data model is a collection of objects that can be used to represent a set of data and operations to manipulate the data u Conceptual models are tools for representing reality at a very high-level of abstraction u Logical models are data descriptions that can be processed by computers

4 4 Conceptual model: Entity-Relationship Diagrams  Entities represent classes of real-world objects. Person, Students, Projects, Courses are entities of a University database u Relationships represent interactions between two or more entities

5 5 Example: u Every employee works in at least one project u Every project has employees working on it.

6 6 Higher-Order Relationships A relationship may involve more than two entities

7 7 Recursive relationships Relationships could be mapped from one entity to itself

8 8 Attributes Attributes represent elementary properties of the entities or relationships. The stored data will be kept as values of the attributes

9 9 Generalizations An entity could be seen from many different viewpoints Each viewpoint defines a set of roles in a generalization Example below uses SEX to classify the object “Person”

10 10 Generalizations u A classification could be disjoint or overlapping u An entity could have more than one classification

11 11 Example: Department Store 1/2 u A department store operates in several cities u In a city there is one headquarter coordinating the local operations u A city may have several stores u Stores hold any amount of items u Customers place their orders for any number of items to a given store GOAL: Optimize shopping in each city

12 12 Example: Department Store 2/2

13 13 Example: University Database u Professors work for only one department u Departments have many professors u Each course is taught by only one professor u Students make a plan or program of study u A course could meet in several rooms/times u Graduate students must have an advisor u Cities are categorized as resident/BirthPlace u Visiting prof. need an End/Start date

14 14 University Database University database

15 15 Soccer Database u A team has players, one coach, fans u Teams play according to a schedule u Teams need to practice in a Stadium u Attendance and scores must be recorded

16 16 Soccer Database

17 17 Research Project Database u Some employees are researchers u Every project has a leader investigator u Every project must be funded by an agency u A project may include several topics u A topic could appear in several projects u Researchers must produce report(s) u Each employee must have a supervisor

18 18 Research Projects Database

19 19 Contract-Supplies System 1/3 u A company negotiates contracts with suppliers to provide certain amount of items at a fixed price u Orders are placed against any of the already negotiated contracts u A contract could provide items to any number of orders

20 20 Contract-Supplies System 2/3 u An order may include any number of items negotiated in the contract u Orders should not exceed the maximum amount of items quoted in the contract u All items in an order must be provided as part of a single contract and a single project

21 21 Contract-Supplies System 3/3

22 22 Manufacturing: Requisitions 1/3 u Projects are broken into tasks u Tasks are assigned to departments u A task is created for one project and assigned to one department u Requisitions are made for projects u Each requisition could ask for any number of items

23 23 Manufacturing: Requisitions 2/3 u Each requisition is for one project and is made to one supplier u Items could be: equipment or materials and are coded in a similar way u Suppliers send periodic price notices to advise the company of any changes in their prices

24 24 Manufacturing: Requisitions 3/3

25 25 Job-Shop Accounting System 1/4 u The system is used by a company that manufactures special-purpose assemblies for customers u To manufacture assemblies the company creates a sequence of processes (steps) u Each process is supervised by a department u Assume there are three type of processes: PAINT, FIT, CUT

26 26 Job-Shop Accounting System 2/4 u During manufacturing an assembly could pass through any sequence of processes, in any order; it may pass through the same process more than once u A unique Job# is given to any new assembly. u Costs and started-terminated dates must be recorded

27 27 Job-Shop Accounting System 3/4 u An accounting system is used to keep track expenditure for each: u DEPT, u PROCESS, u ASSEMBLY u As a job proceeds, cost transactions can be recorded against it.

28 28 Job-Shop Accounting System 4/4


Download ppt "1 Database Design Victor Matos. 2 Phases of Database Design u Conceptual design begins with the collection of requirements and results needed from the."

Similar presentations


Ads by Google