Group A : Study of Databases
Assignment No:- 1
Aim:- Study of MySQL Open source software. Discuss the characteristics like efficiency, scalability,
performance and transactional properties
What is Database?
A database is a separate application that stores a collection of data.Each database has one or more distinct
APIs for creating, accessing, managing, searching and replicating the data it holds. So nowadays, we use
relational database management systems (RDBMS) to store and manage huge Volume of data. This is
called relational database because all the data is stored into different tables and Relations are established
using primary keys or other keys known as foreign keys.
What is DBMS?
A software system that enables users to define, create, maintain, and control access to the database. The
DBMS is the software that interacts with the users’ application programs and the database.
Typically, a DBMS provides the following facilities:
• It allows users to define the database, usually through a Data Definition Language (DDL). The
DDL allows users to specify the data types and structures and the constraints on the data to be
stored in the database.
• It allows users to insert, update, delete, and retrieve data from the database, usually through a Data
Manipulation Language(DML). The most common query language is the Structured Query
Language (SQL, pronounced ‘S-Q-L’, or sometimes ‘See-Quel’), which is now both the formal
and de facto standard language for relational DBMSs.
• It provides controlled access to the database. For example, it may provide:
• A security system, which prevents unauthorized users accessing the database.
• An integrity system, which maintains the consistency of stored data
• A concurrency control system, which allows shared access of the database.
• A recovery control system, which restores the database to a previous consistent state following a
hardware or software failure
• A user-accessible catalog, which contains descriptions of the data in the database.
What is RDBMS?
A relational database refers to a database that stores data in a structured format, using rows and columns.
This makes it easy to locate and access specific values within the database. It is "relational" because the
values within each table are related to each other. Tables may also be related to other tables. The relational
structure makes it possible to run queries across multiple tables at once.
RDBMS Terminology:
Before we proceed to explain MySQL database system, let's revise few definitions related to database.
• Database: A database is a collection of tables, with related data.
• Table: A table is a matrix with data. A table in a database looks like a simple spread sheet.
• Column: One column (data element) contains data of one and the same kind, for example the
Column post code.
• Row: A row (tuple, entry or record) is a group of related data, for example the data of one
subscription.
• Redundancy: Storing data twice, redundantly to make the system faster.
• Primary Key: A primary key is unique. A key value cannot occur twice in one table. With a key,
you can find at most one row.
• Foreign Key: A foreign key is the linking pin between two tables.
• Compound Key: A compound key(composite key) is a key that consists of multiple columns,
Because one column is not sufficiently unique.
MySQL is a fast, easy-to-use RDBMS being used for many small and big businesses. MySQL is
developed, marketed and supported by MySQL AB, which is a Swedish company. MySQL is becoming
so popular because of many good reasons — > MySQL is released under an open-source license. So you
have nothing to pay to use it. > MySQL is a very powerful program in its own right.
It handles a large subset of the functionality of the most expensive and powerful database
packages. > MySQL uses a standard form of the well-known SQL data language. > MySQL works on
many operating systems and with many languages including PIP, PERL, C, C++, JAVA, etc. > MySQL
works very quickly and works well even with large data sets. > MySQL is very friendly to HIP, the most
appreciated language for web development. > MySQL supports large databases, up to 50 million rows or
more in a table.
The default file size limit for a table is 4GB, but you can increase this (if your operating system
can handle it) to a theoretical limit of 8 million terabytes (TB). > MySQL is customizable. The open-
source GPL license allows programmers to modify the MySQL software to fit their own specific
environments.
Conclusion: In this way , study of MYSQL and its features is done.
Assignment No :- 2
Aim :- Install and configure client and server of MySQL.(Show all commands and necessary steps
for installation and configuration)
Download and Installation Steps :-
Step 1: Go to the official website of MySQL and download the community server edition software. Here,
you will see the option to choose the Operating System, such as Windows.
Step 2: Next, there are two options available to download the setup. Choose the version number for the
MySQL community server, which you want. If you have good internet connectivity, then choose the
mysql-installer-web-community. Otherwise, choose the other one.
Installing MySQL on Windows
Step 1: After downloading the setup, unzip it anywhere and double click the MSI installer .exe file. It
will give the following screen:
Step 2: In the next wizard, choose the Setup Type. There are several types available, and you need to
choose the appropriate option to install MySQL product and features. Here, we are going to select
the Full option and click on the Next button.
This option will install the following things: MySQL Server, MySQL Shell, MySQL Router, MySQL
Workbench, MySQL Connectors, documentation, samples and examples, and many more.
Step 3: Once we click on the Next button, it may give information about some features that may fail to
install on your system due to a lack of requirements. We can resolve them by clicking on
the Execute button that will install all requirements automatically or can skip them. Now, click on the
Next button.
Step 4: In the next wizard, we will see a dialog box that asks for our confirmation of a few products not
getting installed. Here, we have to click on the Yes button.
After clicking on the Yes button, we will see the list of the products which are going to be installed. So, if
we need all products, click on the Execute button.
Step 5: Once we click on the Execute button, it will download and install all the products. After
completing the installation, click on the Next button.
Step 6: In the next wizard, we need to configure the MySQL Server and Router. Here, I am not going to
configure the Router because there is no need to use it with MySQL. We are going to show you how to
configure the server only. Now, click on the Next button.
Step 7: As soon as you will click on the Next button, you can see the screen below. Here, we have to
configure the MySQL Server. Now, choose the Standalone MySQL Server/Classic MySQL Replication
option and click on Next. Here, you can also choose the InnoDB Cluster based on your needs.
Step 8: In the next screen, the system will ask you to choose the Config Type and other connectivity
options. Here, we are going to select the Config Type as 'Development Machine' and Connectivity
as TCP/IP, and Port Number is 3306, then click on Next.
Step 9: Now, select the Authentication Method and click on Next. Here, I am going to select the first
option.
Step 10: The next screen will ask you to mention the MySQL Root Password. After filling the password
details, click on the Next button.
Step 11: The next screen will ask you to configure the Windows Service to start the server. Keep the
default setup and click on the Next button.
Step 12: In the next wizard, the system will ask you to apply the Server Configuration. If you agree with
this configuration, click on the Execute button.
Step 13: Once the configuration has completed, you will get the screen below. Now, click on
the Finish button to continue.
Step 14: In the next screen, you can see that the Product Configuration is completed. Keep the default
setting and click on the Next-> Finish button complete the MySQL package installation.to
Step 15: In the next wizard, we can choose to configure the Router. So click on Next->Finish and then
click the Next button.
Step 16: In the next wizard, we will see the Connect to Server option. Here, we have to mention the root
password, which we had set in the previous steps.
In this screen, it is also required to check about the connection is successful or not by clicking on the
Check button. If the connection is successful, click on the Execute button. Now, the configuration is
complete, click on Next.
Step 17: In the next wizard, select the applied configurations and click on the Execute button.
Step 18: After completing the above step, we will get the following screen. Here, click on the Finish
button.
Step 19: Now, the MySQL installation is complete. Click on the Finish button.
Verify MySQL installation
Once MySQL has been successfully installed, the base tables have been initialized, and the server has
been started, you can verify its working via some simple tests.
Open your MySQL Command Line Client; it should have appeared with a mysql> prompt. If you have
set any password, write your password here. Now, you are connected to the MySQL server, and you can
execute all the SQL command at mysql> prompt as follows:
For example: Check the already created databases with show databases command:
Assignment No :- 3
Aim :- Study of SQLite: What is SQLite? Uses of Sqlite. Building and installing SQLite.
Download and Installation of SQLite
From the SQLite official website in the download section. The following screenshot allows you to
download different SQLite's installation packages for Windows:
The command line shell program:
The highlighted download package is called the Command-Line Program (CLP). CLP is a command
line application that let you access the SQLite database management system and all the features of the
SQLite. Using CLP, you can create and manage the SQLite database. And it is the tool that we will use
throughout the tutorial.
• 32-bit DLL(x86): The SQLite Database system core library for x86 platforms.
• 64-bit DLL (x64): The SQLite Database system core library for x64 platforms.
Installing the Command-Line Program (CLP) on your machine:
In the following steps, you will find the steps for how to install the Command-Line Program (CLP) on
your machine:
Step 1) Download the highlighted download package from the previous image to your PC. It is a "zip"
file.
Step 2) Extract the zip file. You will find the "sqlite3.exe" in the extracted file as following:
Step 3) Open My Computer, and double-click the partition "C" to navigate to it:
Step 4) Create a new directory "sqlite":
Step 5) Copy the file "sqlite3.exe" into it. This is what we will use through the tutorials to run SQLite
queries:
//Execute some commands in sqlite such as create, insert….
Put here the screenshot of that command prompt
Conclusion:-
We have studied the SQLite database and its uses.