SlideShare a Scribd company logo
Basic Concepts of Database




                             1
Database definition
• In general, a database is anything that stores
  data
  – Example, a phone book which store name &
    phone number
• In computer, a database refers to
  – collection of organized data to be accessed,
    retrieved and used

                                                   2
Function of a database in general
• Allow anyone to:
  – store (add)
  – delete (remove)
  – organize
  – use
  – present data


                                     3
Example: data in Access database




                                   4
What is a DBMS?
• Database Management System is a software
  that store and manage database
• It allows to:
 •   create databases
 •   insert, update and delete data
 •   sort and query data
 •   create forms and reports

                                             5
Examples of DBMS
• Microsoft Access, MySQL, PostgreSQL, SQL Server,
 Oracle, dBASE, Clipper and FoxPro
• Examples of DBMS applications:
 Automated teller machine
 Computerized Library System
 Flight Reservation System
 Staff Information System
 Students System


                                                     6
DBMS Models
• DBMS Model describe:
  – rules and standards on how database organize data
  – defines how users view organization of data
• Common models include: (remember)
  – Hierarchical model
  – Network model
  – Object-oriented model
  – Relational model

                                                        7
Hierarchical Model
• organizes data in a tree structure
• all access to data starts at the top of the hierarchy
  and moves downward
  – for example, from customer to orders, vendor to
    purchases, etc
• there is a hierarchy of parent and child data
  segments
• support one to many relationship


                                                          8
Network Model
• Similar like hierarchical model but
   – permit more than one parent per child
   – thus permit the modeling of many-to-many relationships in data
• Organizes data using two fundamental constructs, called
  records and sets
• Records contain fields , sets define one-to-many
  relationships between records: one owner, many
  members
• Very flexible
• Not widely use

                                                                  9
Object Oriented Model
• based on a collection of objects
• an object contains:
   – values stored in instance variables within the object
   – bodies of code called methods that operate on the object
• for example, consider an object representing a bank account
   – The object contains instance variables number and balance.
   – The object contains a method pay-interest which adds interest to the balance.
   – Under most data models, changing the interest rate entails changing code in
     application programs.
   – In the object-oriented model, this only entails a change within the pay-
     interest method.
• Diverse structures
• Can execute complex analytical and data manipulation operations
  to search and transform multimedia and other complex objects
                                                                                     10
Relational Model
• Data is stored in two-dimensional tables (rows and
  columns)
• Widely used
• Example, Microsoft Access and MySQL




                                                       11
Data Hierarchy
Definition- systematic organization of data, often in a hierarchical
form

Database File   Database File: Physical file stored in a storage media.
                Example: StudentDB.accdb


    Table       Table: Contain information on a specific subject / topic.
                Example: Student, Courses

                Record: Contain information on single data item in a
   Record
                table. Example: information about a student. Also known
                as row in a table.

    Field       Field: Contain a specific piece of information within a
                record. Example: Student Name, Student IC. Also known
                as column in a table.                                       12
Example of an Access table



records




                        fields
                                       13
Relational database
• stores data in tables
• tables are organized into columns, and each
  column stores one type of data
• data for a single “instance” of a table is stored as a
  row




                                                       14
What is RDBMS?
• RDBMS is a DBMS which manages a relational
  database
  – Example, Microsoft Access and MySQL
• Data is structured in tables, records and fields
• Each table consists of rows (records)
• Each table row consists of one or more fields
  (columns)
• RDBMS store the data into collection of tables,
  which might be related by common fields
                                                     15
Advantages of RDBMS
• Minimum data redundancy
• Data consistency - less likelihood of incorrect or
  incomplete data being stored or used
• Integrated data – data is organized in logical
  relationship thus making it easy to relate data items
• Data sharing – allows users from different department
  to share data
• Data accessibility – allows users to access or retrieve
  in a flexible manner
• Uniform security, privacy and integrity control – db
  administrator can establish control for accessing,
  updating and protecting the data
                                                        16
