1 / 11

Database Fundamentals

Database Fundamentals. Why use a database?. Putting all data into a single file simply doesn’t work because- Redundancy Insertion/deletion/update problems when all data is in a single file Data integrity (data can’t be trusted) . Why must a database be “normalized?” .

apu
Download Presentation

Database Fundamentals

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 Fundamentals

  2. Why use a database? Putting all data into a single file simply doesn’t work because- • Redundancy • Insertion/deletion/update problems when all data is in a single file • Data integrity (data can’t be trusted)

  3. Why must a database be “normalized?” Normalization is just a fancy word for “putting the data into tables that make sense and will not cause errors.”

  4. What is a “data model” A data model is like an architectural blueprint for a database. It shows- • Table relationships • The numerical relationships between tables (called “cardinality”) • Table relationship rules (referential Integrity, cascading updates/deletes, etc.)

  5. Why Cardinality? Cardinality is the numerical relationship between tables. It is need to show how the occurrence of one record in a table relates to other tables.

  6. An Example of a 1 to Many relationship For example, a customer order may have many orders but a particular order can only refer to 1 customer. An order can only be associated with one customer but a particular customer can have many orders. This is shown as 1:M

  7. Crow’s Feet Notation 1:M A particular customer may have 0 or many orders in the orders table. A particular order can only be related to a one and only one customer.

  8. Microsoft Access 1 to Many

  9. Good News Most cardinalities (the numerical relationship between tables) in a database are- 1:M (one to many)

  10. Any more Cardinalities? The one to one cardinality (1:1) is rarely needed but it is sometimes used for the following reasons- • Security of specific data • Performance (speed of database access) • When only a few records will ever contain a value for a particular field (ex. Employees with stock options)

  11. How important is a data model? Very A poorly constructed data model will likely result in bad data and unintended actions occurring in the database.

More Related