Null 17
Null 17
Data – row facts about any object (property value) • Data Definition Language (DDL). • Attributes are properties of given entity
• Storage Definition Language (SDL). which used to describe each entity.
Information – processed data • View Definition Language (VDL). • Key attributes must be unique for each
• Data Manipulation Language (DML). entity
What is a Database System? • Keys are used to identify particular entities
DDL
• A Database is Attribute types
Use to define and change database schemas create
Collection of stored coherent data that represent a
table, query, form in data definition language. • Normal attribute
part of the real world (mini world)
• Multi valued attributes
Mainly create alter and drop SQL command used • Derived attributes
Mini world is user depending
under the DDL. • Composite attributes
• A Database system is
DML Relationships
Any SW that facilitate the construction &
manipulation of DB This language is used to insert, edit and delete Relationships indicate a meaningful connection
records is database. As well as it is use to filter the between two entity types
Data Model & DB Schema record in database.
• Relationships diamond
A data model is a collection of concepts for EX: SQL, MYSQL
describing data in a DB, including • Identifying relationship double diamond
• Total participation program which allows to process and manipulate • Redundancy Control
• Partial participation data in a easy and logical manner using a graphical • concurrency
interface. • Better security
Cardinality Ratios • Enforcing integrity
Data Manager reads and writes delaminated files • Recovery facility
• Cardinality ratios specify the maximum such • multiple user views
number of relationship instances that an • Self representation of data
entity may participate in File Manager • Access Control
Redundancy Control
Design Decision A file manager or file browser is a computer
program that provides a user interface to work with
A DBMS can assist in controlling redundancy
• Composite and multi value attribute file systems.
• Attribute or Entity Concurrency
• Attribute link to entity or relationship Disk Manager
• Binary or ternary relationships A DBMS supports access by concurrent users
• It is sometimes convenient to name an Disk manager is a simple file system configuration
entity’s role in a relationship. that allows to: Enforce integrity
• Generalization hierarchy
• Automatically detect new partitions at A DBMS supports representation of complex
Regular Entities startup. relationships and integrity constraints
• Fully manage configuration of file system
• Regular entity types become relations Levels of Abstraction
Entity Types
– include all simple attributes • External/Views
– include only components of compound Entity types are similar to classes, • Conceptual schema
attributes • Physical schema
– keys become primary keys
Entity describe potential objects that will appear in
– if multiple keys select a primary key Data Independence
the database
• Multivalued attributes must become new • If a relation has more than one minimal super Use to define and change database schemas create
relations key, each key is called a candidate key table, query, form in data definition language.
– FK to associated entity type • One candidate key must be chosen to be the
– PK is whole relation primary key Mainly create alter and drop SQL command used
under the DDL.
Binary 1:1 Relationships Foreign Key
DML
• Chose one of the related entity types to hold • Sometimes the information stored in a
the relationship relation is linked to the information stored in This language is used to insert, edit and delete
another relation. records is database. As well as it is use to filter the
– add primary key of other entity as foreign • This linking process done through some key. record in database.
key to other relation It is called as foreign key.
The Buffer Manager
Binary 1:N Relationships Entity Integrity Constraint
Buffer management is done for the efficient data
• 1:N Relationships become foreign key at N • The entity integrity constraint states that handling in database very large.
side primary keys can't be null.
• A proper value in the primary key field
If database is large than the main memory. Main
– any relationship attributes also go to N memory can’t Access database at same time.
side Referential Integrity
Three Schema Architecture
Binary M:N Relationships • It set between two tables (maintain the
consistency among rows)
The way of design database as three independent
• M:N Relationships must become a new layers call as three schema architecture.
relation The Relational Algebra
• External layers
contains PKs of both related entities • The relational algebra defines mathematical
– • Conceptual layers
– combined PKs become PK for new operations on relations
• Physical layers
relations • These operations define the meaning of SQL
queries
• Query optimization
Relation Schemas