Categories of RDBMS
• Personal database
 – Best in single-user environment (up to 10 users)
 – Example: Microsoft Access

• Client/Server database
 – Support multiple users in a network environment
 – Run in a server, client can request data from the server
   & query, update & report locally
 – Example: SQL Server

                                                              17
Master table
• Contains a primary key (must be unique as a
  password)
• Normally is a table that lists the properties of
  things that have some permanence and used
  many times in other tables
• Example customers, teachers, students and
  subjects offered


                                                     18
Transaction table
• Records some kind of interaction or event between
  master tables
• Transaction tables are typically used in posting
  operations or as lookup tables
• Example,
  – In Student Information System, the actual classes taken by
    students are transactions because they record specific
    interactions between students and teachers
  – In an eCommerce software the shopping cart tables are all
    transaction tables, they record the purchase of items by
    customers

                                                                 19
Primary Key
• Field, or fields, which by itself, or together
  uniquely identify each row in a table
• Used to match up records in different tables
• Usually indexed
• Help to define the relationships between tables




                                                    20
Primary Key
• Requirement: must be unique and cannot be
  empty or null
• Functions:
  •   Used to associate data from multiple tables
  •   Prevent duplicate record
  •   Control the order of records
  •   Faster to locate records
• Possible to have 2 or more fields as primary key in
  a table –this is called composite key
                                                    21
Foreign Key
• Same data field and type which is linked to a
  primary key in a corresponding table
• Example:
    – In SalesTransaction table below, CustomerID would be the
      Foreign Key field
    – The Foreign Key is used to look up the CustomerID in the
      Customer table where the CustomerID is the primary key

Customer table                            SalesTransaction table
CustomerID (PRIMARY KEY)                  SalesID
CustomerName                              SalesDate
                                          CustomerID (FOREIGN KEY)   22
Relationships
•   Relationships establishes the association between
    common fields in two tables
•   Common field links two tables to each other, thus
    ensuring connection between the data in the
    tables within the same database
•   REMEMBER: Access uses related tables - one table
    can find and use data in another table


                                                    23
What will we learn in this subject?
• Access objects – Table, Query, Form, Report,
  Macro
• Switchboard (is also a form)
• SQL




                                                 24

More Related Content

What's hot

Asp .net
Asp .netAsp .net
Asp .net
mellcv
 
Control panel by
Control panel byControl panel by
Control panel by
Noor Fatima
 
Tabla comparativa tipos de licencias de software
Tabla comparativa tipos de licencias de softwareTabla comparativa tipos de licencias de software
Tabla comparativa tipos de licencias de softwareLourdes Hernandez
 
Requerimientos Funcionales y No Funcionales
Requerimientos Funcionales y No FuncionalesRequerimientos Funcionales y No Funcionales
Requerimientos Funcionales y No Funcionales
ignagonzalez
 
BOSS OS
BOSS OSBOSS OS
Html5 for mobiles
Html5 for mobilesHtml5 for mobiles
Html5 for mobiles
Christian Glahn
 
Android presentation
Android presentationAndroid presentation
Android presentation
Elyes Naouar
 
Metodología Elicitacion de Requisitos
Metodología Elicitacion de RequisitosMetodología Elicitacion de Requisitos
Metodología Elicitacion de Requisitos
Rene Guaman-Quinche
 
World wide web An Introduction
World wide web An IntroductionWorld wide web An Introduction
World wide web An Introduction
Sidrah Noor
 
Creacion y terminacion de procesos
Creacion y terminacion de procesosCreacion y terminacion de procesos
Creacion y terminacion de procesosCariEli
 
Client side scripting and server side scripting
Client side scripting and server side scriptingClient side scripting and server side scripting
Client side scripting and server side scripting
baabtra.com - No. 1 supplier of quality freshers
 
Android application-component
Android application-componentAndroid application-component
Android application-component
Ly Haza
 
Software failure The knight's story
Software failure The knight's storySoftware failure The knight's story
Software failure The knight's story
Muhammad Saim
 
