logo

Data Modelling in Database Design

Develop student’s skills in designing and implementing a relational database for a given case study.

8 Pages1351 Words159 Views
   

Added on  2022-10-12

About This Document

The syntax for creating a table CREATE TABLE table_name ( column1 datatype, column2 datatype, column3 datatype, ); When creating tables is advisable to start with a table that doesn’t have a foreign key. Below is the syntax for inserting the data INSERT INTO table_name (column1, column2, column3, .) VALUES (value1, value2, value3, .) VALUES (value1, value2, value3, .) VALUES

Data Modelling in Database Design

Develop student’s skills in designing and implementing a relational database for a given case study.

   Added on 2022-10-12

ShareRelated Documents
STUDENT NAME
Data Modelling
Tutor
Tutor name
Data Modelling in Database Design_1
Introduction
To create well-working database design, we first need to do data
modeling. Data modeling is the process of analyzing objects and
their relationship with other objects. To model data we can use
UML diagrams such as class diagram, Entity-relationship Diagram,
use-case diagrams, etc.The entity-relationship diagram shows how
data relate and interact with each other. It consists of tables
connected together showing how they compare with each other.
After completing designing the ERD diagram the next step is to
develop a relational schema of your database. The relational
schema is a tabular representation of your tables. It contains
all the fields and the constraints of your entities. Using
relational schema, we can jump into development process of the
database.
SQL language.
The assignment was done using the SQL language in a relational
database management system. According to (Virender, 2018) SQL is
the standard language for data manipulation in a DBMS. In simple
words, it's used to talk to the data in a DBMS. There are two
types of SQL languages that were used in accomplishing this
assignment.
Data definition language (DDL) used for creating the tables
in the database.
Data manipulation language(DML) used for inserting,
selecting, updating, and deleting data.
The first step was creating a database using a relational
database management system. The database management system is a
software used in running the SQL queries.
Mysql was the suitable DBMS for this assignment because it is
free software that is downloadable on the internet. Mysql comes
with a shell that allows users to write and query database.
Creating TABLES
The tables were created using the CREATE TABLE statement
followed by the table name. The table is made up of different
columns where each column belongs to a datatype.
The syntax for creating a table
Data Modelling in Database Design_2
CREATE TABLE
table_name (
column1 datatype,
column2 datatype,
column3 datatype,
);
When creating tables is advisable to start with a table that
doesn’t have a foreign key. In our case we began by creating the
seasonal table followed by the game table. The seasonal table
doesn’t have a reference table.
Inserting data to tables.
The insert statement was used in adding data to the tables. TO
insert data we need to start entering data for the table that is
not referenced in any other table in order to avoid insertion
error.
Below is the syntax for inserting the data
INSERT INTO
table_name (
column1,
column2,
column3, ...)
VALUES (
value1,
value2,
value3, ...);
The statement can be used to insert multiples data to the table
by defining multiple values.
INSERT INTO
table_name (
column1,
column2,
column3, ...)
VALUES (
value1,
value2,
value3, ...),
(
value1,
value2,
value3, ...), (
value1,
value2,
value3, ...);
solutions
For the first solution we will use the update statement to
update the year from 200017 to 2017.
MariaDB [mls_league]> select * from season;
+--------+----------+
| sea_id | sea_year |
+--------+----------+
| 1 | 2015 |
| 2 | 2016 |
| 3 | 200017 |
| 4 | 2018 |
Data Modelling in Database Design_3

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
Database Management System
|15
|1699
|261

Personal Playground Database System: Codio Platform
|13
|2243
|125

Database Management System
|14
|2029
|235

Data Modelling & SQL Language : Assignment
|21
|2425
|31

SQL: DDL Create and Alter, DCL Grant and Revoke, Data Manipulation, Database Testing
|13
|2239
|63

Data Modelling Database Design Analysis 2022
|5
|715
|14