UNIT – 8 DBMS
STD – 10
1) WHAT ARE ALL THE ACTIONS PERFORMED IN DBMS?
Storing, Sorting, Summarizing, Classifying, Retrieving
2) LIST OUT SOME FEATURES OF DBMS?
● Retrieving and Storing information
● Managing data
● Managing transactions
● Hiding complexity from external users
● Supporting quick recovery from system crashes
● Supporting Query Language
3) ADVANTAGES OF DBMS?
Reduces data redundancy – reduces the duplication of data
Reduces data inconsistency – when the data is changed in one location it is changed in
other location also.
Allows data sharing – sharing the data with multiple users
Ensures Data Security – access to be given only to authorized users
Backup and Recovery – protecting the data from hardware or software failures.
4) TYPES OF DATABASE?
FLAT FILE DATABASE – it is a type of database in which single table stores all the data.
RELATIONAL DATABASE – It is a database in which data is stored in multiple tables.
DISTRIBUTED DATABASE – It has a central database that is distributed in multiple
locations within a network.
5) DATABASE LANGUAGES OF SQL COMMANDS?
DDL- DATA DEFINITION LANGUAGE
● CREATE – To create a database
● DROP- Delete the database
● ALTER – modify the structure of the database.
● TRUNCATE – Delete all records from a table.
● COMMENT – add comments to the data.
● RENAME – Renaming an object in the existing database.
DML – DATA MANIPULATION LANGUAGE
Select, Insert,Update, Delete
DCL – DATA CONTROL LANGUAGE
● Grant – provides access to the database
● Revoke – withdrawing the access to database
TCL – Transaction Control Language
Commit, Rollback, Savepoint, Set Transaction
6) DEFINE RDBMS?
*Having a relation between the tables. *It allows a manipulation of data using
relational operators. *full form is RELATIONAL DATABASE MANAGEMENT SYSTEM.
7) DEFINE THE CONCEPTS?
FIELDS or COLUMNS or ATTRIBUTES: *refers to the smallest unit of information in a
table. *Each field in the database is given a unique name and data type.
PRIMARY KEY: *Refers to a key that helps us to uniquely identify a record in a table.
* It helps to search record faster. Ex: Student_ID, Emp_ID.
FOREIGN KEY – A key in one table that is a reference to a column in another table. Ex:
Student_name, Emp_name
COMPOSITE KEY – *Refers to the combination of more than one key. *Primary key
applied to many columns are known as composite key. Ex: Student_ID with the
combination of Student_enrollno.
RECORDS or ROWS or TUPLES– *Each row in a table represent a set of related data.
* Every row in the table has the same structure.
TABLE or RELATION– *It is used to store data in an organized form. *It is stored in
the form of rows and columns where rows are called records and columns are called
as fields.
FORMS – *Forms usually shows one record at a time. *You can edit, display the
records in a form.
QUERIES- *It is a request sent to a database to get data from a table. *When you
search for records you can use query.
REPORTS – It displays the summarized data in attractive manner.
8) WHAT ARE THE TYPES OF DATA TYPES USED IN DATABASE? (Very Very Important)
● Numeric types : It stores numeric type of data.
● Boolean: yes/no type values
● Integer/Int/Tinyint/Smallint/Mediumint/Bigint: store integer values
● Numer/Numeric/Float/Double/Real: store integers and decimals
values
● Decimal : store number with decimals.
● alphanumeric types : It stores text or numeric type of data
● char: stores characters
● Varchar: Store up to specified number of characters
● Longvarchar: maximum number of characters
● Varchar_ignorecase: Comparisons are not case-sensitive, but
stores capitals as you type them.
● Binary types : it stores array of bytes
● Binary: It is fixed, stores any array of bytes
● Varbinary: It is not fixed, stores any array of bytes
● Longvarbinary: It stores any array of bytes(images, sounds)
● date and Time: it stores date and time
● Date: It stores mont, day, year
● Time: It stores hour, minute and seconds
● Timestamp: It stores date and time
9)
TYPES DATA TYPES
TEXT OR CHARACTER CHAR, VARCHAR
DATE DATE
TIME TIME
TIMESTAMP TIMESTAMP
TINY INTEGERS TINYINT
SMALL INTEGERS SMALLINT
INTEGERS INT
BIGINTEGERS BIGINT
DOUBLE DOUBLE
FLOAT FLOAT
DECIMAL DECIMAL
BINARY VARBINARY
IMAGE, SOUNDS LONGVARBINARY
10) WHAT ARE THE TYPES OF RELATIONSHIPS?
ONE-TO-ONE-RELATIONSHIPS
Single record from the first table is linked to the Single record in the second table and
vice versa.
ONE TO MANY RELATIONSHIPS
Single record in the first table is linked with multiple records in the second table. BUT
Single record in second table is linked with single record in the first table.
MANY TO MANY RELATIONSHIPS:
Multiple records from the first table is linked with multiple records in the second table
and vice versa.
11) WHAT ARE WILDCARDS AND ITS TYPES?
A wildcard is a symbol which is used to replace one or more characters.
Asterisk(*) – EX: To* - Toll, Tower,Tour 🡪 finds the word that starts with To and *X –
finds the word that ends with X.
Question Mark(?) – Ex: t?ll – tell, till, tall 🡪 find the words which matches with the
word which can form a name.
Square Brackets[] – Ex: t[el]ll -🡪finds the word tall and tell.
Exclamation Mark(!) – Ex: !k 🡪 finds all the words that does not begin with ‘k’.
Hash Tag (#) – 2#4 – 204,224 🡪 matches a single numeric character.
Underscore(_) – it should specify the characters in ascending order (A to Z and not Z to
A). EX: m[a_d] 🡪 mad,mbd,mcd,med,mfd,mgd. It is ordered as a, b,c,d,e,f,g……
12) GIVE SOME EXAMPLES OF DATABASES THAT ARE AVAILABLE?
Oracle, SQL, MySql, Microsoft Access, dBASE,SQLit
13) GIVE THE DIFFERENCE BETWEEN PRIMARY KEY AND FOREIGN KEY?
PRIMARY KEY FOREIGN KEY
it does not contain any duplicate values It contain duplicate values
it does not contain null values it contain null values
there can be only one primary key in a a table can have multiple foreign keys
table