Firewall , Viruses and Antiviruses
Firewall , Viruses and AntivirusesFirewall , Viruses and Antiviruses
Firewall , Viruses and Antiviruses
Vikas Chandwani
 
Web Server - Internet Applications
Web Server - Internet ApplicationsWeb Server - Internet Applications
Web Server - Internet Applications
sandra sukarieh
 
Computer software
Computer softwareComputer software
Computer software
Dhruv Rajput
 
Ieee 830 srs
Ieee 830 srsIeee 830 srs
Ieee 830 srsLauC2457
 

What's hot (20)

Caracteristicas Microsoft SQL Server
Caracteristicas Microsoft SQL ServerCaracteristicas Microsoft SQL Server
Caracteristicas Microsoft SQL Server
 
Asp .net
Asp .netAsp .net
Asp .net
 
Control panel by
Control panel byControl panel by
Control panel by
 
Tabla comparativa tipos de licencias de software
Tabla comparativa tipos de licencias de softwareTabla comparativa tipos de licencias de software
Tabla comparativa tipos de licencias de software
 
Requerimientos Funcionales y No Funcionales
Requerimientos Funcionales y No FuncionalesRequerimientos Funcionales y No Funcionales
Requerimientos Funcionales y No Funcionales
 
BOSS OS
BOSS OSBOSS OS
BOSS OS
 
Html5 for mobiles
Html5 for mobilesHtml5 for mobiles
Html5 for mobiles
 
Android presentation
Android presentationAndroid presentation
Android presentation
 
Fedora
FedoraFedora
Fedora
 
Metodología Elicitacion de Requisitos
Metodología Elicitacion de RequisitosMetodología Elicitacion de Requisitos
Metodología Elicitacion de Requisitos
 
World wide web An Introduction
World wide web An IntroductionWorld wide web An Introduction
World wide web An Introduction
 
Creacion y terminacion de procesos
Creacion y terminacion de procesosCreacion y terminacion de procesos
Creacion y terminacion de procesos
 
Client side scripting and server side scripting
Client side scripting and server side scriptingClient side scripting and server side scripting
Client side scripting and server side scripting
 
Android application-component
Android application-componentAndroid application-component
Android application-component
 
Software failure The knight's story
Software failure The knight's storySoftware failure The knight's story
Software failure The knight's story
 
Firewall , Viruses and Antiviruses
Firewall , Viruses and AntivirusesFirewall , Viruses and Antiviruses
Firewall , Viruses and Antiviruses
 
Web Server - Internet Applications
Web Server - Internet ApplicationsWeb Server - Internet Applications
Web Server - Internet Applications
 
web server
web serverweb server
web server
 
Computer software
Computer softwareComputer software
Computer software
 
Ieee 830 srs
Ieee 830 srsIeee 830 srs
Ieee 830 srs
 

Viewers also liked

Introduction to database
Introduction to databaseIntroduction to database
Introduction to database
Pongsakorn U-chupala
 
Types of databases
Types of databasesTypes of databases
Types of databasesPAQUIAAIZEL
 
Basic DBMS ppt
Basic DBMS pptBasic DBMS ppt
Basic DBMS ppt
dangwalrajendra888
 
Database Design Slide 1
Database Design Slide 1Database Design Slide 1
Database Design Slide 1ahfiki
 
Fundamentals of Database ppt ch01
Fundamentals of Database ppt ch01Fundamentals of Database ppt ch01
Fundamentals of Database ppt ch01Jotham Gadot
 
Unit 1 basic concepts of DBMS
Unit 1 basic concepts of DBMSUnit 1 basic concepts of DBMS
Unit 1 basic concepts of DBMS
Roshan Rajbhandari
 
Rdbms
RdbmsRdbms
Rdbms
rdbms
 
Relational Database Management System
Relational Database Management SystemRelational Database Management System
Relational Database Management System
Free Open Source Software Technology Lab
 
Database management system presentation
Database management system presentationDatabase management system presentation
Database management system presentationsameerraaj
 
