-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.txt
More file actions
48 lines (45 loc) · 3.1 KB
/
schema.txt
File metadata and controls
48 lines (45 loc) · 3.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
User(UserID, UserName, FirstName, LastName, Email, SubscriberType)
Foreign Key UserName references Credentials
Table Explantion: Holds the data for each User.
Entity: A row, or an entity, represents a specific user registered in DigitalDrawer service.
Relationship To Other Tables: User has Credentials, User has Payment, User saves Content
Normalization Evidence: The table represents one entity: the user. All columns depend on the primary key: UserID.
Columns:
UserID: Unique identifier for each user.
FirstName: User's first name.
LastName: User's last name.
Email: User's email address.
SubscriberType: Paid or Free.
Content(UrlID, UserID, Rating, Frequency, Url)
Foreign Key UserID references User
Table Explantion: Holds the content that the user wants to store in their drawer.
Entity: A row, or an entity, represents specific stored of content of a user.
Relationship To Other Tables: User saves Content
Normalization Evidence: The table represents one entity: a piece of user-saved content. All columns depend on the primary key: UrlID. The URL is also unique, but the ID will be used as the primary key in case the content changes location.
Columns:
UrlID: Unique identifier for URL.
UserID: Unique identifer to reference a user.
Rating: What rating the user has given to this content.
Frequency: How often the User uses this content.
Url: URL link to the actual content.
Credentials(UserName, PasswordHash, Salt)
Foreign Key UserName references User
Table Explantion: Login credentials for each user.
Entity: A row, or an entity, represents credentials of specific user, who is registered in DigitalDrawer.
Relationship To Other Tables: User has Credentials
Normalization Evidence: The table represents one entity: user credentials. Both the password chosen by the user and the salt chosen by the system depend on the username: passwords and salts can be repeated, while the username is unique. This table also has to be separate from the user table because it is sensitive information that the system should have access to, not employees.
Columns:
UserName: Username for the User.
PasswordHash: Hash of the user password.
Salt: Salt for the user password hash.
Payment(PaymentID, UserID, PaymentType, CardNumber)
Foreign Key UserID references User
Table Explantion: Holds the payment details for users.
Entity: A row, or an entity, represents a specific instance of a user's payment transaction.
Relationship To Other Tables: User has Payment
Normalization Evidence: The table represents one entity: user payment information. All collumns depend on PaymentID, including UserID, since users can have multiple payments, but a payment is unique and has one user. This table also has to be separate from the user table because it is sensitive information. Only employees that need the information, for tasks such as correcting payment information at the request of a user, should be able to access it.
Columns:
PaymentID: Unique identifer for a payment.
UserID: Unique identifer referencing a user.
PaymentType: Credit | Debit.
CardNumber: Number for the card the user used.