Beruflich Dokumente
Kultur Dokumente
Technology devices
Department E - Business
Skopje, 2014
Contents
1|Page
1. Database for technology devices selling company
The aim of this project is to improve the data storage and retrieval of information for
an imaginary selling institution for technology devices such as laptops and tablets that we
named “PC-NET”. For the purposes of this institution we will design a database that will
integrate all the needed information, which will eliminate data redundancy and all other
data management problems. The motive for creating this kind of database is to provide a
better way for storing information about which products are available in which stores
regarding the fact that this database is used for one company that has stores in different
cities.
The solution that we offer with this database created in Microsoft Access will enable
the users with user-friendly and easier access to the needed information by asking simple
queries to the database.
3. Objectives
Nowadays having reliable information available in any time is of a great importance
for every company. In this case precisely for the previously mentioned company “PC-NET”
having a good connection and flow of the information is very important. According to this
we can say that this database will improve the flow of information and the business
processes such as efficient and easy access to the information about which products are
available at the moment and in which stores.
2|Page
4. Business rules
According to the previous information our database must follow the following
business rules:
1. One customer can buy many products, and one product can be bought by many
customers.
According to the previously mentioned rule there is a many-to-many
relationship between the customers and the products, as a result of this
there are two junction tables: invoice and line item.
2. One product can be included in only one invoice, but one invoice can include many
products.
3. One invoice can have many line items, but one line item can be part of only one
invoice.
4. One product can be part of only one line item, but one line item can have many
products.
5. One product can have only one category, but one category can have many products.
6. One product can have only one brand, but one brand can have many products.
7. One shop can have many products, and one product can be sold in many stores.
According to the previously mentioned rules there is a many-to-many
relationship between the products and the shops, as a result of this there is a
junction table between them, shop info.
8. One employee can sell many products, and one product can be sold by many
employees.
According to the previously mentioned rules there is a many-to-many
relationship between the employees and the product, as a result of this
there is a junction table, realised sales.
9. One employee can have only one job title, but one job title can be given to many
employees.
3|Page
5. Normalization
5.1. ER – Diagram
Customers Products
Name Name
Address Category
Contact Brand
Price
Manufacturer
Shop Name
Shop address
Employee Name
Employee
contact
Job title
Job description
Salary
4|Page
5.3. First Normal Form
Customers Products
First Name Product Name
Last Name Category Name
Street Name Brand Name
House Number Manufacturer
City Price
Phone Number Shop Name
E-mail Shop Street Name
Shop Street Number
Shop City
Employee First Name
Employee Last Name
E. Phone Number
E. E-mail
Job Name
Job Description
Job Salary
5|Page
Step four: Each 1 NF – complaint table must have a primary key.
Any value that doesn`t support the entity represented by the primary key must be
moved to another table.
6|Page
Each 2NF-complaint table must have a primary key.
All field that are mutually depended must be moved to another table
7|Page
5.6. List of the attributes for each entity and M:N relationships
Relationship
Table Field Datatype Foreign Key Field
Type
CustomerID AutoNumber
FirstName Text
LastName Text
StreetName Text
Customers
HouseNumber Number
City Text
PhoneNumber Text
E-mail Text
InvoiceNumber Number One-to-Many Customers.CustomerID
InvoiceDate Date/Time
Invoice
Total Currency
CustomerID(FK) Number
LineNumber AutoNumber One-to-Many Invoice.InvoiceNumber
Quantity Number One-to-Many Products.ProductID
UnitPrice Currency
LineItem InvoiceNumber (FK) Number
Total Currency
ProductID (FK) Number
ProductID Number One-to-Many Categories.CategoryID
ProductName Text One-to-Many Brands.BrandID
Price Currency
Products
CategoryID (FK) Number
BrandID (FK) Number
EmployeeInfoID AutoNumber One-to-Many Products.ProductID
EMBG (FK) Text
RealisedSales
ProductID (FK) Number
8|Page
ShopID AutoNumber
ShopName Text
Shops ShopStreetName Text
ShopStreetNumber Number
ShopCity Text
CategoryID AutoNumber
Categories CategoryName Text
BrandID AutoNumber
Brands BrandName Text
Manufacturer Text
This database includes three Many-to-Many relationships, they are the following: the
relationships between Customers and Product, Products and Shops and Products and
Employees. But considering that Access doesn’t support Many-to-Many relationships, the
creation of junction tables is necessary. In order to link the Customers and Products entity,
the M-N relationship between them needs to be broken down into One-to-Many
relationships. To achieve that we created two new junction tables Invoice and LineItem.
Same goes for the other two M-N relationships. For linking the Products and Shops entity
we created ShopInfo and for linking the Procucts and Employees entity we created
RealisedSales.
9|Page
5.8. Referential Integrity
Referential Integrity
Relationships Cascading behavior
constraints
On
Parent Child On update
delete
CustemerID in Invoice
Customers Invoice must exist CustomerID No No
in Customers
InvoiceNumber in
LineItem must exist
Invoice LineItem No No
InvoiceNumber in
Invoice
ProductID in LineItem
Products LineItem muse exist ProductID in No No
Products
ProductID in
RealisedSales musr
Products RealisedSales No No
exist ProductID in
Products
EMBG in RealisedSales
Employees RealisedSales must exist EMBG in No No
Employees
JobID in Employees
JobTitle Employees must exist iJobID in No No
JobTitle
CategoryID in Products
Categories Products must exist CategoryID No No
in Categories
BrandID in Products
Brands Products must exist BrandID in No No
Brands
ShopID in ShopInfo
Shops ShopInfo must exist ShopID in No No
Shops
ProductID in ShopInfo
Products ShopInfo must exist ProductID in No No
Products
10 | P a g e
6. Conclusion
This database provides access to the company’s products and information regarding the
clients. Besides the fact that it improves classification of data, it will also simplify the process
of making a purchase. It will give them a better and faster view of client’s information. We
strongly believe that this database will be beneficial for the company, since they haven’t
developed this kind of data collection.
11 | P a g e