You are on page 1of 6

Assignment Database Design Task 1

Explain the feature of a relation database and provide with consumers that will afford several specific items, and a
diagram to support your answer. (P1) table of goods that no other consumers may purchase.
a. Relationship
b. Normalization
- A relation is a definite connection between two table’
- Normalization is the data management phase in a
row. This relation is usually defined by the values that
database. It involves building tables according to rules
correspond to the values in the child table in chosen
designed both to protect the data and to make the
columns from the parent table.
database more efficient by removing consistency and
 One – to - Many.
excessive dependence.
- If a parent record in one table will theoretically
connect multiple kid records in another table, a one-
c. Attributes
to0many relationship is. The parent is not expected to
- Organizations may use the characteristics to support
have child record in a one-to-many arrangement; thus,
them. That will be achieved by the recognition of the
the one-to-many partnership provides for zero child
most relevant variables. For example, ‘name, address,
record, a single child record, or many child record(the
postcode etc.’ and then placed them into entities.
child record must contain more than the parent
record).
d. Data types
 One-to-one
- Text/Alphanumeric
- A one-to-one partnership I where a record in one table
o Text or alphanumeric details are generated by
is connected to a single record in a separate table. A
letters and/or numbers. Symbols and spaces
document in another table cannot connect to more
are also allowed in this category of data.
than one chart, it only needs to relate to one. The
Example:
number of rows in table A shall be equivalent to that
Forename: Seo
of rows on table B.
Surname: Chang-bin
 Many-to-many
Address: 123 sample street
- When one or more rows in a table relate to one or
- Number/Numeric
more rows in another line, a many-to-many
partnership. An indication of this is a table of
o Number or numeric data consists of entire Long date: 11 November 2000
number or decimal number to be used. You Medium data: 24-dec-99
can enter only number, and not letters or Short date: 21/06/2020
symbols. Long time: 08:47:00
Example: Medium time: 08:47 pm
Age: 20 Short time: 20:47
Height(cm): 150.5
- Boolean
- Currency o Data is limited to a choice of just two.
o Currency data style automatically formats the Example:
data with a £or $ or € sign in front of the number, True/False
which also means two decimal places are available. Yes/No
Example: Male/Female
£5.75 Hot/Cold
$54.99
€0.80
e. Validation Rules
- You can set rules in a database that will allow the user
- Date/time
to use option such as words or numbers. An example if
o The form of data and time data restricts data
a rule may be “Gender= Male + female.” If incorrect
entry to 1-31 a day, and 1-12 a month. This
characters are placed in the database, then an error
searches to see whether there is a deadline.
message will be displayed. The user would then have
The data is organized into large, medium, or
to re-enter the characters until they match male or
short date/time. If we were to insert December
female. This means that the database has fewer
24th, 1999 so it is going to be incorrect. Yes, the
errors.
day is in 1-31-day requirement, but the
database is smartly configured to exclude non-
existing dates such as 24 December 1999.
However, it will live on 24 December 2020. It
should be immediately dealt.
Example:
Explain referential integrity, how relational connection between data in two table.
database can help reduced data redundancy You can, for example, connect a
and the purpose of primary key in building the primary key to another section of a
relationship between table. (M1) database and then create a copy of that
ID and then move it into the other table
- Entities. as a foreign key.
o Entities should be linked to each other by o Referential Integrity
primary key and foreign key so you can use a  Referential integrity is a term for a
key on another section of database to access database that maintains clear
the entities by it instead of typing the entities connections between table. If one table
all over again. includes a foreign key to another table,
the principle of referential integrity says
o Primary Key that you can not apply a record to the
 A primary key is a specific identification table containing the foreign key until
number that can be used to locate a the related table has a matching
document in a database. When a table document. This also involves the
is created, a primary key like 11,24,21 methods such as cascading upgrade
etc. is given to one of the fields and erase cascading, meaning
(normally the first field). You can have improvements made to the connected
as many records as you want, and no table are reflected in the primary table.
matter the number, a primary key will  Data redundancy
still be assigned. Although the primary  Information that is found in a
key is often a number, it may also be a table or in the whole database
text field, or some other type of data. more than once is termed
redundancy. Data replication
o Foreign Key often happens by mistake but is
 A foreign key is a key which is a group often performed on intent for
