A novice question about Create or not Create a table?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2023 12:09 PM
Hello community . This is a novice question about Create or not Create a table? .
I am doing a lab and I have questions.
What are the criterias for Create or not Create a table and if Extend Table or not ?
Or in the most the cases I create a table with a Extend Table ?
Or will that be the use case in question? For example a Contact (I guess I have a ready table for contact) and a Manufacturer (I guess I have a table read for vendor).
And what about the names of the tables? Do I need to follow some standards?
Or the customer will define those or Do I need to propose some standard?
What are the best practices here?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2024 08:19 PM
Hi grojas123,
I know this was posted 9 months ago, but I think these are some excellent questions I too think about when tasked to create a new table by customers. So I am gonna try to answer them as best as I can, and maybe someone else could also add-on additional insight.
1) To create or not create a table?
Perfect first question! Do we even need this table? Does this table already exist out of the box?
There are so many existing tables on the platform, it might be worth taking some time to go through the Tables [sys_db_object] to see if an existing table or comes close to fulfilling your requirement? Or possibly find a table we could possibly extend? Which leads us to your next question...
2) Should I create a table from scratch or extend a table?
It depends, I am quoting Tim Woodruff here who answers this question perfectly in his ServiceNow Development Handbook (3rd edition)
"It's important to be careful and mindful about extending tables. If you only need one or two fields from a given table, you probably DON'T need to extend it. If there are only a few fields you don't need on the other hand, you probably SHOULD extend it."
3) How should I name the tables?
The general convention is to name tables in the Singular form, think Task, Incident, Problem.
eg.
Label: Super Awesome Record
Name: u_super_awesome_record
Also, be thoughtful about your table names, because once created, you cannot edit it =(
These are some points I can think of. If you have discovered new ideas since you posted your question, I would love to hear about it. Cheers!
Regards,
Alphie