Indexes: The Second Pillar of Database Wisdom
Indexes: The Second Pillar of Database WisdomIndexes: The Second Pillar of Database Wisdom
Indexes: The Second Pillar of Database Wisdom
gisborne
 
Scaling RDBMS on AWS- ClustrixDB @AWS Meetup 20160711
Scaling RDBMS on AWS- ClustrixDB @AWS Meetup 20160711Scaling RDBMS on AWS- ClustrixDB @AWS Meetup 20160711
Scaling RDBMS on AWS- ClustrixDB @AWS Meetup 20160711
Dave Anselmi
 
RDBMS_Unit 01
RDBMS_Unit 01RDBMS_Unit 01
RDBMS_Unit 01
Prashanth Shivakumar
 
RDBMS
RDBMS RDBMS
RDBMS
RamSon Queen
 
Mba i-ifm-u-3 operating systems
Mba i-ifm-u-3 operating systemsMba i-ifm-u-3 operating systems
Mba i-ifm-u-3 operating systems
Rai University
 
Designing database week ix part 1
Designing database week ix part 1Designing database week ix part 1
Designing database week ix part 1Johnecis Madrid
 
Introduction to Database
Introduction to DatabaseIntroduction to Database
Introduction to Database
Siti Ismail
 
The relational database model chapter 2
The relational database model  chapter 2The relational database model  chapter 2
The relational database model chapter 2Nargis Ehsan
 
RDBMS.
RDBMS.RDBMS.
End user development
End user developmentEnd user development
End user developmentgavhays
 

Viewers also liked (20)

Introduction to database
Introduction to databaseIntroduction to database
Introduction to database
 
Dbms slides
Dbms slidesDbms slides
Dbms slides
 
Types of databases
Types of databasesTypes of databases
Types of databases
 
Basic DBMS ppt
Basic DBMS pptBasic DBMS ppt
Basic DBMS ppt
 
Database Design Slide 1
Database Design Slide 1Database Design Slide 1
Database Design Slide 1
 
Fundamentals of Database ppt ch01
Fundamentals of Database ppt ch01Fundamentals of Database ppt ch01
Fundamentals of Database ppt ch01
 
Unit 1 basic concepts of DBMS
Unit 1 basic concepts of DBMSUnit 1 basic concepts of DBMS
Unit 1 basic concepts of DBMS
 
Rdbms
RdbmsRdbms
Rdbms
 
Relational Database Management System
Relational Database Management SystemRelational Database Management System
Relational Database Management System
 
Database management system presentation
Database management system presentationDatabase management system presentation
Database management system presentation
 
Indexes: The Second Pillar of Database Wisdom
Indexes: The Second Pillar of Database WisdomIndexes: The Second Pillar of Database Wisdom
Indexes: The Second Pillar of Database Wisdom
 
Scaling RDBMS on AWS- ClustrixDB @AWS Meetup 20160711
Scaling RDBMS on AWS- ClustrixDB @AWS Meetup 20160711Scaling RDBMS on AWS- ClustrixDB @AWS Meetup 20160711
Scaling RDBMS on AWS- ClustrixDB @AWS Meetup 20160711
 
RDBMS_Unit 01
RDBMS_Unit 01RDBMS_Unit 01
RDBMS_Unit 01
 
RDBMS
RDBMS RDBMS
RDBMS
 
Mba i-ifm-u-3 operating systems
Mba i-ifm-u-3 operating systemsMba i-ifm-u-3 operating systems
Mba i-ifm-u-3 operating systems
 
Designing database week ix part 1
Designing database week ix part 1Designing database week ix part 1
Designing database week ix part 1
 
Introduction to Database
Introduction to DatabaseIntroduction to Database
Introduction to Database
 
The relational database model chapter 2
The relational database model  chapter 2The relational database model  chapter 2
The relational database model chapter 2
 
RDBMS.
RDBMS.RDBMS.
RDBMS.
 
End user development
End user developmentEnd user development
End user development
 

Similar to C1 basic concepts of database

