Skip to content · ⁨דלג לתוכן⁩

Tables, keys and relationships · ⁨טבלאות, מפתחות ויחסים⁩

English

More than one table

Real databases split data across several tables. This lesson uses a small shop with two of them:

  • customer — one row per customer (id, name, city)
  • orders — one row per order (id, customer_id, order_date, total)

Storing the customer's name on every order would repeat it again and again. Keeping customers in their own table stores each one once.

עברית

יותר מטבלה אחת

מאגרי נתונים אמיתיים מפצלים נתונים בין מספר טבלאות. שיעור זה משתמש בחנות קטנה עם שתי מהן:

  • customer — שורה אחת לכל לקוח (id, name, city)
  • orders — שורה אחת לכל הזמנה (id, customer_id, order_date, total)

אחסון שם הלקוח בכל הזמנות יחזיר אותו שוב ושוב. שמירת לקוחות בטבלה משלהם מאפשרת לאחסן כל אחד בפעם אחת בלבד.

Handout · ⁨חומר עזר⁩

Log in or create account · ⁨היכנס או צור חשבון⁩

IGCSE, A-Level & AP