column or a group of columns in a table backups. Data replication may
of relational databases and provides a be eliminated, like a relational
database, by grouping various  Use primary and foreign key, you may
fields and tables inside the connect entities together, this ensures
database. The most common you do not need to retype all entities
way to remove redundancy to into another row.
divide all data into table that are
related to the other tables
correctly.
o Benefits of relational database.
 Saving time on databases. Retrieving a
single document may be achieved in a
database in only a couple of taps. By
contrast, it may take several minutes to
try to find a documenting using
relational repositories us much easier
than producing a report in a text
document. You can produce all kinds of
reports depending in the needs of the
user this reduces the enormous amount
of time to do it in the form of a paper.
 Database offer you several different
ways of accessing the result. To submit
a particular response or collection from
your servers you will use query’s
(database question). Rather of hand-
collating data document or organizing
and resorting a spreadsheet, this will
take only a minute or two to report into
the document initially.
Discuss how potential error in the design and construction of a incorrect because it is not the right data ty[e to
database can be avoided. (D1) use (the right value will be ‘2400’. It can be
prevented because you should instruct the
- Accident deletion of field.
database to enable only numerical values to be
o When a database is in operation, it is often
inserted in that sector, and that mistake would
possible to unintentionally erase fields in the
not accrue.
tables that might contributes to re-doing the
- Renaming Incorrectly
missing results. One way to prevent that will be
o Renaming anything incorrect into a database
to make sure the copies are produced from the
can in the immediate future lead to errors. For
archive, and it would not be a hassle to update
e.g. if a bank placed an extra 0 at the end of its
any time you erase filed by mistake. Having
balance then the consumer will probably
said that, when the database is no backed up it
assume, he/she has that money. This happens
is a hassle because it would take a lot of time
more while editing a document manually
to retype the record. While a database is in
coding the document has a higher risk of
operation, it is often possible to unintentionally
creating a mistake. This implies that if the
erase fields in the table that can result in re-
mistake is not found as soon as possible, it can
doing the missing result. One solution to
contribute to legal issues of financial loss. To
prevent that would be to guarantee that copies
minimize mistake error, the person who
are created from the files, and it would not be
updates the document will double check what
a hassle to restore it you erase filed by
they have accomplished and make sure that
mistake. That said, when the database is not
the data has been correctly inputted.
backed up it is a hassle, because it would take
- Validation
a lot of time to retype the records.
o Validation is where a user-set condition is
- Incorrect data type
verified by the database to determine whether
o Incorrect data type can occur when an
the data entered meets the right criteria and is
assigned data type is not compared to the used
validated. Of example, if I placed a restriction
data form. For e.g., if there is a field named
in my table for the age area that only people
‘salary’ and you allocated that area to use a
20 or over would sign for my website. The
numerical data from, so adding a text fata form
order will look like this ‘> = 20,’ which implies
such as ‘twenty-four thousand’ will be
that someone who is 20 or order will sign up
for my website. If anyone signs up to my
websites and enters details to claim they are
18, otherwise the method of signing up does
not continue because the authentication tests
are ineffective. Use this tool on the database
help to minimize redundant data you do not
like, so it saves a lot of space.
- Null values
o Within a database, null values simply imply
‘none’ is available. This may contribute to
issues in a database where certain aspects of it
do not function and it cannot understand what
the consumer need it to do. If the database
was not set up adequately to accommodate
null values, so it should just disregard it and
continue to the next stage. This may be a
concern, so you should use a validation
method discussed above to prevent this from
happening. The validation process must stop
the null interest. For e.g. in an electronic
application form where no meaning will be
inserted in an entry box (which is prerequisite
such as email and username) then an error
note will be sent to the customer to fill in the
application form specification as if they had
forgotten the null values, so the software will
function appropriately.

You might also like