12 Viva
12 Viva
Structured Query Language is a database tool which is used to create and access database to support
software application.
3. What is DBMS?
A Database Management System (DBMS) is a program that controls creation, maintenance and use of a
database.
DBMS can be termed as File Manager that manages data in a database rather than saving it in file systems.
4. What is RDBMS?
RDBMS stands for Relational Database Management System. RDBMS store the data into the collection of
tables, which is related by common fields between the columns of the table. It also provides relational
operators to manipulate the data stored into the tables.
Example: SQL Server.
5. Why do we use SQL constraints? Which constraints we can use while creating database in SQL?
There are 5 major constraints are used in SQL, such as
NOT NULL: That indicates that the column must have some value and cannot be left null
UNIQUE: This constraint is used to ensure that each row and column has unique value and no value is
being repeated in any other row or column
PRIMARY KEY: This constraint is used in association with NOT NULL and UNIQUE constraints such
as on one or the combination of more than one column to identify the particular record with a unique
identity.
FOREIGN KEY: It is used to ensure the referential integrity of data in the table and also matches the
value in one table with another using Primary Key
CHECK: It is used to ensure whether the value in columns fulfills the specified condition
15. Mention what are the rules for local and global variables in Python?
Local variables: If a variable is assigned a new value anywhere within the function's body, it's assumed to
be local.
Global variables: Those variables that are only referenced inside a function are implicitly global.
A composite key is a primary key that is made up of more than one column to uniquely identify records in
a table. Unlike a single-column primary key, a composite key combines two or more columns to ensure
uniqueness. While any of the individual columns in a composite key might not be unique on their own,
together they form a unique combination that can uniquely identify each row in the table.