Database Management Systems 1
Database Management Systems 1Database Management Systems 1
Database Management Systems 1
Nickkisha Farrell
 
lecture5 (1) (2).pptx
lecture5 (1) (2).pptxlecture5 (1) (2).pptx
lecture5 (1) (2).pptx
RabiullahNazari
 
Presentation DBMS (1)
Presentation DBMS (1)Presentation DBMS (1)
Presentation DBMS (1)
Ali Raza
 
ITE 101 - Week 7
ITE 101 - Week 7ITE 101 - Week 7
ITE 101 - Week 7
Frank Monaco
 
4- DB Ch6 18-3-2020.pptx
4- DB Ch6 18-3-2020.pptx4- DB Ch6 18-3-2020.pptx
4- DB Ch6 18-3-2020.pptx
Shoaibmirza18
 
Ch 2-introduction to dbms
Ch 2-introduction to dbmsCh 2-introduction to dbms
Ch 2-introduction to dbms
Rupali Rana
 
Overview of Data Base Systems Concepts and Architecture
Overview of Data Base Systems Concepts and ArchitectureOverview of Data Base Systems Concepts and Architecture
Overview of Data Base Systems Concepts and Architecture
Rubal Sagwal
 
Chapter 9 Data Design .pptxInformation Technology Project Management
Chapter 9 Data Design .pptxInformation Technology Project ManagementChapter 9 Data Design .pptxInformation Technology Project Management
Chapter 9 Data Design .pptxInformation Technology Project Management
AxmedMaxamuudYoonis
 
DATABASE MANAGEMENT SYSTEM
DATABASE MANAGEMENT SYSTEMDATABASE MANAGEMENT SYSTEM
DATABASE MANAGEMENT SYSTEM
Mahmud Hasan Tanvir
 
(Dbms) class 1 & 2 (Presentation)
(Dbms) class 1 & 2 (Presentation)(Dbms) class 1 & 2 (Presentation)
(Dbms) class 1 & 2 (Presentation)
Dr. Mazin Mohamed alkathiri
 
chapter09-120827115409-phpapp01.pdf
chapter09-120827115409-phpapp01.pdfchapter09-120827115409-phpapp01.pdf
chapter09-120827115409-phpapp01.pdf
AxmedMaxamuud6
 
dbms introduction.pptx
dbms introduction.pptxdbms introduction.pptx
dbms introduction.pptx
ATISHAYJAIN847270
 
Rdbms
RdbmsRdbms
CS101- Introduction to Computing- Lecture 37
CS101- Introduction to Computing- Lecture 37CS101- Introduction to Computing- Lecture 37
CS101- Introduction to Computing- Lecture 37
Bilal Ahmed
 
DBMS introduction
DBMS introductionDBMS introduction
DBMS introduction
BHARATH KUMAR
 
System Analysis And Design
System Analysis And DesignSystem Analysis And Design
System Analysis And Design
Lijo Stalin
 
Dbms
DbmsDbms

Similar to C1 basic concepts of database (20)

Database Management Systems 1
Database Management Systems 1Database Management Systems 1
Database Management Systems 1
 
Dbms intro
Dbms introDbms intro
Dbms intro
 
lecture5 (1) (2).pptx
lecture5 (1) (2).pptxlecture5 (1) (2).pptx
lecture5 (1) (2).pptx
 
Chapter 09
Chapter 09Chapter 09
Chapter 09
 
Presentation DBMS (1)
Presentation DBMS (1)Presentation DBMS (1)
Presentation DBMS (1)
 
ITE 101 - Week 7
ITE 101 - Week 7ITE 101 - Week 7
ITE 101 - Week 7
 
4- DB Ch6 18-3-2020.pptx
4- DB Ch6 18-3-2020.pptx4- DB Ch6 18-3-2020.pptx
4- DB Ch6 18-3-2020.pptx
 
Ch 2-introduction to dbms
Ch 2-introduction to dbmsCh 2-introduction to dbms
Ch 2-introduction to dbms
 
