Thursday, April 30, 2020

What is database schema & database independence? explain in details with diagram


                                                                  Database Schema & Data Independence

       Database Schema: - A database schema is the skeleton structure that represents the logical view of the entire database. It defines how the data is organized and how relation among them are associated. It formulates all the constrains that are to be applied on the data.
              A database schema defines its entities and the relationship among them. It contains descriptive details of the database which can be described by means of schema diagram. A database schema can be divided into two categories.
                                                      I.               Physical database schema: - this schema contain to the actual storage of data and its form of storage like files, indices etc. It defines how the data will be stored in a secondary storage.
                                                   II.               Logical database schema: - this schema defines all the logical constrains that need to be applied on the data stored. It defines tables, views and integrality constrains.

        Data Independence: - Data Independence can be explained using    3three schema architecture. Data independence refers characteristic of being able to modified schema at one level of the database without altering the schema at next higher level.
                    There are two types of data independence.
                                                                                                 I.               Logical data independence: - It refers characteristic being able to change conceptual schema without having to change the external schema. Logical data independence is used to separate the external level from conceptual view. Logical data independence occurs at user inference level.
                                                        II.        Physical data independence: - Physical data independence can be defined as capacity to change internal schema without having to change conceptual schema. Physical data independence used to separate conceptual level from internal level. Physical data independence occurs at the logical interference level. 

Wednesday, April 29, 2020

what is an-entity & it's type? explain with proper Diagram In DBMS.


                                 Entity set & it's types

1.What is entity?
Ans/- An entity can be a real word object either animated or inanimate that can be easily identifiable.

Entity set: - An entity set is a group of similar kind of entities. It may contain entities with attributes sharing similar values. Entities are represents by their properties which also called attributes.
Type of entity: -
Weak entity: - A weak entity is a type of entity which doesn’t have its key attribute. It can be identified uniquely by considering by consisting primary key of another entity. It represented by double rectangular box. Weak relation represent by double diamond box. 






 

Strong entity: - A strong entity is a type of entity which has its key attribute for that strong entity said need not to have participation.


Difference between strong and weak entity: -
             Strong entity
              Weak entity
1. Strong entity set always has a primary key.

1. It doesn’t have enough attributes to build a primary key.
2. It is represented by a rectangular symbol.
2. It is represented by double rectangular symbol.
3. Member of a strong entity set is called as dominate entity set.
3. Member of a weak entity set is called as a subordinate entity set.
4. In the ER diagram the relationship between two strong entities set shown by a diamond symbol.
4. The relationship between one strong and weak entity set shown by double diamond symbol.

To know about Cardinality & its type in details visit my blog site



Tuesday, April 28, 2020

Relation model concept and it's advantage & disadvantage

    Relation model concept and it's advantage & disadvantage

    1.         What is relational model?
  Ø Relation model represent database as a collection of relations. A relation is nothing but a table of values. Every row in the table represents a collection of related data values. This row in the table denotes a real world entity or relationship.

     Relational model concept: -
  ·     Attribute: - Each column in a table, Attributes is the properties which define a relation. Example: - DNO, DNAME.

  ·     Table: - In the relational model relations are saved in the table format. A table has two properties rows, column. Rows represent records and column represents attributes.


  ·     Degree: - The total number of attribute which in the relation which called the degree of relation.

  ·     Cardinality: - Total number of rows present in the table.

    Attribute domain: - Every attribute has some predefined values and scope which is known as attribute domain.

     Advantage of relational model: -
    1)       Simplicity: - A relational data model is simpler than hierarchical model and network model.

    2) Easy to use: - The relational model is easy as table consisting of rows and column is quite natural and easy to understand.

    3)       Data independence: - the structure of a database can be changed without having to change any application.

    4)   Query capability: - It make possible for a high level query language like SQL to avoid complex data navigation.

      Disadvantage of using relational model: -
   ·     Few relational databases have limits on field length which cannot be exceeded
   ·     Relational databases can sometime become complex as the amount of data grows and the relation between pieces of data become more complicated.     

     ·     Complex relational database may lead isolated databases where information cannot be shared from one system to another.
  

Friday, April 24, 2020

Explain Database model & it's types in DBMS with diagarm


                            Database models & it's definition 



 Database model: - Database model defines the logical design and structure of database and defines how data will be stored and updated in a database management. Data Models are fundamental entities to introduce abstraction in a DBMS.
1) Hierarchical Model: - This database model organizes data into a tree like structure with a single root to which all the other data is linked. The hierarchy starts from root data and expands like tree, adding child nodes to the parent nodes. In this model a child node will only have a single parent node. This model efficiently describes many real world relationship like index of a book, recipes. In hierarchical model, data is organized into tree like structure with one, one to many relationship between two different types of data.


 2)  Network Model: - This is an extension of the hierarchical model. In this model data is organized more like a graph and are allowed to have more than one parent node. In this database model data is more related as more relationship established in this model. As the data is related, hence accessing the data is also easier and fast. This database model was used to map many to many data relationship.



 3) Entity relationship model (ER model): - In this model relationship are created by dividing objects of interest into entity and its characteristic into attributes. ER model are define to represent the relationship into pictorial form to make it easier for different situation to understand. This model is good to design a database which can be turn into tables in relational mode.


         I.        4) Relational model: - In this model, data is organized into two dimensional tables and relationship is maintain by storing a common filed. Basic structure of data in the relational model is tables. All the information related to a particular type is stored in rows of that table.




