Lecture Three
Lecture Three
Logical/conceptual level
• Describes how data is stored
• Describes relationships between tables
• Database administration level
View of data
• High level
• Describes part of the database of a particular group of people
• There are many views- of DBMS e.g. tellers gets a views of customers
account and NOT payroll data
Instances and Schema
• SCHEMA
• The structure of the database
• The description of the database
• Not expected to change
• Types of Schema
• Physical schema:- design at physical level
• Logical schema:- design at logical level
Instance
• The actual content of a database at a particular point in time
• The raw data populates a database at a particular point in time
• Instances gives actual place in database in the database and Schema
gives us the structure of a database
• The are all actual values in the database
Data models
• Collection of tools for describing data
• Data
• Data relationships
• Data semantics
• Data constraints
• ENTITY
• Is something significance to the business about which data must be
known
• A name for things that you cant list e.g. objects, events, programs
• Entities have instances
attributes
• An entity has attribues which describes further
• A single valued property detail of an entity
• Is a specific piece of information that:
• Describes
• Quantifies
• Qualified
• Classifies and
• Specifies an entity
Attributes and relationships
• Attributes (volatile attributes and relationships)
VOLATILE ATTRIBUTES
• Unstable attributes eg age/year of birth, weather
• RELATIONSHIPS
• Represents something of significance to the business
• Expresses how attributes are related
• Exist between two entitites
• Have two directions/perspectives
• Are named at both ends
Relationship examples
• Employees have jobs
• Jobs are held by employees
• People make reservation tickets
• Ticket reservations are made by people
ER diagram seminar questions
• PROCEDURES TO FOLLOW TO GET AN ER DIAGRAM
• Identify entities , attributes and relationships
• Connect those entities (do actual drawing)
• Identify relationships (mandatory/optional)
• Identify cardinality (one-one,one-many,many-many)
NB
• Entities
• By nouns
• Attributes
• By nouns telling more about entities
• Relationships
• Identified by a verb, e.g. student takes course
• Private nursing home employs external consultants to treat their
patients. Each consultant is responsible for treating a specific patient,.
Each consultant is provided with two nurses everyday (individual
nurses change day after day) to assist him/her.