Uploaded by Catherine Benban

CB FOR FUTURE - Copy

advertisement
I. Introduction
A database is a software program that stores information which relates to a particular
activity or purpose. A database includes tools to help organize and maintain the data.
A database design engineer must know and be able to use these tools in order to
make the database efficient and accurate. In a properly designed database the
information is updated once and all other occurrences of this within the database will
be updated automatically. A principal requirement of any database system is the ability
to generate, store and retrieve data efficiently.
II.RATIONAL/OBJECTIVE
 Data availability is the process of ensuring that data is available to end users and
applications, when and where they need it. It defines the degree or extent to
which data is readily usable along with the necessary IT and management
procedures, tools and technologies required to enable, manage and continue to
make data available.
 Data integrity is the overall accuracy, completeness, and consistency of data.
Data integrity also refers to the safety of data in regard to regulatory compliance
— such as GDPR compliance — and security. It is maintained by a collection of
processes, rules, and standards implemented during the design phase.
 Data security refers to the process of protecting data from unauthorized access
and data corruption
throughout
its
lifecycle. Data
security includes data encryption, hashing, tokenization, and key management
practices that protect data across all applications and platforms.
 Data Independence is defined as a property of DBMS that helps you to change
the Database schema at one level of a database system without requiring to
change the schema at the next higher level. Data independence helps you to
keep data separated from all programs that make use of it.
III.ERD AND DISCUSSION
MULTI-VALUED
ATTRIBUTE
RELATIONSHIP
ATTRIBUTE
ENTITY
WEAK ENTITY
COMPOSITE
ATTRIBUTION
RECURSIVE
RELATIONSHIP
WEAK ENTITY
RELATIONSHIP
PRIMARY KEY
DERIVED
ATTRIBUTE
1. Entity
a. A simple rectangular block represents a table.
2. Relationship
a. It’s sketched using the diamond shape.
3. Recursive Relationship
a. It’s a relationship with the the same entity.
4. Weak Entity
a. A weak entity is simply an entity where it’s existence depends on another
entity.
5. Partial Key
a. A weak entity has what’s called a “partial key”. It’s one or more attributes
that uniquely identify a weak entity for a given owner entity.
6. Weak Entity Relationship
a. Also whenever there is a relationship between a weak entity and another
entity, it’s sketched same as the one above, but with double lines.
7. Attribute
a. An attribute or a column (simple) represents a piece of data in the table,
like an address, salary, and date.
8. Primary Key
a. It’s sketched the same as a normal attribute, but, with underline.
9. Composite Attribute
a. A value that composed of some other values.
10.
Multi-valued Attribute
Multiple values for a single column, for example the locations of a department
may have more than one value at the same time.
11. Derived Attribute
When you have a column where its value could be calculated from another
column. Thus, there is no need to insert its value every time.
IV. TABLES AND DISCUSSIONS
A. Create a new table
1. Open Access and from the opening screen click on the Blank Database icon.
2. In the right-hand panel, browse to your course folder and give the database the
name music.accdb.
3. Click the Create button to create the new empty database. Access will automatically
create and open a blank table called Table1.
4. Select View > Design View to begin modifying this table to meet your needs.
5. Give the table the name Albums.
The Design View provides a grid for you to specify the names, data types and other
properties for the fields (columns) you want to have in your table. Note that the
table automatically has a field called ID with a data type of AutoNumber. The field
is also designated as the table's Primary Key.
Note: Most RDBMS's offer an auto-incrementing numeric data type like this. It's
common for database tables to use arbitrary integer fields as their primary key. If
you create a field as this AutoNumber type (or its equivalent in another RDBMS),
you need not supply a value for it when adding new records to the table. The
software will automatically handle that for you.
6. Rename the field from ID to Album ID.
7. Beneath that field, add a new one called Title.
With the 2013 version of MS Access the interface has changed some when it comes
to the next two settings. The list of data types has become more streamlined and
the way Field Size is set for numeric fields is different. I will indicate below what the
differences are.
8. Set the Title field's Data Type to Text.
In Access 2013 - set the Title field's Type to Short Text.
9. Set its Field Size to 200. (This and several other options are found in the Field
Properties section at the bottom of the window, under the General tab. Note that
the maximum value allowed for this property is 255 characters.)
In Access 2013 - no need to set this, the Short Text type holds up to 255
characters.
FYI, the "Long Text" option in Access 2013 ("Memo" option in older Access
versions) can hold up to a Gigabyte and can be configured to hold Rich Text
formatted information.
10.
Repeat these steps to add the other fields defined for the Albums table:
In Access 2013 - To set the type and size for numeric data, you first
chose Number from the Type list then under the General tab click
the FieldSize property box. Click the arrow and chose the desired field size (Integer,
Long Integer, Float, etc.).
Name
Album ID
Title
Artist ID
Release Year
Label ID
Type
AutoNumber
Text (200)
Long Integer
Integer
Long Integer
11.
12. Note:
13. Try adding a field with a name of Year to see why we used the name Release
Year instead.
14. When finished adding fields to the Albums table, click the Save button.
15. To add the next table to the database design, click the Create tab, then Table
Design.
16. Repeat the steps outlined above to define the Artists table with the following
fields:
Name
Type
Artist_ID
AutoNumber
Artist_Name
Text (200)
Year_Begin
Integer
Year_End
Integer
17. Before closing the table, click in the small gray area to the left of
the Artist_ID field to select that field then click on the Primary Key button on the
ribbon.
18. Create the Labels table with the following fields:
Name
Type
Label_ID
AutoNumber
Label_Name
Text (200)
19. Set Label_ID as the primary key of the Labels table.
B. Establish relationships between the tables
While it's not strictly necessary to do so, it can be beneficial to spell out the
relationships between the tables that you envisioned during the design phase.
1. Click on Database Tools > Relationships.
2. From the Show Table dialog double-click on each of the tables to add them to
the Relationships layout.
3. Arrange the tables so that the Albums table appears between
the Artists and Labels tables.
4. Like you did when building queries earlier, click on the Artist_ID field in
the Artists table and drag it to the Artist_ID field in the Albums table. You should
see a dialog titled "Edit Relationships".
5. Check each of the three boxes: Enforce Referential Integrity, Cascade Update
Related Fields, and Cascade Delete Related Records.
Checking these boxes tells Access that you want its help in keeping the values in
the Artist_ID field in sync. For example:
o Let's say your Artists table has only three records (with Artist_ID values of 1, 2
and 3). If you attempted to add a record to the Albums table with an Artist_ID
of 4, Access would stop you since that value does not exist in the related Artists
table.
o If you change an Artist_ID value in the Artists table, all records in the Albums
table will automatically have their Artist_ID values updated to match.
o If you delete an artist from the Artists table, the related records in the Albums
table will be deleted as well.
Without implementing these referential integrity settings, you run the risk of
inaccuracies creeping into your database over time.
6. Click the Create button to establish the relationship between Artists and Albums.
7. Follow the same steps to establish a relationship between Albums and Labels based
on the Label ID field.
8. Save and Close the Relationships window.
With your database design implemented, you are now ready to add records to your
tables.
V. Conclusion/Recommendation
DBMS is a systematic operational system which consists of tools making data, data
saving and data manipulation an easier task. DBMS is the majorly used throughout the
world for data handling. Thus it’s a good data manager till today. If someone asks you
question how do we protect data form crashes? Why to complicate? The solution is to
get A DBMS.
Download