BT0075, RDBMS and MySQL

Dear students get fully solved assignments

Send your semester & Specialization name to our mail id :

“ help.mbaassignments@gmail.com ”

or

Call us at : 08263069601

ASSIGNMENT

 

PROGRAM BSc IT
SEMESTER 3
SUBJECT CODE & NAME BT0075, RDBMS and MySQL
CREDIT 4
BK ID B1003
MAX.MARKS 60

 

Note: Answer all questions. Kindly note that answers for 10 marks questions should be approximately of 400 words. Each question is followed by evaluation scheme.

 

1 Explain the blob, text and enum data types.

Answer: Properly defining the fields in a table is important to the overall optimization of your database. You should use only the type and size of field you really need to use; don’t define a field as 10 characters wide if you know you’re only going to use 2 characters. These types of fields (or columns) are also referred to as data types, after the type of data you will be storing in those fields.

 

MySQL uses many different data types broken into three categories: numeric, date and time, and string types.

Date and Time Types:

The MySQL date and time datatypes are:

 

 

 

2 How to alter databases and tables? Explain with the help of examples.

Answer: MySQL ALTER command is very useful when you want to change a name of your table, any table field or if you want to add or delete an existing column in a table.

Let’s begin with creation of a table called testalter_tbl.

root@host# mysql -u root -p password;

Enter password:*******

mysql> use TUTORIALS;

Database changed

mysql> create table testalter_tbl

-> (

-> i INT,

-> c CHAR(1)

-> );

Query OK, 0 rows affected (0.05 sec)

mysql> SHOW COLUMNS FROM testalter_tbl;

+——-+———+——+—–+———+——-+

| Field | Type    | Null | Key | Default | Extra |

+——-+———+——+—–+———+——-+

| i     | int(11) | YES  |     | NULL    |       |

| c     | char(1) | YES  |     | NULL    |       |

+——-+———+——+—–+———+——-+

2 rows in set (0.00 sec)

 

Dropping, Adding or Repositioning a Column:

Suppose we want to drop an existing column i from above MySQL table then you will use DROP clause along with ALTER command as follows:

 

 

 

3 Explain update and replace statements with examples.

Answer: In SQL, a view is a virtual table based on the result-set of an SQL statement.

A view contains rows and columns, just like a real table. The fields in a view are fields from one or more real tables in the database.

We cab add SQL functions, WHERE, and JOIN statements to a view and present the data as if the data were coming from one single table.

SQL CREATE VIEW Syntax:

CREATE VIEW view_name AS

SELECT column_name(s)

FROM table_name

 

 

 

 

4 Explain the date and time functions in detail.

Answer: Defines a time of a day without time zone awareness and is based on a 24-hour clock. Click here to read more from msdn.

Syntax: – time [ (fractional second precision) ]

 

Where ‘fractional seconds precision’ specifies the number of digits for the fractional part of the seconds. its default by 7 and can be from 0 to 7.

 

 

5 Define grant tables. Describe the steps to set up MySQL user accounts. Also explain the method to assign passwords to the anonymous accounts.

 

Answer: One of the most powerful aspects of the MySQL server is the amazing amount of control the administrator has over each user’s intended behavior. This control can restrict user privileges over a general part of the server, such as limited access to an entire database, but can also be as specific as limiting privileges for a specific table or even column.

 

One of the most powerful aspects of the

 

 

 

 

 

6 Briefly describe the error log and general query log.

 

Answer: If you are a web developer, you need to refer to various log files, in order to debug your application or improve its performance. Logs is the best place to start troubleshooting. Concerning the famous MySQL database server (or MariaDB server), you need to refer to the following log files:

  • The Error Log. It contains information about errors that occur while the server is running (also server start and stop)
  • The General Query Log. This is a general record of what mysqld is doing (connect, disconnect, queries)

 

 

Dear students get fully solved assignments

Send your semester & Specialization name to our mail id :

“ help.mbaassignments@gmail.com ”

or

Call us at : 08263069601

 

Leave a Reply