1 / 7

CS 111 – Nov. 17

CS 111 – Nov. 17. Enterprise databases Goals Examples Many-to-many relationship Restricting one’s view of entire database Design considerations Concurrency Commitment Homework #2 due Nov. 29. Goals. Retain and please customers Attention to detail Share data across company

lore
Download Presentation

CS 111 – Nov. 17

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. CS 111 – Nov. 17 • Enterprise databases • Goals • Examples • Many-to-many relationship • Restricting one’s view of entire database • Design considerations • Concurrency • Commitment • Homework #2 due Nov. 29

  2. Goals • Retain and please customers • Attention to detail • Share data across company • Allow employees to “view” the portion of the database relevant to them • Quick response to employee or customer query • Customers can interact with database via Web site • Also: allow concurrent access • Distributed database • Client capability at point of sale • Server capability at HQ • Don’t keep all data in one place: allow for physical partition or replication

  3. Examples • Luxury hotel • Goal: Personalized attention to detail • Store customer preferences for repeat visits • When cleaning room, take note of pillows used, newspapers, drink bottles and snack wrappers discarded • Log requests, compliments, complaints • On next visit, provide complimentary item as token of recognition • Garage • Take note of odometer reading • Do they only come in for oil change? Give birthday discount on other service

  4. Not 1 database • A large company probably needs more than 1 database, each with its own purpose • Inventory control (materials, parts, finished goods) • Sales (customers and orders) • Manufacturing (production schedule, which factory) • Accounting (corporate taxes, dividends, payroll) • Within a database, could have several tables: • Example: Customer, Orders, Order Details, Product • Many-to-many relationship

  5. Views • view = subset of a database • Details not relevant to you are hidden • When you access a database, it is for a particular function (data entry, lookup). Each function has its own view. • Some information is confidential • Ex. Customer order history • Contact info not needed • Ex. Item order history • Customer info, quantity of item on hand not needed • This is why many queries are not “select * …”

  6. Database design factors • Storage cost, Also the need for backups (reliability) • Processing cost: Do we have a powerful enough server? • Communication cost: Bandwidth and ISP server cost • Retrieval and processing: how long should it take to get a confirmation • Making all information available to everyone in company may be impractical. • Find out what info people need most often • Frequency of updates and queries • How often the store should send records to HQ

  7. Concurrency • Allowing several people to access database at same time • Example: • Suppose there’s 1 seat left on tomorrow’s flight 17. • Customers A and B simultaneously query availability for that flight. • A buys a ticket. • B’s screen still shows 1 seat available. B also buys a ticket. • Problem is that the purchase is not instantaneous, and 2 transactions can overlap. • Possible solution: record locking • Each seat on flight is a record in some table. • B cannot purchase seat, because A has already begun process of selecting and buying ticket.

More Related