Overview of Data Base Systems Concepts and Architecture
Overview of Data Base Systems Concepts and ArchitectureOverview of Data Base Systems Concepts and Architecture
Overview of Data Base Systems Concepts and Architecture
 
Chapter 9 Data Design .pptxInformation Technology Project Management
Chapter 9 Data Design .pptxInformation Technology Project ManagementChapter 9 Data Design .pptxInformation Technology Project Management
Chapter 9 Data Design .pptxInformation Technology Project Management
 
DATABASE MANAGEMENT SYSTEM
DATABASE MANAGEMENT SYSTEMDATABASE MANAGEMENT SYSTEM
DATABASE MANAGEMENT SYSTEM
 
(Dbms) class 1 & 2 (Presentation)
(Dbms) class 1 & 2 (Presentation)(Dbms) class 1 & 2 (Presentation)
(Dbms) class 1 & 2 (Presentation)
 
chapter09-120827115409-phpapp01.pdf
chapter09-120827115409-phpapp01.pdfchapter09-120827115409-phpapp01.pdf
chapter09-120827115409-phpapp01.pdf
 
dbms introduction.pptx
dbms introduction.pptxdbms introduction.pptx
dbms introduction.pptx
 
Rdbms
RdbmsRdbms
Rdbms
 
CS101- Introduction to Computing- Lecture 37
CS101- Introduction to Computing- Lecture 37CS101- Introduction to Computing- Lecture 37
CS101- Introduction to Computing- Lecture 37
 
Case mis ch05
Case mis ch05Case mis ch05
Case mis ch05
 
DBMS introduction
DBMS introductionDBMS introduction
DBMS introduction
 
System Analysis And Design
System Analysis And DesignSystem Analysis And Design
System Analysis And Design
 
Dbms
DbmsDbms
Dbms
 