Thursday, April 23, 2020

What is DBMS languages & its commands?


      

                                               DBMS languages





Database languages are used to read, update and store data in database. These database  languages that can be used for this purpose one of them SQL. There are Five  types of database languages
Types Database languages are
DDL :-   Data Definition Language

DML :-  Data Manipulation Language
DCL :-   Data Control Language
SQL :-   Structure Querying Language

TCL  :-   Transaction Control Language

         I.        1)DDL(Data Definition Language):-  Data Definition Language used for  specifying the data base ‘schema’. It is used for creating tables, schemas etc. in database.
            Commands of Data Definition Language(DDL) are given below

             CREATE: - to create database instances.
             DROP: - to drop database instances.
             COMMENT: - to comment.
          ALTER: -to alter structure of database

         2)DML(Data Manipulation Language): - Data Manipulation Language used for            accessing and manipulating data in database. 
          Commands of  Data Manipulation Language (DML) are

             INSERT: - to insert record(s) into the table.
             UPDATE: - to update data into table.
             DELETE: - to delete record(s) into the table.
            SELECT: -to read/retrieved record(s) from table.

   III.            3)DCL( Data Control Language): -  Data Control Language used for granting              and revoking user access on a database. 
                    Commands of  Data  Control Language(DCL) are given below

            GRANT: - to grant access to user.
           REVOKE: - to revoke access to user.

   4)TCL( Transaction Control Language): -  Transaction Control Languages are used to changes in the database that we made by using DML commands either performance or role backed by using TCL.  
Commands of  Transaction Control Language(TCL) are given below


             COMMIT: - to persist the changes made by DML command in database.
             ROLL BACK: - to roll back the changes made to the database.

Monday, April 20, 2020

What is file system and advantage of DBMS over file system


  Definition of File system  &  it's advantage of DBMS over file system

What is file system?
Ans/- A file system is a database system that allows us access to single file at a time. In a file system data is directly stored in set of file. It contains flat file that have no relation to other file.

Advantage of DBMS over file system:-
      1)      Data redundancy: - Data redundancy refers to the duplication of data that means each data may have a single copy. A file system can’t control redundancy of data. In DBMS data redundancy removed by using of data normalization.

       2)  Data inconsistency: - Data redundancy leads to data inconsistency. In DBMS data redundancy is taken care by data normalization and data in consistency also been taken care of as part of it.

       3)    Data isolation: - In file system data stored are in various file and files may be different formats. So it is very difficult to retrieved appropriate data. But DBMS data stored in single file so retrieved appropriate data more easy.

        4)    Atomicity issue: - Atomicity of an instruction refers to all or nothing which means either all operation in a transaction executes or none. It is difficult to achieve atomicity in file system not in DBMS.

         5)   Data dependency: - In file system changing in data is depended on application program but DBMS changing in data independent.

         6) Easy recovery: - Since database system keeps the backup of data. It is easier to do a full recovery of data in case of a failure.

         7) Flexible: - Database system is more flexible than file processing system

Sunday, April 19, 2020

Explains the client server architecture /three tier architecture of DBMS in details


Client server architecture (explains the client server architecture of DBMS/explains three tier architecture of DBMS): -

    
Client server architecture is an architectural deployment style that describes separation of functionality into layers with each segment being tier that can be located on a physically separate computer. A client server architecture separate its tier from each other based on the complexity of user and how they used the data present in the database. It is the most widely used architecture to design a DBMS.



A.      Database tier: - At this tier database resides along with its query processing languages. We also have the relation that define the data and their constrains at this level.
     B.    Application (middle) tier: - At this tier reside the application server and program that access database. For a user this application tier presents and abstracted view of database. Hence application tier/layer sits in the middle and acts as mediator between the end user and database.
      C.    Presentations (user) tier: - End users operate on this tier and they know nothing about any existence of database beyond this layer. At this layer multiple views of the database can be provided by application. All views are generated by application that resides in application tier.

Saturday, April 18, 2020

What is Hierarchical database model?


         I.               Hierarchical Model: - A hierarchical model represents the data in a tree-like structure in which there is a single parent for each record. To maintain order there is a sort field which keeps sibling nodes into a recorded manner. These types of models are designed basically for the early mainframe database management systems, like the Information Management System (IMS) by IBM. This database model organizes data into a tree like structure with a single root to which all the other data is linked. The hierarchy starts from root data and expands like tree, adding child nodes to the parent nodes. In this model a child node will only have a single parent node. This model efficiently describes many real world relationship like index of a book, recipes. In hierarchical model, data is organized into tree like structure with one, one to many relationship between two different types of data. Here the example of this model: - 

You can easily understand the hierarchical model .
to know other DATABASE  MODELS visit this site https://myrdbmsnotes.blogspot.com/2020/04/database-models-its-definition-database.html