Sunteți pe pagina 1din 11

DBMS CONCEPTS

TYPES OF DATA CONCEPTS


• LOGICAL DATA CONCEPTS:
– Logical data description refers to the manner in which
data is viewed by the programmer or the end user.
This is also called as Conceptual Model. In technical
terms it is called as entity-relationship model
• PHYSICAL DATA CONCEPTS:
– Physical data description refers to the manner in which
data is physically shared on the hardware(like hard
disk). Alternatively, it involves physical organisation of
the records of a file for the convenience of storage and
retrieval of data.
BASIC DATABAS TERMS
• FIELD/COLUMN: represents one related part of
a table and is the smallest logical structure of
storeage in a database. It holds only one pice of
information about an item or subject. Eg. CODE,
NAME, EMPNO,DESIGNATION
• RECORD/ROW/TUPLE: is a collection of
multiple related fields that can be treated as one
unit. Eg. Collect data of 20 students information
of each student represents a record
• TABLE: is a named collection of logically related
multiple records. Collection of all employee
records would be a table.
Data Types and Keys
• Data types are:
– Numeric
– Character
– Date
– Logical
• Keys are:
– Primary key
– Foreign Key
– Candidate Key
• Apart from the above keys some times an:
alternate key, composite key and secondary key
are also used
Entity-Relationship Model
• Consists of three basic objects:
– Entities
– Attributes
– Relationships
• Entity: An entity is an object that has its
existence in the real world. In includes all
those things about which data is collected.
An entity may be a tangible object such as
a student, place etc. Eg: customer, goods
• Attribute: are units that describe the
characteristics or properties of the entities.
In a database entities are represented as
tables and attributes by columns.
– Eg.

Entity Attribute
CUSTOMER CODE (Primary key)
NAME
ADDRESS
GOODS CODE(Primary key)
PRICE
E-R DIAGRAM

CODE NAME CODE PRICE


ADDRESS

CUSTOMER GOODS
• Relationship:
– Is an association , dependency or link between two or
more entities and its represented by a diamond
symbol.
– Eg: Customer buys goods is a relationship between
two entities : customer and goods.
– All relations have three components:
• Name - relationship name (goods bought)
• Degree - number of attributes associated with the relation

• Cardinality - number of records in a relation


CODE NAME CODE PRICE
ADDRESS

GOODS GOODS
CUSTOMER
BOUGHT

CODE : is defined as the Primary key


E-R TYPES
• ONE-TO-ONE Relationship (1:1)
Department Head 1
Department1
Department Head 2
Department2

• ONE-TO-MANY Relationship(1:M)

child1
Parent
child2

child3
• MANY-TO-MANY Relationship:
customer1
Television
customer2

customer3

customer4
DVD Player
customer5

customer6

S-ar putea să vă placă și