C1 basic concepts of database

  • 1. Basic Concepts of Database 1
  • 2. Database definition • In general, a database is anything that stores data – Example, a phone book which store name & phone number • In computer, a database refers to – collection of organized data to be accessed, retrieved and used 2
  • 3. Function of a database in general • Allow anyone to: – store (add) – delete (remove) – organize – use – present data 3
  • 4. Example: data in Access database 4
  • 5. What is a DBMS? • Database Management System is a software that store and manage database • It allows to: • create databases • insert, update and delete data • sort and query data • create forms and reports 5
  • 6. Examples of DBMS • Microsoft Access, MySQL, PostgreSQL, SQL Server, Oracle, dBASE, Clipper and FoxPro • Examples of DBMS applications: Automated teller machine Computerized Library System Flight Reservation System Staff Information System Students System 6
  • 7. DBMS Models • DBMS Model describe: – rules and standards on how database organize data – defines how users view organization of data • Common models include: (remember) – Hierarchical model – Network model – Object-oriented model – Relational model 7
  • 8. Hierarchical Model • organizes data in a tree structure • all access to data starts at the top of the hierarchy and moves downward – for example, from customer to orders, vendor to purchases, etc • there is a hierarchy of parent and child data segments • support one to many relationship 8
  • 9. Network Model • Similar like hierarchical model but – permit more than one parent per child – thus permit the modeling of many-to-many relationships in data • Organizes data using two fundamental constructs, called records and sets • Records contain fields , sets define one-to-many relationships between records: one owner, many members • Very flexible • Not widely use 9
  • 10. Object Oriented Model • based on a collection of objects • an object contains: – values stored in instance variables within the object – bodies of code called methods that operate on the object • for example, consider an object representing a bank account – The object contains instance variables number and balance. – The object contains a method pay-interest which adds interest to the balance. – Under most data models, changing the interest rate entails changing code in application programs. – In the object-oriented model, this only entails a change within the pay- interest method. • Diverse structures • Can execute complex analytical and data manipulation operations to search and transform multimedia and other complex objects 10
  • 11. Relational Model • Data is stored in two-dimensional tables (rows and columns) • Widely used • Example, Microsoft Access and MySQL 11
  • 12. Data Hierarchy Definition- systematic organization of data, often in a hierarchical form Database File Database File: Physical file stored in a storage media. Example: StudentDB.accdb Table Table: Contain information on a specific subject / topic. Example: Student, Courses Record: Contain information on single data item in a Record table. Example: information about a student. Also known as row in a table. Field Field: Contain a specific piece of information within a record. Example: Student Name, Student IC. Also known as column in a table. 12
  • 13. Example of an Access table records fields 13
  • 14. Relational database • stores data in tables • tables are organized into columns, and each column stores one type of data • data for a single “instance” of a table is stored as a row 14
  • 15. What is RDBMS? • RDBMS is a DBMS which manages a relational database – Example, Microsoft Access and MySQL • Data is structured in tables, records and fields • Each table consists of rows (records) • Each table row consists of one or more fields (columns) • RDBMS store the data into collection of tables, which might be related by common fields 15
  • 16. Advantages of RDBMS • Minimum data redundancy • Data consistency - less likelihood of incorrect or incomplete data being stored or used • Integrated data – data is organized in logical relationship thus making it easy to relate data items • Data sharing – allows users from different department to share data • Data accessibility – allows users to access or retrieve in a flexible manner • Uniform security, privacy and integrity control – db administrator can establish control for accessing, updating and protecting the data 16
  • 17. Categories of RDBMS • Personal database – Best in single-user environment (up to 10 users) – Example: Microsoft Access • Client/Server database – Support multiple users in a network environment – Run in a server, client can request data from the server & query, update & report locally – Example: SQL Server 17
  • 18. Master table • Contains a primary key (must be unique as a password) • Normally is a table that lists the properties of things that have some permanence and used many times in other tables • Example customers, teachers, students and subjects offered 18
  • 19. Transaction table • Records some kind of interaction or event between master tables • Transaction tables are typically used in posting operations or as lookup tables • Example, – In Student Information System, the actual classes taken by students are transactions because they record specific interactions between students and teachers – In an eCommerce software the shopping cart tables are all transaction tables, they record the purchase of items by customers 19
  • 20. Primary Key • Field, or fields, which by itself, or together uniquely identify each row in a table • Used to match up records in different tables • Usually indexed • Help to define the relationships between tables 20
  • 21. Primary Key • Requirement: must be unique and cannot be empty or null • Functions: • Used to associate data from multiple tables • Prevent duplicate record • Control the order of records • Faster to locate records • Possible to have 2 or more fields as primary key in a table –this is called composite key 21
  • 22. Foreign Key • Same data field and type which is linked to a primary key in a corresponding table • Example: – In SalesTransaction table below, CustomerID would be the Foreign Key field – The Foreign Key is used to look up the CustomerID in the Customer table where the CustomerID is the primary key Customer table SalesTransaction table CustomerID (PRIMARY KEY) SalesID CustomerName SalesDate CustomerID (FOREIGN KEY) 22
  • 23. Relationships • Relationships establishes the association between common fields in two tables • Common field links two tables to each other, thus ensuring connection between the data in the tables within the same database • REMEMBER: Access uses related tables - one table can find and use data in another table 23
  • 24. What will we learn in this subject? • Access objects – Table, Query, Form, Report, Macro • Switchboard (is also a form) • SQL 24

Editor's Notes

  1. U can insert an email. Collection of data. ex.:
  2. Not all people. Present data, ex. cgpa
  3. DBMS; ex, atm
  4. Example:An organization had records of employees in a table (entity type) called "Employees". In the table there would be attributes/columns such as First Name, Last Name, Job Name and Wage. The company also has data about the employee’s children in a separate table called "Children" with attributes such as First Name, Last Name, and date of birth. The Employee table represents a parent segment and the Children table represents a Child segment. These two segments form a hierarchy where an employee may have many children, but each child may only have one parent.
  5. A record may be an owner in any number of sets, and a member in any number of setsBranches can be connected to multiple nodesThe network model is able to represent redundancy in data more efficiently than in the hierarchical model