So I was planning on developing a website, I need a back end database. On my way to pre-modelling a database, I found out there are certain standards, which some people follow and some don’t and make their own standards for developing a database.
I might plan on reading them later and finding out more, but for now I am in a hurry to develop a database as soon as I can, while making it relational, here is some of the work so far.
What I want to ask is that whether it is a good idea to name the column names like the following, basically verbs or adjectives has_permissions
has_role
is_located_in
.
I am starting to develop a preliminary schema for my database and I’m trying to find out whether these naming conventions are appropriate and good to use.
Also feel free to suggest me tips or best practices that I can use on my way to developing a database. I am also open to some additional information that you guys can give me, since I am new to this.
Table Service {
// API or Account
serviceID integer [pk]
name string [not null]
}
Table Privelege {
privelegeID integer [pk]
// Specifies the data or operations accessible
privelege_for string [not null]
}
Table Credential {
credentialID integer [pk]
for_service integer [ref: - Service.serviceID]
has_permissions integer [ref: < Privelege.privelegeID]
}
Table City {
cityID integer [not null]
// Name of the city
city string [not null]
}
Table Globe {
globeID integer [pk]
// Country or region name
country string [not null]
has_cities integer [not null]
}
Table Language {
languageID integer [pk]
// Language name (e.g., English)
dialect string [not null]
// Language abbreviation (e.g., en)
dialect_initials string [not null]
}
Table Channel {
channelID integer [pk]
// Contact method (e.g., phone number, social media)
channel string [not null]
}
Table Contact {
contactID integer [pk]
// Channel used for contact
via integer [ref: - Channel.channelID]
// Contact detail (e.g., xxx-xxx-xxx)
using string [not null]
}
Table Account {
accountID integer [pk]
has_credentials integer [ref: - Credential.credentialID]
// Role of the account holder (e.g., Employer, Manager)
has_role integer [ref: - Employer.employerID]
// Location (e.g., globe or region)
is_located_in integer [ref: - Globe.globeID]
// Preferred communication language
prefers_communication_in integer [ref: < Language.languageID]
// Contact information
can_be_reached integer [ref: < Contact.contactID]
}
Table Employer {
employerID integer [pk]
}
a.single.byte is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.