This question has probably already be answered somewhere but I don't really know how to ask it. Sorry if this gets messy. I'm building a new database for my works ICT assets which include assets, laptops and laptop trolleys. The database must include locations for the assets, for example 'Room01' or 'Trolley01'.
Is it possible to have the same item in two different tables that relate to each other, eg. a trolley that is both an asset and a location, where the trolley itself also has a location?
Related
Hello Stack Overflow Community!
I am making a directory of many thousand custom mods for a game using HTML tables. When I started this project, I thought one HTML page would be slow, but adequate for the ~4k files I was expecting. As I progressed, I realized there are tens of thousands of files I need to have in these tables, and let the user search though to find what they are missing to load up a new scenario. Each entry has about 20 text entries and a small image (~3KB). I only need to be able to search through one column.
I'm thinking of dividing the tables across several pages on my website to help loading speeds and improve overall organization. But then a user would have to navigate to each page, and perform a search there. This could take a while and be very cumbersome.
I'm not great at website programming. Can someone advise a way to allow the user to search through several web pages and tables from one location? Ideally this would jump to the location in the table on the new webpage, or maybe highlight the entry like the browser's search function does.
You can see my current setup here : https://www.loco-dat-directory.site/
Hopefully someone can point me in the right direction, as I'm quite confused now :-)
This would be my steps,
Copy all my info into an excel spredsheet, then convert that to json, then make that an array for javascript (myarray), then can make an input field, and on click an if statement if input == myarray[0].propertyName
if you want something more than an exact match, you'd need https://lodash.com/
in your project.
Hacky Solution
There is a browser tool, called TableCapture, to capture data from html tables and load into excel/spreadsheets - where you are basically deferring to spreadsheet software to manage the searching.
You would have to see if:
This type of tool would solve your problem - maybe you can pull each HTML page's contents manually, then merge these pages into a document with multiple "sheets", and then let people download the "spreadsheet" from your website.
If you do not take on the labor above and just tell other people to do it, then you'd have to see if you can teach the people how to perform the search and do this method on their own. eg. "download this plugin, use it on these pages, search"
Why your question is difficult to answer
The reason why it will be hard for people to answer you in stackoverflow.com (usually code solutions) is that you need a more complicated solution (in my opinion) than hard coded tables and html/css/javascript.
This type of situation is exactly why people use databases and APIs to accept requests ("term": "something") for information and deliver responses ( "results": [...] ).
Thank you everyone for your great advice. I wasn't aware most of these potential solutions existed, and it was good to see how other people were tackling problems of similar scope.
I've decided to go with DataTables for their built-in sorting and filtering : https://datatables.net/
I'm also going to use a javascript array with an input field on the main page to allow users to search for which pack their mod is in. This will lead them to separate pages on my site, each with a unique datatable for a mod pack. Separate pages will load up much quicker than one gigantic page trying to show everything.
I have one question about page load speed. Consider a case when I have different kinds of images on my web page, such as icons, logos, images inside content etc....
I want to know whether having separate folders for each media category may affect the page load speed:
/logos
/icons
/images
Will the webpage load faster if the images of all categories were located in a single folder rather in multiple ones?
Thanks in advance for your advice.
Even though performance-related questions often get closed due to them not being answerable without benchmarks on the machine, this one is worth an answer since unless you run a potato-based computer, you won't have any performance impact.
Directories are not actually physical folders like you would have in real life.
They are simply registers of pointers to disk spaces where your files are stored. (Of course this is massively over-simplified as it involves file-systems and more low-level stuff, but that's not needed at that point).
To come back to your question, the difference between loading two files from two directories:
/var/foobar/dir1/image1.jpeg
/var/foobar/dir2/image2.jpeg
or one directory:
/var/foobar/dir1/image1.jpeg
/var/foobar/dir1/image2.jpeg
...is that your file system will have to look-up two different directories tables. With modern file-systems and moderate (even low-end) hardware, this causes no issues.
As #AjitZero mentioned, here your performance impact will come from the size of the files, the number of distinct HTTP requests (i.e.: How many images, CSS, scripts, etc...) and the way you cache data on the user's computer.
No, the number of folders doesn't affect the speed of page-load.
Lesser number of HTTP requests matter, however, so you can use sprite sheets.
I have an old SWF project file which is a series of png sequence to produce a 3D tour of numerous stadiums (If you can get it to load http://tinyurl.com/7h2zpcb). When I initially created it I never intended it to be published on the web (it was a university project) however I now would quite like to show it on the internet. The structure is of a main timeline with 4 stadiums each with a png sequence, then, when clicking on one of the stadiums, 4 more png sequences. The only problem is that it is all in one file and is over 12mb, plus has no pre-loader.
It is written in AS3 and is rather complicated as I used movie names and trimming to have reusable functions. It does however have global variables already set-up if this could help.
I have 2 questions. First, is there an easy method of separating out the project movies to 5 individual swf files. i.e main timeline, and each individual png sequence? Or will I need to copy and paste and copy assets over to each FLA file?
Secondly, would it just be easier to try using a preloaded and hoping that users wait for the project to download?
If you have any thoughts on this please give them. Is there a way to optimise the project in another way I am unaware of? As a side note there are a lot of pngs and total over 300mb when combined so I think XML is out of the question?
Thank you for your time. Any suggestions are welcome
For completeness' sake.
I did some research and tests and realised the time it would take to change the project to use any other technology would be too great for my needs. I simply just added a pre-loader to the site and saved myself a lot of extra time. When linking to the site I affix a message explaining that is for an offline installation and there may be a long load-time.
Hopefully this will help others in the future.
Thank you to Marty Wallace, shaunhusain and grapefrukt for their time and advice on this.
I had never had to deal with FileMaker before I started at my current job, six months ago. Since then, I've become relatively familiar with it.
We've been having some issues with our Container objects dropping references to files, and I have been working on a solution of my own. Well, someone told my boss about 360Works SuperContainer, and he told me to check it out.
It seems to me that SuperContainer is just a virtual server for organizing images. The way that our image database is set up, it would be no hassle at all to just create a field that returns an image's path based on the item number, then pas that to a Web Viewer - which is basically all that SuperContainer does, anyway. Given that I could explain to some of the other employees how to put images in the database correctly, nobody would ever have to manually add an image through FileMaker again. We're not really very interested in the FileMaker Instant Web Publishing features, either, so there's that.
Right now, I'm having a pretty hard time justifying spending $200 of my company's money to pay for additional software that does something that I'm already taking care of. Are there any ground-shaking, game-changing features of SuperContainer that I'm just not picking up on? (Keep in mind that I can batch-process images down to thumbnail size for free with XnView, or that, if push came to shove, I could easily build a webapp to make an in-program slideshow of pictures.)
What do you guys think?
You're right. SuperContainer could help to deal with the dropped references when storing files in FileMaker by reference instead of storing the entire file within the database. Personally, given how large FileMaker files can be, when working with documents, I tend to simply store them within the database and script their retrieval. But SuperContainer isn't doing anything that you couldn't do yourself with scripting and a web server. By using SuperContainer you might save yourself some coding time, which might make it worth the purchase, but it won't add any capabilities that you couldn't code yourself.
Can I make a customer self-service product selection tool for the web/AIR with just Flash/Actionscript 3 without having to use a separate database like SQLite?
Essentially, after selecting a general category, the client drags and drops the tag words relevant to their needs into an adjacent box and a list of products that correspond to those tags, from greatest to least, appears in the box next that.
I know that database driven apps are really on the rise but I am not clear if this situation really warrants it as I am just starting to learn (Lynda.com) and am coming from more of a content/design mentality.
Thank you and pardon my noobness.
A pure ActionScript 3 tool would work fine, but no matter which way you slice it you will have to store somehow which products map to which tags. Whether you do this via a database, a XML file or just compile it into your application will depend many things including:
How many products you have;
Will the application required an Internet connection;
How often will the database need to update.
and so on. Note also, that you will only be able to have a local SQLite database in AIR. When running in a web browser that API is not available (for Flash apps, anyway).