C Language
C Language
Q1) Explain DBMS .Write the advantages of DBMS over file-based system?
Hence , a database management system (DBMS) refers to create, retrieve, update and
manage data. The DBMS works as an interface between the database and the end-user.
DBMS is useful for providing a centralized view of data that can be accessed by multiple
users, from multiple locations in a controlled manner.
Advantages of DBMS :
1. EXTERNAL LEVEL: This refers to logical records and the relationship. This is only
for the view purpose of the End-user. What ever the end-user requires that is only
displayed other things are hiding .
2. CONCEPTUAL LEVEL: This refers to the records and relationship in the database.
This is managed by the DBA (Data Base Administrator) who designs and manipulates
the data using the physical data base.
3. INTERNAL LEVEL: This refers to how the data is stored and describes the
structure and accessed methods by the database. This is the actual or raw data which
is stored in the database in physical form by the Data Administrator.
Ans)
1. Database Designing
2. Database implementation
3. Maintaining Database
4. Database Security
5. Back up & Recovery
Database Design
The DBA creates the structure of the table by executing DDL commands. Designing
includes the logical structure of database table , their relations , the attributes and integrity
constraints. The DBA prepares the structure of the data in the tables. DBA creates the fields,
its size ,constraints of the fields.
Data Implementation
The DBA provides necessary instructions to manage the database up-to-date. A DBA takes
care of installing necessary software and database for the users . Gives the required data to
the user as per their requirement and department . A DBA is responsible to give training to
his/her sub-ordinates about handling database.
Maintaining Database
A DBA is responsible to create ,insert,delete and update record as & when required. A
DBA prepares different Queries to retrieve the data from the database. A DBA takes care of
different database errors, memory space, speed of the database etc.
Security
DBA is responsible for the safety & security of the data & information of the organization.
Data must be secured. Proper protection to the data & system should be used as a security
aspect.
DBA is responsible to take & keep back up of all data. In case of failure of the system due to
any natural calamities or virus and other untoward incidence data can be recovered from the
back up media so that work should go smoothly
Ans) A data model describes the dataflow and logical inter-relationship among different data
elements. Different data models are:
c) Relationships : This tells how the entities are linked to each other. Relationships
are displayed as diamond shape.
Iih.uu
Yumm
.G
Example:
1. PRIMARY KEY: A primary key is a unique key identifies every row of the
database
For example : Hall ticket number in a student database. No two students will have the
same hall ticket no.
2. FOREIGN KEY: When two tables are having relationships then the primary key of a
child table when present in the parent table it is treated as a foreign key in the parent
or base table. For example in an employee database the empno is primary key where
as deptid is a foreign key in employee table. But in the department table deptid is the
primary key.
3. CANDIDATE KEY: When we combine two keys which gives a unique value for
every row of the table that combination keys are known as candidate key. For
example:
Emp_no & Dept_id
4. SUPER KEY: When we combine the primary key of a table with other fields of the
table such keys are called super keys. For example : ENO.NAME, ENO.PHNO etc.
6. ALTERNATE KEY: Any other key except primary key when used for unique then
that field is treated as alternate key. For example instead of EMP_NO when we use
DEPT_ID for unique identification this DEPT_ID is treated as alternate key.
Ans) Restrictions on the contents of the database are treated as constraints. For example in a
student table name field should not be null. That means any other field may be empty but
while saving data at least name should be present.
1. ENTITY CONSTRAINTS (NOT NULL) : Some fields must have values those
fields can’t have null values. For example :employee name in a employee database.