Professional Documents
Culture Documents
Dbms Class
Dbms Class
Collection of interrelated data Set of programs to access the data DBMS contains information about a particular enterprise Database Applications:
Banking: all transactions Airlines: reservations, schedules Universities: registration, grades Sales: customers, products, purchases Manufacturing: production, inventory, orders, supply chain Human resources: employee records, salaries
What is a database? It is an organized collection of logically related data . Ex. the names, telephone numbers and addresses of all the people you know Metadata Metadata is defined as data about data. It describes the properties and context of user data.
Length 30 6
Min 6
Max 6
DBMS It is a collection of programs that enables user to create and maintain a database. In other words it is general-purpose software that provides the users with the processes of defining, constructing and manipulating the database for various applications.
Characteristics of DBMS
Represents complex relationship between data Controls data redundancy. Enforces user defined rules. Ensures data sharing. It has automatic and intelligent backup and recovery procedures. It has central dictionary to store information.
ACID Test
Atomicity Consistency Isolation Durability
Database Architecture
External View
User View 1 Customer city Customer Balance Customer name User view 2 Customer city
Customer name
CUSTOMER
Conceptual View
Customer ID: integer(4) Customer Name:String(20) Customer Street:String(40) Customer City:String(10) Customer Balance:integer(8)
CUSTOMER
Internal View
Customer ID: 4 decimal offset 0 unique Customer Name:String length 20 offset 4 Customer Street: String length 40 offset 4 Customer City: String length 10 offset 64 Customer Balance:8,2 dec offset 74
Advantages of DBMS
Control of data redundancy Data consistency Sharing of data Improved data integrity Improved maintenance through data independence.
Disadvantages of DBMS
Complexity Cost of DBMS Cost of conversion Performance Higher impact of a failure
Relational DBMS
Based on Relational Mathematics principles Data is represented in terms of rows and columns of a table Addresses all types of relations Easy to design No anomalies for insert/delete/update
Tuple
location
Chennai Pune Hyderabad
Relational Terminology
Tuple (Row) Attribute (Column) Relation (Table) Integrity Constraints
Primary Key Foreign Key
DDL
Create Alter Drop Truncate
DML
Insert Update Delete Select
DCL
Commit Rollback Save point Set transaction
Integrity Constraints
Primary key (PK) Foreign Key (FK) Unique key (UK) Not Null Check
What is an object?
Tangible Things Roles Incidents Interactions Specifications as a car, printer, ... as employee, boss, ... as flight, overflow, ... as contract, sale, ... as colour, shape,
And methods:
eat, hide, run, dig
Basic Terminology
Abstraction is the representation of the essential features of an object. These are encapsulated into an abstract data type. Encapsulation is the practice of including in an object everything it needs hidden from other objects. The internal state is usually not accessible by other objects.
RDBMS
Entity Data Independence RDBMS store only data. Primary Key Simple Data None