Difference between Logical Data Independence & Physical Data
Independence
Application program need not be changed if
new fields are added or deleted from the
database.
Logical Data Independence Physical Data Independence
It is concerned with the structure of the data orIt is concerned with storage of
the data.
changing the data definition.
It is very difficult as the retrieving of data areIt is easy to retrieve.
heavily dependent on logical structure of data.
Physical database is concerned with the
change of the storage device.
It is concerned with the conceptualschema. It is concerned with the internalschema.
11
Database Languages and Interfaces
•DDL
•DML
•DCL
•TCL
Adatabasemanagementsystem(DBMS)interfaceisauserinterfacewhich
allowsfortheabilitytoinputqueriestoadatabasewithoutusingthequery
languageitself.
1.Menu-BasedInterfacesforWebClientsorBrowsing
Theseinterfacespresenttheuserwithlistsofoptions(calledmenus)that
leadtheuserthroughtheformationofarequest.Basicadvantageofusing
menusisthattheyremovesthetensionofrememberingspecific
commandsandsyntaxofanyquerylanguage,ratherthanqueryis
basicallycomposedstepbystepbycollectingorpickingoptionsfroma
menuthatisbasicallyshownbythesystem.Pull-downmenusareavery
populartechniqueinWebbasedinterfaces.
2. Forms-Based Interfaces
1.Aforms-basedinterfacedisplaysaformtoeachuser.Userscanfillout
alloftheformentriestoinsertanewdata,ortheycanfilloutonly
certainentries,inwhichcasetheDBMSwillredeemsametypeofdata
forotherremainingentries.
2.Thistypeofformsareusuallydesignedorcreatedandprogrammed
fortheusersthathavenoexpertiseinoperatingsystem.ManyDBMSs
haveformsspecificationlanguageswhicharespeciallanguagesthat
help specify such forms.
3.Example:SQL*Formsisaform-basedlanguagethatspecifiesqueries
usingaformdesignedinconjunctionwiththerelationaldatabase
schema
•Data Definition Language (DDL) statements are used to define
the database structure or schema.
Commands:
1)CREATE -to create objects in the database
2)ALTER -alters the structure of the database
3)DROP -delete objects from the database
4)TRUNCATE -remove all records from a table, including all
spaces allocated for the records are removed
5)RENAME -rename an object
•DataManipulationLanguage(DML)statementsareusedfor
managingdatawithinschemaobjects.
Commands:
1)SELECT -retrieve data from the a database
2)INSERT -insert data into a table
3)UPDATE -updates existing data within a table
4)DELETE -deletes all records from a table, the space for the
records remain
5)MERGE -UPSERT operation (insert or update)
•Data Control Language (DCL) statements.
Commands:
1)GRANT -gives user's access privileges to database
2)REVOKE -withdraw access privileges given with the
GRANT command
•TransactionControl(TCL)statementsareusedtomanagethe
changesmadebyDMLstatements.Itallowsstatementstobe
groupedtogetherintologicaltransactions.
Commands:
1)COMMIT -save work done
2)SAVEPOINT -identify a point in a transaction to which you can later
roll back
3)ROLLBACK -restore database to original since the last COMMIT
Classification of Database Management Systems
Datamodel
•Relational
•Object
•Hierarchicalandnetwork(legacy)
Numberofusers
•Single-user
•Multiuser
Number of sites
•Centralized
•Distributed
•Homogeneous
•Heterogeneous
Cost
•Open source
•Different types of licensing
Types of access path options
General or special-purpose
Note:DBMSclassificationcriteria:
Datamodel,numberofusers,numberofsites,accesspathsandcost