database-design

Why use hashing to create pathnames for large collections of files?

女生的网名这么多〃 提交于 2020-01-02 07:42:48
问题 I noticed a number of cases where an application or database stored collections of files/blobs using a has to determine the path and filename. I believe the intended outcome is a situation where the path never gets too deep, or the folders ever get too full - too many files (or folders) in a folder making for slower access. EDIT: Examples are often Digital libraries or repositories, though the simplest example I can think of (that can be installed in about 30s) is the Zotero document/citation

Why use hashing to create pathnames for large collections of files?

末鹿安然 提交于 2020-01-02 07:42:15
问题 I noticed a number of cases where an application or database stored collections of files/blobs using a has to determine the path and filename. I believe the intended outcome is a situation where the path never gets too deep, or the folders ever get too full - too many files (or folders) in a folder making for slower access. EDIT: Examples are often Digital libraries or repositories, though the simplest example I can think of (that can be installed in about 30s) is the Zotero document/citation

How to choose indexes for chat application database

给你一囗甜甜゛ 提交于 2020-01-02 07:41:53
问题 I work on a small chat application with database. I create the database shown in the image. I new to indexes and I want to choose the appropriate indexes for the query. Can I use clustered index in the Messages table ? and if I can, Which column (or columns) should have clustered index ? or should I use non-clustered index ? Update : The query that I user to get messages is : Select TextContent From Messages where (SenderId='1' and ReciverID = '2') or (SenderId='2' and ReciverID = '1') order

Passing IDs between web applications

不羁的心 提交于 2020-01-02 07:10:19
问题 We have several web applications that create a shopping cart, save it to a database, then redirect to a centralized web application to process and accept payment for the shopping cart. Right now, we are using GUIDs for the shopping cart IDs and passing those GUIDs in the querystring to the payment application. We are using GUIDs so that a user cannot easily guess the shopping cart ID of another user and simply plug that ID into the URL. Now, using GUIDs in the database is bad for indexing and

Design from the database first through to UI or t'other way round?

可紊 提交于 2020-01-02 03:06:32
问题 Do you always lean towards thinking of db schema when starting or planning a new project it or do you go the other way and start designing UI then moving down the stack? Or do you have a different way of developing? Not really an agile/waterfall/specs/stories question just a way of getting a handle on which way people lean when working on projects personal/professional or otherwise. I have decided that both are the best ways in the past and am currently in the UI first camp but that can and

Did I overdesign my MySQL database (users/companies/products)?

旧城冷巷雨未停 提交于 2020-01-02 02:27:10
问题 I'm new to database design, please give me advice about this. 1 When should I use a composite index? im not sure what does index does, but i do know we should put it when it will be heavly loaded like for WHERE verified = 1 and in search like company.name = something. am i right ? 2 MySQL indexes - how many are enough? is it just enough ? 3 Database Normalization is it just right? Thanks. edit* rules. each users( company member or owners ) could be a member of a company each company have some

Database design for Magazine website with flexible horizontal menus

六月ゝ 毕业季﹏ 提交于 2020-01-02 02:04:28
问题 I need to design a CMS based website using asp.net web form (c#) and MS SQL Server as backend database for a magazine website which will have weekly issues. Sample Data MagazinePages Table PageID PageName LangID PagePositionNo PageURL PageInheritance //PageID 1 Home 1 10 Default.aspx 0 2 About Us 1 20 Page.aspx 0 3 PageOne 1 10 Page.aspx 2 4 PageTwo 1 20 Page.aspx 2 5 Media 1 30 Page.aspx 0 6 Video 1 10 Videos.aspx 5 8 News 1 40 News.aspx 0 9 Archive 1 50 # 0 10 Publication 1 60 Page.aspx 0

Are PostgreSQL VIEWS created newly each time they are queried against?

冷暖自知 提交于 2020-01-02 00:59:24
问题 I am creating a web app which has some complex underlying associations. In order to solve several issues I was having I created a UNION View. There are probably a lot of other ways this could be solved. But I am now considering the efficiency of my design, and I wanted to know if a VIEW is newly created each time it is queried, or is it only created once, and kept updated. To elaborate, if I have table_a (100 records) and table_b (100 records) and make a UNION View, then I have created a view

Is Making a DLL compatible to all databases a good idea

和自甴很熟 提交于 2020-01-01 19:12:48
问题 I have been given an assignment to get the feasibility for making a dll which takes some inputs such as database name (Mysql, access, sql, oracle etc.) and some more inputs to generate a query, and based on that the dll should return a recordset to the application. Is it a good idea? If yes, then what inputs should I consider? 回答1: It's completely feasible, the issues arise when you encounter different SQL grammars - take a look at how Hibernate handles this with the use of Dialects. The

Is Making a DLL compatible to all databases a good idea

。_饼干妹妹 提交于 2020-01-01 19:12:09
问题 I have been given an assignment to get the feasibility for making a dll which takes some inputs such as database name (Mysql, access, sql, oracle etc.) and some more inputs to generate a query, and based on that the dll should return a recordset to the application. Is it a good idea? If yes, then what inputs should I consider? 回答1: It's completely feasible, the issues arise when you encounter different SQL grammars - take a look at how Hibernate handles this with the use of Dialects. The