1 / 6

Database Management

Database Management. Week 2. An entity becomes a table. Tables follow these rules: Single value for each cell Each column has distinct name (attribute name) All values in the column are values of the same attribute The order of columns is irrelevant Each row is unique

todd-rosa
Télécharger la présentation

Database Management

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. Database Management Week 2

  2. An entity becomes a table • Tables follow these rules: • Single value for each cell • Each column has distinct name (attribute name) • All values in the column are values of the same attribute • The order of columns is irrelevant • Each row is unique • The order of rows is irrelevant

  3. Shorthand structure Rep (RepNum, LastName, FirstName, Street, City, State, Zip,…) Customer (CustomerNum, CustomerName, Street, City, State, Zip,…) Orders (OrderNum, OrderDate, CustomerNum) OrderLine (OrderNum, PartNum, NumOrdered, QuotedPrice) Part (PartNum, Description, OnHand, Class, Warehouse, Price) Qualifying the table names: Rep.RepNum, or OrderLine.OrderNum Primary Key The column or collection of columns that uniquely identifies a given row in the table.

  4. Why are there 2 primary keys for OrderLine? • No single column uniquely identifies a given row in the OrderLine table. It requires a combination of two columns: OrderNum and PartNum.

  5. On to QBE…

More Related